@mapxus/mapxus-map-jp 10.1.1 → 10.2.1
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.umd.js +2 -2
- package/dist/{mapxus-map-10.1.1-jp.css → mapxus-map-10.2.1-jp.css} +0 -0
- package/dist/mapxus-map-10.2.1-jp.js +0 -0
- package/dist/utils.cjs +1 -1
- package/es/index.d.ts +5 -2
- package/es/index.mjs +1182 -1159
- package/es/{languages-Bg_kZzv4.mjs → languages-CQg7Rb5x.mjs} +33 -25
- package/es/utils/index.d.ts +3 -1
- package/es/utils/index.mjs +3 -3
- package/package.json +1 -1
- package/dist/mapxus-map-10.1.1-jp.js +0 -0
package/es/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import
|
|
1
|
+
import { c as hr, P as _r, C as fe, a as Et, b as M, O as A, d as K, e as fi, V as re, B as me, f as fr, A as Re, g as $, h as be, i as yt, S as pr, j as gr, R as yr, k as mr } from "./languages-CQg7Rb5x.mjs";
|
|
2
|
+
import xt from "maplibre-gl";
|
|
3
3
|
import { dispatch as mt } from "d3-dispatch";
|
|
4
|
-
import { TinyEmitter as
|
|
5
|
-
import { AuthSdkError as
|
|
4
|
+
import { TinyEmitter as br } from "tiny-emitter";
|
|
5
|
+
import { AuthSdkError as Ot, getLatestCredentials as vr, SDKName as $t, getToken as Sr, md5 as Ir } from "@mapxus/mapxus-auth-jp";
|
|
6
6
|
var bt = /* @__PURE__ */ ((t) => (t[t.VENUE = 0] = "VENUE", t[t.GLOBAL = 1] = "GLOBAL", t))(bt || {});
|
|
7
|
-
function
|
|
7
|
+
function Lr(t) {
|
|
8
8
|
return t.layers.filter(
|
|
9
9
|
(e) => !St(e.source)
|
|
10
10
|
);
|
|
@@ -17,24 +17,24 @@ function vt(t) {
|
|
|
17
17
|
function St(t) {
|
|
18
18
|
return typeof t != "string" ? !1 : t.startsWith("indoor-");
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function pi(t) {
|
|
21
21
|
const {
|
|
22
22
|
buildingId: e,
|
|
23
23
|
labelCenter: { lat: i, lon: r },
|
|
24
|
-
floors:
|
|
25
|
-
name:
|
|
24
|
+
floors: n,
|
|
25
|
+
name: s,
|
|
26
26
|
venueId: o,
|
|
27
27
|
defaultFloor: a
|
|
28
|
-
} = t, l = Object.entries(
|
|
28
|
+
} = t, l = Object.entries(s).reduce((c, [f, p]) => {
|
|
29
29
|
const _ = f === "default" ? "name" : `name:${f}`;
|
|
30
|
-
return Object.assign(
|
|
31
|
-
}, {}), { codes: d, ids: u, ordinals:
|
|
32
|
-
(
|
|
30
|
+
return Object.assign(c, { [_]: p });
|
|
31
|
+
}, {}), { codes: d, ids: u, ordinals: h } = n.reduce(
|
|
32
|
+
(c, f) => {
|
|
33
33
|
const { id: p, code: _, ordinal: g } = f;
|
|
34
34
|
return {
|
|
35
|
-
codes:
|
|
36
|
-
ids:
|
|
37
|
-
ordinals: `${
|
|
35
|
+
codes: c.codes ? `${c.codes},${_}` : _,
|
|
36
|
+
ids: c.ids ? `${c.ids},${p}` : p,
|
|
37
|
+
ordinals: `${c.ordinals}` ? `${c.ordinals},${g}` : `${g}`
|
|
38
38
|
};
|
|
39
39
|
},
|
|
40
40
|
{
|
|
@@ -51,7 +51,7 @@ function fi(t) {
|
|
|
51
51
|
label_center: `${r},${i}`,
|
|
52
52
|
level_ids: u,
|
|
53
53
|
level_names: d,
|
|
54
|
-
ordinals:
|
|
54
|
+
ordinals: h,
|
|
55
55
|
"ref:venue": o,
|
|
56
56
|
...l,
|
|
57
57
|
...a ? { default_displayed_floor: a } : {}
|
|
@@ -60,13 +60,13 @@ function fi(t) {
|
|
|
60
60
|
sourceLayer: "mapxus_building"
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function It(t) {
|
|
64
64
|
const {
|
|
65
65
|
address: e,
|
|
66
66
|
buildings: i,
|
|
67
67
|
id: r,
|
|
68
|
-
name:
|
|
69
|
-
type:
|
|
68
|
+
name: n,
|
|
69
|
+
type: s,
|
|
70
70
|
labelCenter: { lon: o, lat: a },
|
|
71
71
|
defaultBuilding: l,
|
|
72
72
|
sharedFloors: d
|
|
@@ -76,12 +76,12 @@ function Lt(t) {
|
|
|
76
76
|
"addr:street": y.street,
|
|
77
77
|
"addr:housenumber": y.housenumber
|
|
78
78
|
} : { [`addr:street:${g}`]: y.street }
|
|
79
|
-
), {}),
|
|
79
|
+
), {}), h = Object.entries(n).reduce((_, [g, y]) => {
|
|
80
80
|
const v = g === "default" ? "name" : `name:${g}`;
|
|
81
81
|
return Object.assign(_, { [v]: y });
|
|
82
|
-
}, {}),
|
|
82
|
+
}, {}), c = l ? i.find((_) => _.id === l)?.defaultFloor : null, f = l ? {
|
|
83
83
|
default_displayed_building: l,
|
|
84
|
-
...
|
|
84
|
+
...c ? { default_displayed_ordinal: c } : {}
|
|
85
85
|
} : {}, p = d?.length ? {
|
|
86
86
|
shared_level_ids: d.map(({ id: _ }) => _).join(","),
|
|
87
87
|
shared_level_ordinals: d.map(({ ordinal: _ }) => _).join(",")
|
|
@@ -90,9 +90,9 @@ function Lt(t) {
|
|
|
90
90
|
layer: { id: "mapxus-venue-fill" },
|
|
91
91
|
properties: {
|
|
92
92
|
...u,
|
|
93
|
-
...
|
|
93
|
+
...h,
|
|
94
94
|
id: r,
|
|
95
|
-
venue:
|
|
95
|
+
venue: s,
|
|
96
96
|
label_center: `${o},${a}`,
|
|
97
97
|
building_ids: i.map(({ id: _ }) => _).join(),
|
|
98
98
|
...f,
|
|
@@ -102,7 +102,7 @@ function Lt(t) {
|
|
|
102
102
|
sourceLayer: "mapxus_venue"
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function L(t, e = ",") {
|
|
106
106
|
return typeof t != "string" || !t.trim() ? [] : t.split(e);
|
|
107
107
|
}
|
|
108
108
|
const De = {
|
|
@@ -110,7 +110,7 @@ const De = {
|
|
|
110
110
|
lineColor: "#A5E3FF",
|
|
111
111
|
lineOpacity: 1,
|
|
112
112
|
lineOffset: -1.5
|
|
113
|
-
},
|
|
113
|
+
}, Mt = {
|
|
114
114
|
fontColor: "#8c8c8c",
|
|
115
115
|
activeFontColor: "#fff",
|
|
116
116
|
backgroundColor: "#fff",
|
|
@@ -118,22 +118,22 @@ const De = {
|
|
|
118
118
|
itemSize: 50,
|
|
119
119
|
itemCount: 4,
|
|
120
120
|
defaultFolded: !1
|
|
121
|
-
},
|
|
122
|
-
class
|
|
121
|
+
}, wr = hr(window.navigator.language) ?? _r.ENGLISH;
|
|
122
|
+
class At extends Error {
|
|
123
123
|
status;
|
|
124
124
|
constructor(e, i) {
|
|
125
125
|
super(e);
|
|
126
|
-
const { status: r, name:
|
|
127
|
-
r !== void 0 && (this.status = r),
|
|
126
|
+
const { status: r, name: n } = i;
|
|
127
|
+
r !== void 0 && (this.status = r), n !== void 0 && (this.name = n);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Br(t, e = 30) {
|
|
131
131
|
let i, r = null;
|
|
132
132
|
return { promise: new Promise((o, a) => {
|
|
133
133
|
r = a;
|
|
134
134
|
const l = performance.now(), d = () => {
|
|
135
135
|
t() ? (clearInterval(i), o(!0)) : (performance.now() - l) / 1e3 > e && (a(
|
|
136
|
-
new
|
|
136
|
+
new At(
|
|
137
137
|
"Timeouts or Feature is not found in the map at current zoom level.",
|
|
138
138
|
{ status: 404, name: "NetworkError" }
|
|
139
139
|
)
|
|
@@ -142,7 +142,7 @@ function Ir(t, e = 30) {
|
|
|
142
142
|
d(), i = setInterval(d, 100);
|
|
143
143
|
}), abort: () => {
|
|
144
144
|
i && (clearInterval(i), i = null), r && (r(
|
|
145
|
-
new
|
|
145
|
+
new At("Query was aborted by the user.", {
|
|
146
146
|
status: 400,
|
|
147
147
|
name: "AbortError"
|
|
148
148
|
})
|
|
@@ -160,10 +160,10 @@ function m(t) {
|
|
|
160
160
|
function Z(t) {
|
|
161
161
|
return Array.isArray(t) && t.length === 2 && t.every((e) => typeof e == "number");
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function ue(t) {
|
|
164
164
|
return Array.isArray(t) && t.length === 2 && t.every((e) => Z(e));
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function de(t) {
|
|
167
167
|
return typeof t == "number" && t > 0;
|
|
168
168
|
}
|
|
169
169
|
function He(t, e) {
|
|
@@ -172,8 +172,8 @@ function He(t, e) {
|
|
|
172
172
|
delete i[r];
|
|
173
173
|
}), i;
|
|
174
174
|
}
|
|
175
|
-
var
|
|
176
|
-
const
|
|
175
|
+
var Pr = /* @__PURE__ */ ((t) => (t.POINT = "Point", t.POLYGON = "Polygon", t))(Pr || {}), gi = /* @__PURE__ */ ((t) => (t.POINT = "Point", t.POLYGON = "Polygon", t.GATE = "Gate", t))(gi || {}), Fr = /* @__PURE__ */ ((t) => (t.DEFAULT_NAME = "DefaultName", t))(Fr || {}), Cr = /* @__PURE__ */ ((t) => (t.ABSOLUTE_DISTANCE = "AbsoluteDistance", t.ACTUAL_DISTANCE = "ActualDistance", t))(Cr || {});
|
|
176
|
+
const Tt = [
|
|
177
177
|
"specialHours",
|
|
178
178
|
"businessStatus",
|
|
179
179
|
"serviceHours",
|
|
@@ -183,8 +183,8 @@ const At = [
|
|
|
183
183
|
"totalPhotoCount",
|
|
184
184
|
"photos",
|
|
185
185
|
"icon"
|
|
186
|
-
], qe =
|
|
187
|
-
class
|
|
186
|
+
], qe = fe.getInstance();
|
|
187
|
+
class yi {
|
|
188
188
|
constructor() {
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
@@ -197,8 +197,8 @@ class gi {
|
|
|
197
197
|
throw new Error(
|
|
198
198
|
"Invalid ids parameter. Expected a non-empty string or an array of strings."
|
|
199
199
|
);
|
|
200
|
-
const r = `${
|
|
201
|
-
return this._filterPoiProperties(r,
|
|
200
|
+
const r = `${Et}/${i}`;
|
|
201
|
+
return this._filterPoiProperties(r, q);
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
204
204
|
* Search POIs by radius distance of the center point.
|
|
@@ -208,22 +208,22 @@ class gi {
|
|
|
208
208
|
const {
|
|
209
209
|
center: i,
|
|
210
210
|
distance: r,
|
|
211
|
-
keywords:
|
|
212
|
-
offset:
|
|
211
|
+
keywords: n = "",
|
|
212
|
+
offset: s = A,
|
|
213
213
|
page: o = M
|
|
214
214
|
} = e;
|
|
215
215
|
if (!Z(i))
|
|
216
216
|
throw new Error(
|
|
217
217
|
"Invalid center parameter. Expected an array of two numbers."
|
|
218
218
|
);
|
|
219
|
-
if (!
|
|
219
|
+
if (!de(r) || r > 1e4)
|
|
220
220
|
throw new Error(
|
|
221
221
|
"Invalid distance parameter. Expected a positive number and no more than 10000."
|
|
222
222
|
);
|
|
223
223
|
const a = new URLSearchParams();
|
|
224
|
-
a.set("center", i.join(",")), a.set("distance", String(Math.round(r))), a.set("offset", String(
|
|
225
|
-
const l = `${
|
|
226
|
-
return this._filterPoiProperties(l,
|
|
224
|
+
a.set("center", i.join(",")), a.set("distance", String(Math.round(r))), a.set("offset", String(s)), a.set("page", String(o)), m(n) && a.set("keywords", n);
|
|
225
|
+
const l = `${K}?${a.toString()}`;
|
|
226
|
+
return this._filterPoiProperties(l, q);
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
229
|
* Search POIs in a rectangular area.
|
|
@@ -234,18 +234,18 @@ class gi {
|
|
|
234
234
|
const {
|
|
235
235
|
bounds: i,
|
|
236
236
|
offset: r = A,
|
|
237
|
-
page:
|
|
238
|
-
keywords:
|
|
237
|
+
page: n = M,
|
|
238
|
+
keywords: s,
|
|
239
239
|
orderBy: o
|
|
240
240
|
} = e;
|
|
241
|
-
if (!
|
|
241
|
+
if (!ue(i))
|
|
242
242
|
throw new Error(
|
|
243
243
|
"'bounds' must be an array of two arrays, each containing two numbers."
|
|
244
244
|
);
|
|
245
245
|
const a = new URLSearchParams();
|
|
246
|
-
a.set("bbox", i.flat().join()), a.set("offset", String(r)), a.set("page", String(
|
|
247
|
-
const l = `${
|
|
248
|
-
return this._filterPoiProperties(l,
|
|
246
|
+
a.set("bbox", i.flat().join()), a.set("offset", String(r)), a.set("page", String(n)), m(s) && a.set("keywords", s), o && a.set("orderBy", o);
|
|
247
|
+
const l = `${K}?${a.toString()}`;
|
|
248
|
+
return this._filterPoiProperties(l, q);
|
|
249
249
|
}
|
|
250
250
|
/**
|
|
251
251
|
* Search POIs of a building.
|
|
@@ -256,18 +256,18 @@ class gi {
|
|
|
256
256
|
const {
|
|
257
257
|
buildingId: i,
|
|
258
258
|
offset: r = A,
|
|
259
|
-
page:
|
|
260
|
-
keywords:
|
|
259
|
+
page: n = M,
|
|
260
|
+
keywords: s,
|
|
261
261
|
orderBy: o
|
|
262
262
|
} = e;
|
|
263
263
|
if (!m(i))
|
|
264
264
|
throw new Error("'buildingId' must be a non-empty string.");
|
|
265
265
|
const a = new URLSearchParams();
|
|
266
|
-
a.set("buildingId", i), a.set("offset", String(r)), a.set("page", String(
|
|
267
|
-
const l = `${
|
|
266
|
+
a.set("buildingId", i), a.set("offset", String(r)), a.set("page", String(n)), m(s) && a.set("keywords", s), o && a.set("orderBy", o);
|
|
267
|
+
const l = `${K}?${a.toString()}`;
|
|
268
268
|
return this._filterPoiProperties(
|
|
269
269
|
l,
|
|
270
|
-
(d) =>
|
|
270
|
+
(d) => q(d)
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
273
|
/**
|
|
@@ -279,16 +279,16 @@ class gi {
|
|
|
279
279
|
const {
|
|
280
280
|
venueId: i,
|
|
281
281
|
offset: r = A,
|
|
282
|
-
page:
|
|
283
|
-
keywords:
|
|
282
|
+
page: n = M,
|
|
283
|
+
keywords: s,
|
|
284
284
|
orderBy: o
|
|
285
285
|
} = e;
|
|
286
286
|
if (!m(i))
|
|
287
287
|
throw new Error("'venueId' must be a non-empty string.");
|
|
288
288
|
const a = new URLSearchParams();
|
|
289
|
-
a.set("venueId", i), a.set("offset", String(r)), a.set("page", String(
|
|
290
|
-
const l = `${
|
|
291
|
-
return this._filterPoiProperties(l,
|
|
289
|
+
a.set("venueId", i), a.set("offset", String(r)), a.set("page", String(n)), m(s) && a.set("keywords", s), o && a.set("orderBy", o);
|
|
290
|
+
const l = `${K}?${a.toString()}`;
|
|
291
|
+
return this._filterPoiProperties(l, q);
|
|
292
292
|
}
|
|
293
293
|
/**
|
|
294
294
|
* Search POIs of floors.
|
|
@@ -297,15 +297,15 @@ class gi {
|
|
|
297
297
|
*/
|
|
298
298
|
searchByFloors(e) {
|
|
299
299
|
let i = null, r = null;
|
|
300
|
-
const
|
|
301
|
-
if (
|
|
300
|
+
const n = "floorIds" in e ? k(e.floorIds) : null, s = "sharedFloorIds" in e ? k(e.sharedFloorIds) : null;
|
|
301
|
+
if (n ? (i = "floorId", r = n) : s && (i = "sharedFloorId", r = s), !i || !r)
|
|
302
302
|
throw new Error(
|
|
303
303
|
"Either 'floorIds' or 'sharedFloorIds' must be a non-empty array."
|
|
304
304
|
);
|
|
305
305
|
const { offset: o = A, page: a = M, keywords: l, orderBy: d } = e, u = new URLSearchParams();
|
|
306
306
|
u.set("offset", String(o)), u.set("page", String(a)), u.set(i, r), m(l) && u.set("keywords", l), d && u.set("orderBy", d);
|
|
307
|
-
const
|
|
308
|
-
return this._filterPoiProperties(
|
|
307
|
+
const h = `${K}?${u.toString()}`;
|
|
308
|
+
return this._filterPoiProperties(h, q);
|
|
309
309
|
}
|
|
310
310
|
/**
|
|
311
311
|
* Search surrounding POIs based on the user's location and orientation.
|
|
@@ -315,18 +315,18 @@ class gi {
|
|
|
315
315
|
const {
|
|
316
316
|
center: i,
|
|
317
317
|
angle: r,
|
|
318
|
-
distance:
|
|
319
|
-
distanceSearchType:
|
|
318
|
+
distance: n,
|
|
319
|
+
distanceSearchType: s = gi.POINT
|
|
320
320
|
} = e;
|
|
321
321
|
if (!Z(i))
|
|
322
322
|
throw new Error(
|
|
323
323
|
"Invalid center parameter. Expected an array of two numbers."
|
|
324
324
|
);
|
|
325
|
-
if (!
|
|
325
|
+
if (!de(n) || n > 100)
|
|
326
326
|
throw new Error(
|
|
327
327
|
"Invalid distance parameter. Expected a positive number and cannot exceed 100."
|
|
328
328
|
);
|
|
329
|
-
if (!
|
|
329
|
+
if (!de(r))
|
|
330
330
|
throw new Error(
|
|
331
331
|
"Invalid angle parameter. Expected a positive number."
|
|
332
332
|
);
|
|
@@ -347,8 +347,8 @@ class gi {
|
|
|
347
347
|
throw new Error(
|
|
348
348
|
"Either 'ordinal', 'floorId', or 'buildingId' must be provided."
|
|
349
349
|
);
|
|
350
|
-
o.set("center", i.join()), o.set("angle", String(Math.round(r))), o.set("distance", String(
|
|
351
|
-
const a = `${
|
|
350
|
+
o.set("center", i.join()), o.set("angle", String(Math.round(r))), o.set("distance", String(n)), o.set("distanceSearchType", s);
|
|
351
|
+
const a = `${Et}/orientation?${o.toString()}`;
|
|
352
352
|
return (await qe.getHttpSession()).request(a);
|
|
353
353
|
}
|
|
354
354
|
/**
|
|
@@ -356,12 +356,12 @@ class gi {
|
|
|
356
356
|
* @param {TSearchByCategoryOptions} options
|
|
357
357
|
*/
|
|
358
358
|
searchByCategory(e) {
|
|
359
|
-
const { center: i, distance: r, page:
|
|
359
|
+
const { center: i, distance: r, page: n = M, offset: s = A } = e;
|
|
360
360
|
if (!Z(i))
|
|
361
361
|
throw new Error(
|
|
362
362
|
"Invalid center parameter. Expected an array of two numbers."
|
|
363
363
|
);
|
|
364
|
-
if (!
|
|
364
|
+
if (!de(r) || r > 1e4)
|
|
365
365
|
throw new Error(
|
|
366
366
|
"Invalid distance parameter. Expected a positive number and no more than 10000"
|
|
367
367
|
);
|
|
@@ -377,9 +377,9 @@ class gi {
|
|
|
377
377
|
throw new Error(
|
|
378
378
|
"Either 'category' or 'excludedCategories' must be provided."
|
|
379
379
|
);
|
|
380
|
-
o.set("center", i.join(",")), o.set("distance", String(r)), o.set("page", String(
|
|
381
|
-
const a = `${
|
|
382
|
-
return this._filterPoiProperties(a,
|
|
380
|
+
o.set("center", i.join(",")), o.set("distance", String(r)), o.set("page", String(n)), o.set("offset", String(s));
|
|
381
|
+
const a = `${K}?${o.toString()}`;
|
|
382
|
+
return this._filterPoiProperties(a, q);
|
|
383
383
|
}
|
|
384
384
|
/**
|
|
385
385
|
* @deprecated Use CategoryService.searchCategories() instead.
|
|
@@ -388,57 +388,57 @@ class gi {
|
|
|
388
388
|
*/
|
|
389
389
|
async searchCategories(e) {
|
|
390
390
|
const i = new URLSearchParams();
|
|
391
|
-
if ("floorId" in e && m(e.floorId) ? i.set("floorId", e.floorId) : "buildingId" in e && m(e.buildingId) ? i.set("buildingId", e.buildingId) : "sharedFloorId" in e && m(e.sharedFloorId) ? i.set("sharedFloorId", e.sharedFloorId) : "venueId" in e && m(e.venueId) && i.set("venueId", e.venueId), "bounds" in e &&
|
|
391
|
+
if ("floorId" in e && m(e.floorId) ? i.set("floorId", e.floorId) : "buildingId" in e && m(e.buildingId) ? i.set("buildingId", e.buildingId) : "sharedFloorId" in e && m(e.sharedFloorId) ? i.set("sharedFloorId", e.sharedFloorId) : "venueId" in e && m(e.venueId) && i.set("venueId", e.venueId), "bounds" in e && ue(e.bounds) && (i.set("bbox", e.bounds.flat().join()), m(e.keywords) && i.set("keywords", e.keywords)), i.toString().length === 0)
|
|
392
392
|
throw new Error(
|
|
393
393
|
"At least one of 'floorId', 'buildingId', 'sharedFloorId', 'venueId', or 'bounds' must be provided."
|
|
394
394
|
);
|
|
395
|
-
const r = `${
|
|
395
|
+
const r = `${fi}?${i.toString()}`;
|
|
396
396
|
return (await qe.getHttpSession()).request(r);
|
|
397
397
|
}
|
|
398
398
|
search(e) {
|
|
399
399
|
const i = new URLSearchParams();
|
|
400
|
-
Object.entries(e).forEach(([
|
|
401
|
-
switch (
|
|
400
|
+
Object.entries(e).forEach(([n, s]) => {
|
|
401
|
+
switch (n) {
|
|
402
402
|
case "bounds":
|
|
403
|
-
|
|
403
|
+
ue(s) && i.set("bbox", s.flat().join());
|
|
404
404
|
break;
|
|
405
405
|
case "center":
|
|
406
|
-
Z(
|
|
406
|
+
Z(s) && i.set("center", s.join());
|
|
407
407
|
break;
|
|
408
408
|
case "excludedCategories":
|
|
409
|
-
const o = k(
|
|
409
|
+
const o = k(s);
|
|
410
410
|
o && i.set("excludeCategories", o);
|
|
411
411
|
break;
|
|
412
412
|
case "floorIds":
|
|
413
|
-
const a = k(
|
|
413
|
+
const a = k(s);
|
|
414
414
|
a && i.set("floorId", a);
|
|
415
415
|
break;
|
|
416
416
|
case "sharedFloorIds":
|
|
417
|
-
const l = k(
|
|
417
|
+
const l = k(s);
|
|
418
418
|
l && i.set("sharedFloorId", l);
|
|
419
419
|
break;
|
|
420
420
|
default:
|
|
421
|
-
i.set(
|
|
421
|
+
i.set(n, String(s));
|
|
422
422
|
}
|
|
423
423
|
});
|
|
424
|
-
const r = `${
|
|
425
|
-
return this._filterPoiProperties(r,
|
|
424
|
+
const r = `${K}?${i.toString()}`;
|
|
425
|
+
return this._filterPoiProperties(r, q);
|
|
426
426
|
}
|
|
427
427
|
async _filterPoiProperties(e, i) {
|
|
428
|
-
const
|
|
428
|
+
const n = await (await qe.getHttpSession()).request(e), s = n.result.pois.map(i);
|
|
429
429
|
return {
|
|
430
|
-
...
|
|
430
|
+
...n,
|
|
431
431
|
result: {
|
|
432
|
-
...
|
|
433
|
-
pois:
|
|
432
|
+
...n.result,
|
|
433
|
+
pois: s
|
|
434
434
|
}
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
|
-
function
|
|
439
|
-
return "sharedFloorId" in t, He(t,
|
|
438
|
+
function q(t) {
|
|
439
|
+
return "sharedFloorId" in t, He(t, Tt);
|
|
440
440
|
}
|
|
441
|
-
const
|
|
441
|
+
const Er = [
|
|
442
442
|
"opening_hours",
|
|
443
443
|
"description",
|
|
444
444
|
"phone",
|
|
@@ -446,8 +446,8 @@ const Fr = [
|
|
|
446
446
|
"email",
|
|
447
447
|
"appURL",
|
|
448
448
|
"icon"
|
|
449
|
-
],
|
|
450
|
-
class
|
|
449
|
+
], xr = fe.getInstance();
|
|
450
|
+
class mi {
|
|
451
451
|
constructor() {
|
|
452
452
|
}
|
|
453
453
|
/**
|
|
@@ -472,20 +472,20 @@ class yi {
|
|
|
472
472
|
const {
|
|
473
473
|
center: i,
|
|
474
474
|
distance: r,
|
|
475
|
-
keywords:
|
|
476
|
-
offset:
|
|
475
|
+
keywords: n = "",
|
|
476
|
+
offset: s = A,
|
|
477
477
|
page: o = M
|
|
478
478
|
} = e;
|
|
479
479
|
if (!Z(i))
|
|
480
480
|
throw new Error(
|
|
481
481
|
"Invalid center parameter. Expected an array of two numbers."
|
|
482
482
|
);
|
|
483
|
-
if (!
|
|
483
|
+
if (!de(r) || r > 1e4)
|
|
484
484
|
throw new Error(
|
|
485
485
|
"Invalid distance parameter. Expected a positive number and no more than 10000."
|
|
486
486
|
);
|
|
487
487
|
const a = new URLSearchParams();
|
|
488
|
-
a.set("center", i.join(",")), a.set("distance", String(r)), a.set("offset", String(
|
|
488
|
+
a.set("center", i.join(",")), a.set("distance", String(r)), a.set("offset", String(s)), a.set("page", String(o)), m(n) && a.set("keywords", n);
|
|
489
489
|
const l = `${re}?${a.toString()}`;
|
|
490
490
|
return this._filterVenueProperties(
|
|
491
491
|
l,
|
|
@@ -497,13 +497,13 @@ class yi {
|
|
|
497
497
|
* @param {ISearchByBoundsOptions} options
|
|
498
498
|
*/
|
|
499
499
|
searchByBounds(e) {
|
|
500
|
-
const { keywords: i, bounds: r, offset:
|
|
501
|
-
if (!
|
|
500
|
+
const { keywords: i, bounds: r, offset: n = A, page: s = M } = e;
|
|
501
|
+
if (!ue(r))
|
|
502
502
|
throw new Error(
|
|
503
503
|
"'bounds' must be an array of two arrays, each containing two numbers."
|
|
504
504
|
);
|
|
505
505
|
const o = new URLSearchParams();
|
|
506
|
-
o.set("bbox", r.flat().join()), o.set("offset", String(
|
|
506
|
+
o.set("bbox", r.flat().join()), o.set("offset", String(n)), o.set("page", String(s)), m(i) && o.set("keywords", i);
|
|
507
507
|
const a = `${re}?${o.toString()}`;
|
|
508
508
|
return this._filterVenueProperties(
|
|
509
509
|
a,
|
|
@@ -515,9 +515,9 @@ class yi {
|
|
|
515
515
|
* @param {ISearchByKeywordsOptions} options
|
|
516
516
|
*/
|
|
517
517
|
searchByGlobal(e) {
|
|
518
|
-
const { keywords: i, offset: r = A, page:
|
|
519
|
-
|
|
520
|
-
const o = `${re}?${
|
|
518
|
+
const { keywords: i, offset: r = A, page: n = M } = e, s = new URLSearchParams();
|
|
519
|
+
s.set("offset", String(r)), s.set("page", String(n)), m(i) && s.set("keywords", i);
|
|
520
|
+
const o = `${re}?${s.toString()}`;
|
|
521
521
|
return this._filterVenueProperties(
|
|
522
522
|
o,
|
|
523
523
|
se
|
|
@@ -534,8 +534,8 @@ class yi {
|
|
|
534
534
|
}
|
|
535
535
|
search(e) {
|
|
536
536
|
const i = new URLSearchParams();
|
|
537
|
-
Object.entries(e).forEach(([
|
|
538
|
-
|
|
537
|
+
Object.entries(e).forEach(([n, s]) => {
|
|
538
|
+
n === "bounds" ? i.set("bbox", s.flat().join()) : n === "center" ? i.set("center", s.join()) : i.set(n, String(s));
|
|
539
539
|
});
|
|
540
540
|
const r = `${re}?${i.toString()}`;
|
|
541
541
|
return this._filterVenueProperties(
|
|
@@ -544,20 +544,20 @@ class yi {
|
|
|
544
544
|
);
|
|
545
545
|
}
|
|
546
546
|
async _filterVenueProperties(e, i) {
|
|
547
|
-
const
|
|
547
|
+
const n = await (await xr.getHttpSession()).request(e), s = n.result.venues.map(i);
|
|
548
548
|
return {
|
|
549
|
-
...
|
|
549
|
+
...n,
|
|
550
550
|
result: {
|
|
551
|
-
...
|
|
552
|
-
venues:
|
|
551
|
+
...n.result,
|
|
552
|
+
venues: s
|
|
553
553
|
}
|
|
554
554
|
};
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
function se(t) {
|
|
558
|
-
return He(t,
|
|
558
|
+
return He(t, Er);
|
|
559
559
|
}
|
|
560
|
-
const
|
|
560
|
+
const Or = [
|
|
561
561
|
"specialHours",
|
|
562
562
|
"businessStatus",
|
|
563
563
|
"serviceHours",
|
|
@@ -567,8 +567,8 @@ const Er = [
|
|
|
567
567
|
"totalPhotoCount",
|
|
568
568
|
"photos",
|
|
569
569
|
"description"
|
|
570
|
-
],
|
|
571
|
-
class
|
|
570
|
+
], $r = fe.getInstance();
|
|
571
|
+
class bi {
|
|
572
572
|
constructor() {
|
|
573
573
|
}
|
|
574
574
|
/**
|
|
@@ -579,10 +579,10 @@ class mi {
|
|
|
579
579
|
const i = k(e);
|
|
580
580
|
if (!i)
|
|
581
581
|
throw new Error("Please input building id at least one.");
|
|
582
|
-
const r = `${
|
|
582
|
+
const r = `${me}/${i}`;
|
|
583
583
|
return this._filterBuildingProperties(
|
|
584
584
|
r,
|
|
585
|
-
|
|
585
|
+
ne
|
|
586
586
|
);
|
|
587
587
|
}
|
|
588
588
|
/**
|
|
@@ -593,24 +593,24 @@ class mi {
|
|
|
593
593
|
const {
|
|
594
594
|
center: i,
|
|
595
595
|
distance: r,
|
|
596
|
-
keywords:
|
|
597
|
-
offset:
|
|
596
|
+
keywords: n = "",
|
|
597
|
+
offset: s = A,
|
|
598
598
|
page: o = M
|
|
599
599
|
} = e;
|
|
600
600
|
if (!Z(i))
|
|
601
601
|
throw new Error(
|
|
602
602
|
"Invalid center parameter. Expected an array of two numbers."
|
|
603
603
|
);
|
|
604
|
-
if (!
|
|
604
|
+
if (!de(r) || r > 1e4)
|
|
605
605
|
throw new Error(
|
|
606
606
|
"Invalid distance parameter. Expected a positive number and no more than 10000."
|
|
607
607
|
);
|
|
608
608
|
const a = new URLSearchParams();
|
|
609
|
-
a.set("center", i.join(",")), a.set("distance", String(r)), a.set("offset", String(
|
|
610
|
-
const l = `${
|
|
609
|
+
a.set("center", i.join(",")), a.set("distance", String(r)), a.set("offset", String(s)), a.set("page", String(o)), m(n) && a.set("keywords", n);
|
|
610
|
+
const l = `${me}?${a.toString()}`;
|
|
611
611
|
return this._filterBuildingProperties(
|
|
612
612
|
l,
|
|
613
|
-
|
|
613
|
+
ne
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
616
|
/**
|
|
@@ -618,17 +618,17 @@ class mi {
|
|
|
618
618
|
* @param {ISearchByBoundsOptions} options
|
|
619
619
|
*/
|
|
620
620
|
searchByBounds(e) {
|
|
621
|
-
const { bounds: i, offset: r = A, page:
|
|
622
|
-
if (!
|
|
621
|
+
const { bounds: i, offset: r = A, page: n = M, keywords: s } = e;
|
|
622
|
+
if (!ue(i))
|
|
623
623
|
throw new Error(
|
|
624
624
|
"'bounds' must be an array of two arrays, each containing two numbers."
|
|
625
625
|
);
|
|
626
626
|
const o = new URLSearchParams();
|
|
627
|
-
o.set("bbox", i.flat().join()), o.set("offset", String(r)), o.set("page", String(
|
|
628
|
-
const a = `${
|
|
627
|
+
o.set("bbox", i.flat().join()), o.set("offset", String(r)), o.set("page", String(n)), m(s) && o.set("keywords", s);
|
|
628
|
+
const a = `${me}?${o.toString()}`;
|
|
629
629
|
return this._filterBuildingProperties(
|
|
630
630
|
a,
|
|
631
|
-
|
|
631
|
+
ne
|
|
632
632
|
);
|
|
633
633
|
}
|
|
634
634
|
/**
|
|
@@ -636,12 +636,12 @@ class mi {
|
|
|
636
636
|
* @param {ISearchByKeywordsOptions} options
|
|
637
637
|
*/
|
|
638
638
|
searchByGlobal(e) {
|
|
639
|
-
const { keywords: i, offset: r = A, page:
|
|
640
|
-
|
|
641
|
-
const o = `${
|
|
639
|
+
const { keywords: i, offset: r = A, page: n = M } = e, s = new URLSearchParams();
|
|
640
|
+
s.set("searchGlobal", String(!0)), s.set("offset", String(r)), s.set("page", String(n)), m(i) && s.set("keywords", i);
|
|
641
|
+
const o = `${me}?${s.toString()}`;
|
|
642
642
|
return this._filterBuildingProperties(
|
|
643
643
|
o,
|
|
644
|
-
|
|
644
|
+
ne
|
|
645
645
|
);
|
|
646
646
|
}
|
|
647
647
|
/**
|
|
@@ -651,55 +651,55 @@ class mi {
|
|
|
651
651
|
searchByFloorId(e) {
|
|
652
652
|
if (!m(e))
|
|
653
653
|
throw new Error("'floorId' cannot be empty.");
|
|
654
|
-
const i = `${
|
|
654
|
+
const i = `${fr}/floors/${e}`;
|
|
655
655
|
return this._filterBuildingProperties(
|
|
656
656
|
i,
|
|
657
|
-
|
|
657
|
+
ne
|
|
658
658
|
);
|
|
659
659
|
}
|
|
660
660
|
search(e) {
|
|
661
661
|
const i = new URLSearchParams();
|
|
662
|
-
Object.entries(e).forEach(([
|
|
663
|
-
|
|
662
|
+
Object.entries(e).forEach(([n, s]) => {
|
|
663
|
+
n === "bounds" ? i.set("bbox", s.flat().join()) : n === "center" ? i.set("center", s.join()) : i.set(n, String(s));
|
|
664
664
|
});
|
|
665
|
-
const r = `${
|
|
665
|
+
const r = `${me}?${i.toString()}`;
|
|
666
666
|
return this._filterBuildingProperties(
|
|
667
667
|
r,
|
|
668
|
-
|
|
668
|
+
ne
|
|
669
669
|
);
|
|
670
670
|
}
|
|
671
671
|
async _filterBuildingProperties(e, i) {
|
|
672
|
-
const
|
|
672
|
+
const n = await (await $r.getHttpSession()).request(e), s = n.result.buildings.map(i);
|
|
673
673
|
return {
|
|
674
|
-
...
|
|
674
|
+
...n,
|
|
675
675
|
result: {
|
|
676
|
-
...
|
|
677
|
-
buildings:
|
|
676
|
+
...n.result,
|
|
677
|
+
buildings: s
|
|
678
678
|
}
|
|
679
679
|
};
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
|
-
function
|
|
683
|
-
return He(t,
|
|
682
|
+
function ne(t) {
|
|
683
|
+
return He(t, Or);
|
|
684
684
|
}
|
|
685
|
-
const
|
|
685
|
+
const vi = new bi(), Si = new mi(), Mr = new yi();
|
|
686
686
|
async function ot(t) {
|
|
687
|
-
return (await
|
|
687
|
+
return (await vi.searchByIds(t)).result.buildings[0];
|
|
688
688
|
}
|
|
689
|
-
async function
|
|
690
|
-
const i = (await
|
|
689
|
+
async function Ar(t) {
|
|
690
|
+
const i = (await vi.searchByFloorId(t)).result.buildings[0].buildingId;
|
|
691
691
|
return await ot(i);
|
|
692
692
|
}
|
|
693
693
|
async function at(t) {
|
|
694
|
-
return (await
|
|
694
|
+
return (await Si.searchByIds(t)).result.venues[0];
|
|
695
695
|
}
|
|
696
|
-
async function
|
|
697
|
-
return (await
|
|
696
|
+
async function Ii(t) {
|
|
697
|
+
return (await Si.searchBySharedFloorId(t)).result.venues[0];
|
|
698
698
|
}
|
|
699
|
-
async function
|
|
700
|
-
return (await
|
|
699
|
+
async function Tr(t) {
|
|
700
|
+
return (await Mr.searchByIds([t])).result.pois[0];
|
|
701
701
|
}
|
|
702
|
-
class
|
|
702
|
+
class G {
|
|
703
703
|
static instance;
|
|
704
704
|
_visitedBuildingUnits;
|
|
705
705
|
// venueId-buildingUnit
|
|
@@ -710,7 +710,7 @@ class Y {
|
|
|
710
710
|
this._visitedBuildingUnits = [], this._historyBuildingUnit = /* @__PURE__ */ new Map(), this._historyOrdinal = /* @__PURE__ */ new Map();
|
|
711
711
|
}
|
|
712
712
|
static getInstance() {
|
|
713
|
-
return
|
|
713
|
+
return G.instance || (G.instance = new G()), G.instance;
|
|
714
714
|
}
|
|
715
715
|
getHistoryBuildingUnit(e) {
|
|
716
716
|
return this._historyBuildingUnit.get(e);
|
|
@@ -733,119 +733,119 @@ class Y {
|
|
|
733
733
|
));
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
|
-
var Li = typeof global == "object" && global && global.Object === Object && global,
|
|
737
|
-
function
|
|
738
|
-
var e =
|
|
736
|
+
var Li = typeof global == "object" && global && global.Object === Object && global, kr = typeof self == "object" && self && self.Object === Object && self, R = Li || kr || Function("return this")(), Y = R.Symbol, wi = Object.prototype, Rr = wi.hasOwnProperty, Dr = wi.toString, ve = Y ? Y.toStringTag : void 0;
|
|
737
|
+
function Hr(t) {
|
|
738
|
+
var e = Rr.call(t, ve), i = t[ve];
|
|
739
739
|
try {
|
|
740
740
|
t[ve] = void 0;
|
|
741
741
|
var r = !0;
|
|
742
742
|
} catch {
|
|
743
743
|
}
|
|
744
|
-
var
|
|
745
|
-
return r && (e ? t[ve] = i : delete t[ve]),
|
|
744
|
+
var n = Dr.call(t);
|
|
745
|
+
return r && (e ? t[ve] = i : delete t[ve]), n;
|
|
746
746
|
}
|
|
747
|
-
var
|
|
748
|
-
function
|
|
749
|
-
return
|
|
747
|
+
var Nr = Object.prototype, Ur = Nr.toString;
|
|
748
|
+
function jr(t) {
|
|
749
|
+
return Ur.call(t);
|
|
750
750
|
}
|
|
751
|
-
var
|
|
752
|
-
function
|
|
753
|
-
return t == null ? t === void 0 ?
|
|
751
|
+
var Vr = "[object Null]", qr = "[object Undefined]", kt = Y ? Y.toStringTag : void 0;
|
|
752
|
+
function pe(t) {
|
|
753
|
+
return t == null ? t === void 0 ? qr : Vr : kt && kt in Object(t) ? Hr(t) : jr(t);
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function he(t) {
|
|
756
756
|
return t != null && typeof t == "object";
|
|
757
757
|
}
|
|
758
|
-
var
|
|
758
|
+
var zr = "[object Symbol]";
|
|
759
759
|
function Ce(t) {
|
|
760
|
-
return typeof t == "symbol" ||
|
|
760
|
+
return typeof t == "symbol" || he(t) && pe(t) == zr;
|
|
761
761
|
}
|
|
762
|
-
function
|
|
763
|
-
for (var r = -1,
|
|
764
|
-
var
|
|
762
|
+
function Gr(t, e, i) {
|
|
763
|
+
for (var r = -1, n = t.length; ++r < n; ) {
|
|
764
|
+
var s = t[r], o = e(s);
|
|
765
765
|
if (o != null && (a === void 0 ? o === o && !Ce(o) : i(o, a)))
|
|
766
|
-
var a = o, l =
|
|
766
|
+
var a = o, l = s;
|
|
767
767
|
}
|
|
768
768
|
return l;
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function Yr() {
|
|
771
771
|
this.__data__ = [], this.size = 0;
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function Bi(t, e) {
|
|
774
774
|
return t === e || t !== t && e !== e;
|
|
775
775
|
}
|
|
776
776
|
function Ue(t, e) {
|
|
777
777
|
for (var i = t.length; i--; )
|
|
778
|
-
if (
|
|
778
|
+
if (Bi(t[i][0], e))
|
|
779
779
|
return i;
|
|
780
780
|
return -1;
|
|
781
781
|
}
|
|
782
|
-
var
|
|
783
|
-
function
|
|
782
|
+
var Wr = Array.prototype, Kr = Wr.splice;
|
|
783
|
+
function Xr(t) {
|
|
784
784
|
var e = this.__data__, i = Ue(e, t);
|
|
785
785
|
if (i < 0)
|
|
786
786
|
return !1;
|
|
787
787
|
var r = e.length - 1;
|
|
788
|
-
return i == r ? e.pop() :
|
|
788
|
+
return i == r ? e.pop() : Kr.call(e, i, 1), --this.size, !0;
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function Qr(t) {
|
|
791
791
|
var e = this.__data__, i = Ue(e, t);
|
|
792
792
|
return i < 0 ? void 0 : e[i][1];
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function Zr(t) {
|
|
795
795
|
return Ue(this.__data__, t) > -1;
|
|
796
796
|
}
|
|
797
|
-
function
|
|
797
|
+
function Jr(t, e) {
|
|
798
798
|
var i = this.__data__, r = Ue(i, t);
|
|
799
799
|
return r < 0 ? (++this.size, i.push([t, e])) : i[r][1] = e, this;
|
|
800
800
|
}
|
|
801
|
-
function
|
|
801
|
+
function j(t) {
|
|
802
802
|
var e = -1, i = t == null ? 0 : t.length;
|
|
803
803
|
for (this.clear(); ++e < i; ) {
|
|
804
804
|
var r = t[e];
|
|
805
805
|
this.set(r[0], r[1]);
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
function
|
|
814
|
-
this.__data__ = new
|
|
808
|
+
j.prototype.clear = Yr;
|
|
809
|
+
j.prototype.delete = Xr;
|
|
810
|
+
j.prototype.get = Qr;
|
|
811
|
+
j.prototype.has = Zr;
|
|
812
|
+
j.prototype.set = Jr;
|
|
813
|
+
function es() {
|
|
814
|
+
this.__data__ = new j(), this.size = 0;
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function ts(t) {
|
|
817
817
|
var e = this.__data__, i = e.delete(t);
|
|
818
818
|
return this.size = e.size, i;
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function is(t) {
|
|
821
821
|
return this.__data__.get(t);
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function rs(t) {
|
|
824
824
|
return this.__data__.has(t);
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function _e(t) {
|
|
827
827
|
var e = typeof t;
|
|
828
828
|
return t != null && (e == "object" || e == "function");
|
|
829
829
|
}
|
|
830
|
-
var
|
|
831
|
-
function
|
|
832
|
-
if (!
|
|
830
|
+
var ss = "[object AsyncFunction]", ns = "[object Function]", os = "[object GeneratorFunction]", as = "[object Proxy]";
|
|
831
|
+
function Pi(t) {
|
|
832
|
+
if (!_e(t))
|
|
833
833
|
return !1;
|
|
834
|
-
var e =
|
|
835
|
-
return e ==
|
|
834
|
+
var e = pe(t);
|
|
835
|
+
return e == ns || e == os || e == ss || e == as;
|
|
836
836
|
}
|
|
837
|
-
var ze = R["__core-js_shared__"],
|
|
837
|
+
var ze = R["__core-js_shared__"], Rt = (function() {
|
|
838
838
|
var t = /[^.]+$/.exec(ze && ze.keys && ze.keys.IE_PROTO || "");
|
|
839
839
|
return t ? "Symbol(src)_1." + t : "";
|
|
840
840
|
})();
|
|
841
|
-
function
|
|
842
|
-
return !!
|
|
841
|
+
function ls(t) {
|
|
842
|
+
return !!Rt && Rt in t;
|
|
843
843
|
}
|
|
844
|
-
var
|
|
844
|
+
var ds = Function.prototype, us = ds.toString;
|
|
845
845
|
function te(t) {
|
|
846
846
|
if (t != null) {
|
|
847
847
|
try {
|
|
848
|
-
return
|
|
848
|
+
return us.call(t);
|
|
849
849
|
} catch {
|
|
850
850
|
}
|
|
851
851
|
try {
|
|
@@ -855,48 +855,48 @@ function te(t) {
|
|
|
855
855
|
}
|
|
856
856
|
return "";
|
|
857
857
|
}
|
|
858
|
-
var
|
|
859
|
-
"^" +
|
|
858
|
+
var cs = /[\\^$.*+?()[\]{}|]/g, hs = /^\[object .+?Constructor\]$/, _s = Function.prototype, fs = Object.prototype, ps = _s.toString, gs = fs.hasOwnProperty, ys = RegExp(
|
|
859
|
+
"^" + ps.call(gs).replace(cs, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
860
860
|
);
|
|
861
|
-
function
|
|
862
|
-
if (!
|
|
861
|
+
function ms(t) {
|
|
862
|
+
if (!_e(t) || ls(t))
|
|
863
863
|
return !1;
|
|
864
|
-
var e =
|
|
864
|
+
var e = Pi(t) ? ys : hs;
|
|
865
865
|
return e.test(te(t));
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function bs(t, e) {
|
|
868
868
|
return t?.[e];
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
var i =
|
|
872
|
-
return
|
|
870
|
+
function ge(t, e) {
|
|
871
|
+
var i = bs(t, e);
|
|
872
|
+
return ms(i) ? i : void 0;
|
|
873
873
|
}
|
|
874
|
-
var Be =
|
|
875
|
-
function
|
|
874
|
+
var Be = ge(R, "Map"), Pe = ge(Object, "create");
|
|
875
|
+
function vs() {
|
|
876
876
|
this.__data__ = Pe ? Pe(null) : {}, this.size = 0;
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function Ss(t) {
|
|
879
879
|
var e = this.has(t) && delete this.__data__[t];
|
|
880
880
|
return this.size -= e ? 1 : 0, e;
|
|
881
881
|
}
|
|
882
|
-
var
|
|
883
|
-
function
|
|
882
|
+
var Is = "__lodash_hash_undefined__", Ls = Object.prototype, ws = Ls.hasOwnProperty;
|
|
883
|
+
function Bs(t) {
|
|
884
884
|
var e = this.__data__;
|
|
885
885
|
if (Pe) {
|
|
886
886
|
var i = e[t];
|
|
887
|
-
return i ===
|
|
887
|
+
return i === Is ? void 0 : i;
|
|
888
888
|
}
|
|
889
|
-
return
|
|
889
|
+
return ws.call(e, t) ? e[t] : void 0;
|
|
890
890
|
}
|
|
891
|
-
var
|
|
892
|
-
function
|
|
891
|
+
var Ps = Object.prototype, Fs = Ps.hasOwnProperty;
|
|
892
|
+
function Cs(t) {
|
|
893
893
|
var e = this.__data__;
|
|
894
|
-
return Pe ? e[t] !== void 0 :
|
|
894
|
+
return Pe ? e[t] !== void 0 : Fs.call(e, t);
|
|
895
895
|
}
|
|
896
|
-
var
|
|
897
|
-
function
|
|
896
|
+
var Es = "__lodash_hash_undefined__";
|
|
897
|
+
function xs(t, e) {
|
|
898
898
|
var i = this.__data__;
|
|
899
|
-
return this.size += this.has(t) ? 0 : 1, i[t] = Pe && e === void 0 ?
|
|
899
|
+
return this.size += this.has(t) ? 0 : 1, i[t] = Pe && e === void 0 ? Es : e, this;
|
|
900
900
|
}
|
|
901
901
|
function ee(t) {
|
|
902
902
|
var e = -1, i = t == null ? 0 : t.length;
|
|
@@ -905,459 +905,459 @@ function ee(t) {
|
|
|
905
905
|
this.set(r[0], r[1]);
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
|
-
ee.prototype.clear =
|
|
909
|
-
ee.prototype.delete =
|
|
910
|
-
ee.prototype.get =
|
|
911
|
-
ee.prototype.has =
|
|
912
|
-
ee.prototype.set =
|
|
913
|
-
function
|
|
908
|
+
ee.prototype.clear = vs;
|
|
909
|
+
ee.prototype.delete = Ss;
|
|
910
|
+
ee.prototype.get = Bs;
|
|
911
|
+
ee.prototype.has = Cs;
|
|
912
|
+
ee.prototype.set = xs;
|
|
913
|
+
function Os() {
|
|
914
914
|
this.size = 0, this.__data__ = {
|
|
915
915
|
hash: new ee(),
|
|
916
|
-
map: new (Be ||
|
|
916
|
+
map: new (Be || j)(),
|
|
917
917
|
string: new ee()
|
|
918
918
|
};
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function $s(t) {
|
|
921
921
|
var e = typeof t;
|
|
922
922
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
923
923
|
}
|
|
924
924
|
function je(t, e) {
|
|
925
925
|
var i = t.__data__;
|
|
926
|
-
return
|
|
926
|
+
return $s(e) ? i[typeof e == "string" ? "string" : "hash"] : i.map;
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function Ms(t) {
|
|
929
929
|
var e = je(this, t).delete(t);
|
|
930
930
|
return this.size -= e ? 1 : 0, e;
|
|
931
931
|
}
|
|
932
|
-
function
|
|
932
|
+
function As(t) {
|
|
933
933
|
return je(this, t).get(t);
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function Ts(t) {
|
|
936
936
|
return je(this, t).has(t);
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function ks(t, e) {
|
|
939
939
|
var i = je(this, t), r = i.size;
|
|
940
940
|
return i.set(t, e), this.size += i.size == r ? 0 : 1, this;
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function V(t) {
|
|
943
943
|
var e = -1, i = t == null ? 0 : t.length;
|
|
944
944
|
for (this.clear(); ++e < i; ) {
|
|
945
945
|
var r = t[e];
|
|
946
946
|
this.set(r[0], r[1]);
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
var
|
|
955
|
-
function
|
|
949
|
+
V.prototype.clear = Os;
|
|
950
|
+
V.prototype.delete = Ms;
|
|
951
|
+
V.prototype.get = As;
|
|
952
|
+
V.prototype.has = Ts;
|
|
953
|
+
V.prototype.set = ks;
|
|
954
|
+
var Rs = 200;
|
|
955
|
+
function Ds(t, e) {
|
|
956
956
|
var i = this.__data__;
|
|
957
|
-
if (i instanceof
|
|
957
|
+
if (i instanceof j) {
|
|
958
958
|
var r = i.__data__;
|
|
959
|
-
if (!Be || r.length <
|
|
959
|
+
if (!Be || r.length < Rs - 1)
|
|
960
960
|
return r.push([t, e]), this.size = ++i.size, this;
|
|
961
|
-
i = this.__data__ = new
|
|
961
|
+
i = this.__data__ = new V(r);
|
|
962
962
|
}
|
|
963
963
|
return i.set(t, e), this.size = i.size, this;
|
|
964
964
|
}
|
|
965
|
-
function
|
|
966
|
-
var e = this.__data__ = new
|
|
965
|
+
function N(t) {
|
|
966
|
+
var e = this.__data__ = new j(t);
|
|
967
967
|
this.size = e.size;
|
|
968
968
|
}
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
var
|
|
975
|
-
function
|
|
976
|
-
return this.__data__.set(t,
|
|
969
|
+
N.prototype.clear = es;
|
|
970
|
+
N.prototype.delete = ts;
|
|
971
|
+
N.prototype.get = is;
|
|
972
|
+
N.prototype.has = rs;
|
|
973
|
+
N.prototype.set = Ds;
|
|
974
|
+
var Hs = "__lodash_hash_undefined__";
|
|
975
|
+
function Ns(t) {
|
|
976
|
+
return this.__data__.set(t, Hs), this;
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Us(t) {
|
|
979
979
|
return this.__data__.has(t);
|
|
980
980
|
}
|
|
981
981
|
function Fe(t) {
|
|
982
982
|
var e = -1, i = t == null ? 0 : t.length;
|
|
983
|
-
for (this.__data__ = new
|
|
983
|
+
for (this.__data__ = new V(); ++e < i; )
|
|
984
984
|
this.add(t[e]);
|
|
985
985
|
}
|
|
986
|
-
Fe.prototype.add = Fe.prototype.push =
|
|
987
|
-
Fe.prototype.has =
|
|
988
|
-
function
|
|
986
|
+
Fe.prototype.add = Fe.prototype.push = Ns;
|
|
987
|
+
Fe.prototype.has = Us;
|
|
988
|
+
function js(t, e) {
|
|
989
989
|
for (var i = -1, r = t == null ? 0 : t.length; ++i < r; )
|
|
990
990
|
if (e(t[i], i, t))
|
|
991
991
|
return !0;
|
|
992
992
|
return !1;
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function Fi(t, e) {
|
|
995
995
|
return t.has(e);
|
|
996
996
|
}
|
|
997
|
-
var
|
|
998
|
-
function
|
|
999
|
-
var o = i &
|
|
997
|
+
var Vs = 1, qs = 2;
|
|
998
|
+
function Ci(t, e, i, r, n, s) {
|
|
999
|
+
var o = i & Vs, a = t.length, l = e.length;
|
|
1000
1000
|
if (a != l && !(o && l > a))
|
|
1001
1001
|
return !1;
|
|
1002
|
-
var d =
|
|
1002
|
+
var d = s.get(t), u = s.get(e);
|
|
1003
1003
|
if (d && u)
|
|
1004
1004
|
return d == e && u == t;
|
|
1005
|
-
var
|
|
1006
|
-
for (
|
|
1007
|
-
var p = t[
|
|
1005
|
+
var h = -1, c = !0, f = i & qs ? new Fe() : void 0;
|
|
1006
|
+
for (s.set(t, e), s.set(e, t); ++h < a; ) {
|
|
1007
|
+
var p = t[h], _ = e[h];
|
|
1008
1008
|
if (r)
|
|
1009
|
-
var g = o ? r(_, p,
|
|
1009
|
+
var g = o ? r(_, p, h, e, t, s) : r(p, _, h, t, e, s);
|
|
1010
1010
|
if (g !== void 0) {
|
|
1011
1011
|
if (g)
|
|
1012
1012
|
continue;
|
|
1013
|
-
|
|
1013
|
+
c = !1;
|
|
1014
1014
|
break;
|
|
1015
1015
|
}
|
|
1016
1016
|
if (f) {
|
|
1017
|
-
if (!
|
|
1018
|
-
if (!
|
|
1017
|
+
if (!js(e, function(y, v) {
|
|
1018
|
+
if (!Fi(f, v) && (p === y || n(p, y, i, r, s)))
|
|
1019
1019
|
return f.push(v);
|
|
1020
1020
|
})) {
|
|
1021
|
-
|
|
1021
|
+
c = !1;
|
|
1022
1022
|
break;
|
|
1023
1023
|
}
|
|
1024
|
-
} else if (!(p === _ ||
|
|
1025
|
-
|
|
1024
|
+
} else if (!(p === _ || n(p, _, i, r, s))) {
|
|
1025
|
+
c = !1;
|
|
1026
1026
|
break;
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
|
-
return
|
|
1029
|
+
return s.delete(t), s.delete(e), c;
|
|
1030
1030
|
}
|
|
1031
|
-
var
|
|
1032
|
-
function
|
|
1031
|
+
var Dt = R.Uint8Array;
|
|
1032
|
+
function zs(t) {
|
|
1033
1033
|
var e = -1, i = Array(t.size);
|
|
1034
|
-
return t.forEach(function(r,
|
|
1035
|
-
i[++e] = [
|
|
1034
|
+
return t.forEach(function(r, n) {
|
|
1035
|
+
i[++e] = [n, r];
|
|
1036
1036
|
}), i;
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1038
|
+
function Lt(t) {
|
|
1039
1039
|
var e = -1, i = Array(t.size);
|
|
1040
1040
|
return t.forEach(function(r) {
|
|
1041
1041
|
i[++e] = r;
|
|
1042
1042
|
}), i;
|
|
1043
1043
|
}
|
|
1044
|
-
var
|
|
1045
|
-
function
|
|
1044
|
+
var Gs = 1, Ys = 2, Ws = "[object Boolean]", Ks = "[object Date]", Xs = "[object Error]", Qs = "[object Map]", Zs = "[object Number]", Js = "[object RegExp]", en = "[object Set]", tn = "[object String]", rn = "[object Symbol]", sn = "[object ArrayBuffer]", nn = "[object DataView]", Ht = Y ? Y.prototype : void 0, Ge = Ht ? Ht.valueOf : void 0;
|
|
1045
|
+
function on(t, e, i, r, n, s, o) {
|
|
1046
1046
|
switch (i) {
|
|
1047
|
-
case
|
|
1047
|
+
case nn:
|
|
1048
1048
|
if (t.byteLength != e.byteLength || t.byteOffset != e.byteOffset)
|
|
1049
1049
|
return !1;
|
|
1050
1050
|
t = t.buffer, e = e.buffer;
|
|
1051
|
-
case
|
|
1052
|
-
return !(t.byteLength != e.byteLength || !
|
|
1053
|
-
case
|
|
1054
|
-
case
|
|
1055
|
-
case
|
|
1056
|
-
return
|
|
1057
|
-
case
|
|
1051
|
+
case sn:
|
|
1052
|
+
return !(t.byteLength != e.byteLength || !s(new Dt(t), new Dt(e)));
|
|
1053
|
+
case Ws:
|
|
1054
|
+
case Ks:
|
|
1055
|
+
case Zs:
|
|
1056
|
+
return Bi(+t, +e);
|
|
1057
|
+
case Xs:
|
|
1058
1058
|
return t.name == e.name && t.message == e.message;
|
|
1059
|
-
case
|
|
1060
|
-
case
|
|
1059
|
+
case Js:
|
|
1060
|
+
case tn:
|
|
1061
1061
|
return t == e + "";
|
|
1062
|
-
case
|
|
1063
|
-
var a =
|
|
1064
|
-
case
|
|
1065
|
-
var l = r &
|
|
1066
|
-
if (a || (a =
|
|
1062
|
+
case Qs:
|
|
1063
|
+
var a = zs;
|
|
1064
|
+
case en:
|
|
1065
|
+
var l = r & Gs;
|
|
1066
|
+
if (a || (a = Lt), t.size != e.size && !l)
|
|
1067
1067
|
return !1;
|
|
1068
1068
|
var d = o.get(t);
|
|
1069
1069
|
if (d)
|
|
1070
1070
|
return d == e;
|
|
1071
|
-
r |=
|
|
1072
|
-
var u =
|
|
1071
|
+
r |= Ys, o.set(t, e);
|
|
1072
|
+
var u = Ci(a(t), a(e), r, n, s, o);
|
|
1073
1073
|
return o.delete(t), u;
|
|
1074
|
-
case
|
|
1074
|
+
case rn:
|
|
1075
1075
|
if (Ge)
|
|
1076
1076
|
return Ge.call(t) == Ge.call(e);
|
|
1077
1077
|
}
|
|
1078
1078
|
return !1;
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1081
|
-
for (var i = -1, r = e.length,
|
|
1082
|
-
t[
|
|
1080
|
+
function an(t, e) {
|
|
1081
|
+
for (var i = -1, r = e.length, n = t.length; ++i < r; )
|
|
1082
|
+
t[n + i] = e[i];
|
|
1083
1083
|
return t;
|
|
1084
1084
|
}
|
|
1085
|
-
var
|
|
1086
|
-
function
|
|
1085
|
+
var U = Array.isArray;
|
|
1086
|
+
function ln(t, e, i) {
|
|
1087
1087
|
var r = e(t);
|
|
1088
|
-
return
|
|
1088
|
+
return U(t) ? r : an(r, i(t));
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1091
|
-
for (var i = -1, r = t == null ? 0 : t.length,
|
|
1090
|
+
function dn(t, e) {
|
|
1091
|
+
for (var i = -1, r = t == null ? 0 : t.length, n = 0, s = []; ++i < r; ) {
|
|
1092
1092
|
var o = t[i];
|
|
1093
|
-
e(o, i, t) && (n
|
|
1093
|
+
e(o, i, t) && (s[n++] = o);
|
|
1094
1094
|
}
|
|
1095
|
-
return
|
|
1095
|
+
return s;
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1097
|
+
function un() {
|
|
1098
1098
|
return [];
|
|
1099
1099
|
}
|
|
1100
|
-
var
|
|
1101
|
-
return t == null ? [] : (t = Object(t),
|
|
1102
|
-
return
|
|
1100
|
+
var cn = Object.prototype, hn = cn.propertyIsEnumerable, Nt = Object.getOwnPropertySymbols, _n = Nt ? function(t) {
|
|
1101
|
+
return t == null ? [] : (t = Object(t), dn(Nt(t), function(e) {
|
|
1102
|
+
return hn.call(t, e);
|
|
1103
1103
|
}));
|
|
1104
|
-
} :
|
|
1105
|
-
function
|
|
1104
|
+
} : un;
|
|
1105
|
+
function fn(t, e) {
|
|
1106
1106
|
for (var i = -1, r = Array(t); ++i < t; )
|
|
1107
1107
|
r[i] = e(i);
|
|
1108
1108
|
return r;
|
|
1109
1109
|
}
|
|
1110
|
-
var
|
|
1111
|
-
function
|
|
1112
|
-
return
|
|
1110
|
+
var pn = "[object Arguments]";
|
|
1111
|
+
function Ut(t) {
|
|
1112
|
+
return he(t) && pe(t) == pn;
|
|
1113
1113
|
}
|
|
1114
|
-
var
|
|
1114
|
+
var Ei = Object.prototype, gn = Ei.hasOwnProperty, yn = Ei.propertyIsEnumerable, xi = Ut(/* @__PURE__ */ (function() {
|
|
1115
1115
|
return arguments;
|
|
1116
|
-
})()) ?
|
|
1117
|
-
return
|
|
1116
|
+
})()) ? Ut : function(t) {
|
|
1117
|
+
return he(t) && gn.call(t, "callee") && !yn.call(t, "callee");
|
|
1118
1118
|
};
|
|
1119
|
-
function
|
|
1119
|
+
function mn() {
|
|
1120
1120
|
return !1;
|
|
1121
1121
|
}
|
|
1122
|
-
var
|
|
1123
|
-
function
|
|
1122
|
+
var Oi = typeof exports == "object" && exports && !exports.nodeType && exports, jt = Oi && typeof module == "object" && module && !module.nodeType && module, bn = jt && jt.exports === Oi, Vt = bn ? R.Buffer : void 0, vn = Vt ? Vt.isBuffer : void 0, lt = vn || mn, Sn = 9007199254740991, In = /^(?:0|[1-9]\d*)$/;
|
|
1123
|
+
function $i(t, e) {
|
|
1124
1124
|
var i = typeof t;
|
|
1125
|
-
return e = e ??
|
|
1125
|
+
return e = e ?? Sn, !!e && (i == "number" || i != "symbol" && In.test(t)) && t > -1 && t % 1 == 0 && t < e;
|
|
1126
1126
|
}
|
|
1127
|
-
var
|
|
1127
|
+
var Ln = 9007199254740991;
|
|
1128
1128
|
function wt(t) {
|
|
1129
|
-
return typeof t == "number" && t > -1 && t % 1 == 0 && t <=
|
|
1129
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= Ln;
|
|
1130
1130
|
}
|
|
1131
|
-
var
|
|
1132
|
-
S[
|
|
1133
|
-
S[
|
|
1134
|
-
function
|
|
1135
|
-
return
|
|
1131
|
+
var wn = "[object Arguments]", Bn = "[object Array]", Pn = "[object Boolean]", Fn = "[object Date]", Cn = "[object Error]", En = "[object Function]", xn = "[object Map]", On = "[object Number]", $n = "[object Object]", Mn = "[object RegExp]", An = "[object Set]", Tn = "[object String]", kn = "[object WeakMap]", Rn = "[object ArrayBuffer]", Dn = "[object DataView]", Hn = "[object Float32Array]", Nn = "[object Float64Array]", Un = "[object Int8Array]", jn = "[object Int16Array]", Vn = "[object Int32Array]", qn = "[object Uint8Array]", zn = "[object Uint8ClampedArray]", Gn = "[object Uint16Array]", Yn = "[object Uint32Array]", S = {};
|
|
1132
|
+
S[Hn] = S[Nn] = S[Un] = S[jn] = S[Vn] = S[qn] = S[zn] = S[Gn] = S[Yn] = !0;
|
|
1133
|
+
S[wn] = S[Bn] = S[Rn] = S[Pn] = S[Dn] = S[Fn] = S[Cn] = S[En] = S[xn] = S[On] = S[$n] = S[Mn] = S[An] = S[Tn] = S[kn] = !1;
|
|
1134
|
+
function Wn(t) {
|
|
1135
|
+
return he(t) && wt(t.length) && !!S[pe(t)];
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1137
|
+
function Kn(t) {
|
|
1138
1138
|
return function(e) {
|
|
1139
1139
|
return t(e);
|
|
1140
1140
|
};
|
|
1141
1141
|
}
|
|
1142
|
-
var
|
|
1142
|
+
var Mi = typeof exports == "object" && exports && !exports.nodeType && exports, we = Mi && typeof module == "object" && module && !module.nodeType && module, Xn = we && we.exports === Mi, Ye = Xn && Li.process, qt = (function() {
|
|
1143
1143
|
try {
|
|
1144
1144
|
var t = we && we.require && we.require("util").types;
|
|
1145
1145
|
return t || Ye && Ye.binding && Ye.binding("util");
|
|
1146
1146
|
} catch {
|
|
1147
1147
|
}
|
|
1148
|
-
})(),
|
|
1149
|
-
function
|
|
1150
|
-
var i =
|
|
1148
|
+
})(), zt = qt && qt.isTypedArray, Ai = zt ? Kn(zt) : Wn, Qn = Object.prototype, Zn = Qn.hasOwnProperty;
|
|
1149
|
+
function Jn(t, e) {
|
|
1150
|
+
var i = U(t), r = !i && xi(t), n = !i && !r && lt(t), s = !i && !r && !n && Ai(t), o = i || r || n || s, a = o ? fn(t.length, String) : [], l = a.length;
|
|
1151
1151
|
for (var d in t)
|
|
1152
|
-
|
|
1152
|
+
Zn.call(t, d) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1153
1153
|
(d == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1154
|
+
n && (d == "offset" || d == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
1155
|
+
s && (d == "buffer" || d == "byteLength" || d == "byteOffset") || // Skip index properties.
|
|
1156
|
+
$i(d, l))) && a.push(d);
|
|
1157
1157
|
return a;
|
|
1158
1158
|
}
|
|
1159
|
-
var
|
|
1160
|
-
function
|
|
1161
|
-
var e = t && t.constructor, i = typeof e == "function" && e.prototype ||
|
|
1159
|
+
var eo = Object.prototype;
|
|
1160
|
+
function to(t) {
|
|
1161
|
+
var e = t && t.constructor, i = typeof e == "function" && e.prototype || eo;
|
|
1162
1162
|
return t === i;
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function io(t, e) {
|
|
1165
1165
|
return function(i) {
|
|
1166
1166
|
return t(e(i));
|
|
1167
1167
|
};
|
|
1168
1168
|
}
|
|
1169
|
-
var
|
|
1170
|
-
function
|
|
1171
|
-
if (!
|
|
1172
|
-
return
|
|
1169
|
+
var ro = io(Object.keys, Object), so = Object.prototype, no = so.hasOwnProperty;
|
|
1170
|
+
function oo(t) {
|
|
1171
|
+
if (!to(t))
|
|
1172
|
+
return ro(t);
|
|
1173
1173
|
var e = [];
|
|
1174
1174
|
for (var i in Object(t))
|
|
1175
|
-
|
|
1175
|
+
no.call(t, i) && i != "constructor" && e.push(i);
|
|
1176
1176
|
return e;
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1179
|
-
return t != null && wt(t.length) && !
|
|
1178
|
+
function ao(t) {
|
|
1179
|
+
return t != null && wt(t.length) && !Pi(t);
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1182
|
-
return
|
|
1181
|
+
function Ti(t) {
|
|
1182
|
+
return ao(t) ? Jn(t) : oo(t);
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1185
|
-
return
|
|
1184
|
+
function Gt(t) {
|
|
1185
|
+
return ln(t, Ti, _n);
|
|
1186
1186
|
}
|
|
1187
|
-
var
|
|
1188
|
-
function
|
|
1189
|
-
var o = i &
|
|
1187
|
+
var lo = 1, uo = Object.prototype, co = uo.hasOwnProperty;
|
|
1188
|
+
function ho(t, e, i, r, n, s) {
|
|
1189
|
+
var o = i & lo, a = Gt(t), l = a.length, d = Gt(e), u = d.length;
|
|
1190
1190
|
if (l != u && !o)
|
|
1191
1191
|
return !1;
|
|
1192
|
-
for (var
|
|
1193
|
-
var
|
|
1194
|
-
if (!(o ?
|
|
1192
|
+
for (var h = l; h--; ) {
|
|
1193
|
+
var c = a[h];
|
|
1194
|
+
if (!(o ? c in e : co.call(e, c)))
|
|
1195
1195
|
return !1;
|
|
1196
1196
|
}
|
|
1197
|
-
var f =
|
|
1197
|
+
var f = s.get(t), p = s.get(e);
|
|
1198
1198
|
if (f && p)
|
|
1199
1199
|
return f == e && p == t;
|
|
1200
1200
|
var _ = !0;
|
|
1201
|
-
|
|
1202
|
-
for (var g = o; ++
|
|
1203
|
-
|
|
1204
|
-
var y = t[
|
|
1201
|
+
s.set(t, e), s.set(e, t);
|
|
1202
|
+
for (var g = o; ++h < l; ) {
|
|
1203
|
+
c = a[h];
|
|
1204
|
+
var y = t[c], v = e[c];
|
|
1205
1205
|
if (r)
|
|
1206
|
-
var B = o ? r(v, y,
|
|
1207
|
-
if (!(B === void 0 ? y === v ||
|
|
1206
|
+
var B = o ? r(v, y, c, e, t, s) : r(y, v, c, t, e, s);
|
|
1207
|
+
if (!(B === void 0 ? y === v || n(y, v, i, r, s) : B)) {
|
|
1208
1208
|
_ = !1;
|
|
1209
1209
|
break;
|
|
1210
1210
|
}
|
|
1211
|
-
g || (g =
|
|
1211
|
+
g || (g = c == "constructor");
|
|
1212
1212
|
}
|
|
1213
1213
|
if (_ && !g) {
|
|
1214
1214
|
var C = t.constructor, w = e.constructor;
|
|
1215
1215
|
C != w && "constructor" in t && "constructor" in e && !(typeof C == "function" && C instanceof C && typeof w == "function" && w instanceof w) && (_ = !1);
|
|
1216
1216
|
}
|
|
1217
|
-
return
|
|
1217
|
+
return s.delete(t), s.delete(e), _;
|
|
1218
1218
|
}
|
|
1219
|
-
var dt =
|
|
1220
|
-
(dt &&
|
|
1221
|
-
var e =
|
|
1219
|
+
var dt = ge(R, "DataView"), ut = ge(R, "Promise"), ce = ge(R, "Set"), ct = ge(R, "WeakMap"), Yt = "[object Map]", _o = "[object Object]", Wt = "[object Promise]", Kt = "[object Set]", Xt = "[object WeakMap]", Qt = "[object DataView]", fo = te(dt), po = te(Be), go = te(ut), yo = te(ce), mo = te(ct), z = pe;
|
|
1220
|
+
(dt && z(new dt(new ArrayBuffer(1))) != Qt || Be && z(new Be()) != Yt || ut && z(ut.resolve()) != Wt || ce && z(new ce()) != Kt || ct && z(new ct()) != Xt) && (z = function(t) {
|
|
1221
|
+
var e = pe(t), i = e == _o ? t.constructor : void 0, r = i ? te(i) : "";
|
|
1222
1222
|
if (r)
|
|
1223
1223
|
switch (r) {
|
|
1224
|
-
case ho:
|
|
1225
|
-
return Xt;
|
|
1226
|
-
case _o:
|
|
1227
|
-
return Gt;
|
|
1228
1224
|
case fo:
|
|
1229
|
-
return
|
|
1225
|
+
return Qt;
|
|
1230
1226
|
case po:
|
|
1231
|
-
return
|
|
1227
|
+
return Yt;
|
|
1232
1228
|
case go:
|
|
1229
|
+
return Wt;
|
|
1230
|
+
case yo:
|
|
1233
1231
|
return Kt;
|
|
1232
|
+
case mo:
|
|
1233
|
+
return Xt;
|
|
1234
1234
|
}
|
|
1235
1235
|
return e;
|
|
1236
1236
|
});
|
|
1237
|
-
var
|
|
1238
|
-
function
|
|
1239
|
-
var o =
|
|
1240
|
-
l = l ==
|
|
1241
|
-
var u = l == Oe,
|
|
1242
|
-
if (
|
|
1237
|
+
var bo = 1, Zt = "[object Arguments]", Jt = "[object Array]", Oe = "[object Object]", vo = Object.prototype, ei = vo.hasOwnProperty;
|
|
1238
|
+
function So(t, e, i, r, n, s) {
|
|
1239
|
+
var o = U(t), a = U(e), l = o ? Jt : z(t), d = a ? Jt : z(e);
|
|
1240
|
+
l = l == Zt ? Oe : l, d = d == Zt ? Oe : d;
|
|
1241
|
+
var u = l == Oe, h = d == Oe, c = l == d;
|
|
1242
|
+
if (c && lt(t)) {
|
|
1243
1243
|
if (!lt(e))
|
|
1244
1244
|
return !1;
|
|
1245
1245
|
o = !0, u = !1;
|
|
1246
1246
|
}
|
|
1247
|
-
if (
|
|
1248
|
-
return
|
|
1249
|
-
if (!(i &
|
|
1250
|
-
var f = u &&
|
|
1247
|
+
if (c && !u)
|
|
1248
|
+
return s || (s = new N()), o || Ai(t) ? Ci(t, e, i, r, n, s) : on(t, e, l, i, r, n, s);
|
|
1249
|
+
if (!(i & bo)) {
|
|
1250
|
+
var f = u && ei.call(t, "__wrapped__"), p = h && ei.call(e, "__wrapped__");
|
|
1251
1251
|
if (f || p) {
|
|
1252
1252
|
var _ = f ? t.value() : t, g = p ? e.value() : e;
|
|
1253
|
-
return
|
|
1253
|
+
return s || (s = new N()), n(_, g, i, r, s);
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
|
-
return
|
|
1256
|
+
return c ? (s || (s = new N()), ho(t, e, i, r, n, s)) : !1;
|
|
1257
1257
|
}
|
|
1258
|
-
function Bt(t, e, i, r,
|
|
1259
|
-
return t === e ? !0 : t == null || e == null || !
|
|
1258
|
+
function Bt(t, e, i, r, n) {
|
|
1259
|
+
return t === e ? !0 : t == null || e == null || !he(t) && !he(e) ? t !== t && e !== e : So(t, e, i, r, Bt, n);
|
|
1260
1260
|
}
|
|
1261
|
-
var
|
|
1262
|
-
function
|
|
1263
|
-
var
|
|
1261
|
+
var Io = 1, Lo = 2;
|
|
1262
|
+
function wo(t, e, i, r) {
|
|
1263
|
+
var n = i.length, s = n;
|
|
1264
1264
|
if (t == null)
|
|
1265
|
-
return !
|
|
1266
|
-
for (t = Object(t);
|
|
1267
|
-
var o = i[
|
|
1265
|
+
return !s;
|
|
1266
|
+
for (t = Object(t); n--; ) {
|
|
1267
|
+
var o = i[n];
|
|
1268
1268
|
if (o[2] ? o[1] !== t[o[0]] : !(o[0] in t))
|
|
1269
1269
|
return !1;
|
|
1270
1270
|
}
|
|
1271
|
-
for (; ++
|
|
1272
|
-
o = i[
|
|
1271
|
+
for (; ++n < s; ) {
|
|
1272
|
+
o = i[n];
|
|
1273
1273
|
var a = o[0], l = t[a], d = o[1];
|
|
1274
1274
|
if (o[2]) {
|
|
1275
1275
|
if (l === void 0 && !(a in t))
|
|
1276
1276
|
return !1;
|
|
1277
1277
|
} else {
|
|
1278
|
-
var u = new
|
|
1279
|
-
if (!(
|
|
1278
|
+
var u = new N(), h;
|
|
1279
|
+
if (!(h === void 0 ? Bt(d, l, Io | Lo, r, u) : h))
|
|
1280
1280
|
return !1;
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
1283
|
return !0;
|
|
1284
1284
|
}
|
|
1285
|
-
function
|
|
1286
|
-
return t === t && !
|
|
1285
|
+
function ki(t) {
|
|
1286
|
+
return t === t && !_e(t);
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1289
|
-
for (var e =
|
|
1290
|
-
var r = e[i],
|
|
1291
|
-
e[i] = [r,
|
|
1288
|
+
function Bo(t) {
|
|
1289
|
+
for (var e = Ti(t), i = e.length; i--; ) {
|
|
1290
|
+
var r = e[i], n = t[r];
|
|
1291
|
+
e[i] = [r, n, ki(n)];
|
|
1292
1292
|
}
|
|
1293
1293
|
return e;
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function Ri(t, e) {
|
|
1296
1296
|
return function(i) {
|
|
1297
1297
|
return i == null ? !1 : i[t] === e && (e !== void 0 || t in Object(i));
|
|
1298
1298
|
};
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1301
|
-
var e =
|
|
1302
|
-
return e.length == 1 && e[0][2] ?
|
|
1303
|
-
return i === t ||
|
|
1300
|
+
function Po(t) {
|
|
1301
|
+
var e = Bo(t);
|
|
1302
|
+
return e.length == 1 && e[0][2] ? Ri(e[0][0], e[0][1]) : function(i) {
|
|
1303
|
+
return i === t || wo(i, t, e);
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
|
-
var
|
|
1306
|
+
var Fo = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Co = /^\w*$/;
|
|
1307
1307
|
function Pt(t, e) {
|
|
1308
|
-
if (
|
|
1308
|
+
if (U(t))
|
|
1309
1309
|
return !1;
|
|
1310
1310
|
var i = typeof t;
|
|
1311
|
-
return i == "number" || i == "symbol" || i == "boolean" || t == null || Ce(t) ? !0 :
|
|
1311
|
+
return i == "number" || i == "symbol" || i == "boolean" || t == null || Ce(t) ? !0 : Co.test(t) || !Fo.test(t) || e != null && t in Object(e);
|
|
1312
1312
|
}
|
|
1313
|
-
var
|
|
1313
|
+
var Eo = "Expected a function";
|
|
1314
1314
|
function Ft(t, e) {
|
|
1315
1315
|
if (typeof t != "function" || e != null && typeof e != "function")
|
|
1316
|
-
throw new TypeError(
|
|
1316
|
+
throw new TypeError(Eo);
|
|
1317
1317
|
var i = function() {
|
|
1318
|
-
var r = arguments,
|
|
1319
|
-
if (
|
|
1320
|
-
return
|
|
1318
|
+
var r = arguments, n = e ? e.apply(this, r) : r[0], s = i.cache;
|
|
1319
|
+
if (s.has(n))
|
|
1320
|
+
return s.get(n);
|
|
1321
1321
|
var o = t.apply(this, r);
|
|
1322
|
-
return i.cache =
|
|
1322
|
+
return i.cache = s.set(n, o) || s, o;
|
|
1323
1323
|
};
|
|
1324
|
-
return i.cache = new (Ft.Cache ||
|
|
1324
|
+
return i.cache = new (Ft.Cache || V)(), i;
|
|
1325
1325
|
}
|
|
1326
|
-
Ft.Cache =
|
|
1327
|
-
var
|
|
1328
|
-
function
|
|
1326
|
+
Ft.Cache = V;
|
|
1327
|
+
var xo = 500;
|
|
1328
|
+
function Oo(t) {
|
|
1329
1329
|
var e = Ft(t, function(r) {
|
|
1330
|
-
return i.size ===
|
|
1330
|
+
return i.size === xo && i.clear(), r;
|
|
1331
1331
|
}), i = e.cache;
|
|
1332
1332
|
return e;
|
|
1333
1333
|
}
|
|
1334
|
-
var
|
|
1334
|
+
var $o = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Mo = /\\(\\)?/g, Ao = Oo(function(t) {
|
|
1335
1335
|
var e = [];
|
|
1336
|
-
return t.charCodeAt(0) === 46 && e.push(""), t.replace(
|
|
1337
|
-
e.push(
|
|
1336
|
+
return t.charCodeAt(0) === 46 && e.push(""), t.replace($o, function(i, r, n, s) {
|
|
1337
|
+
e.push(n ? s.replace(Mo, "$1") : r || i);
|
|
1338
1338
|
}), e;
|
|
1339
1339
|
});
|
|
1340
|
-
function
|
|
1341
|
-
for (var i = -1, r = t == null ? 0 : t.length,
|
|
1342
|
-
|
|
1343
|
-
return
|
|
1340
|
+
function To(t, e) {
|
|
1341
|
+
for (var i = -1, r = t == null ? 0 : t.length, n = Array(r); ++i < r; )
|
|
1342
|
+
n[i] = e(t[i], i, t);
|
|
1343
|
+
return n;
|
|
1344
1344
|
}
|
|
1345
|
-
var
|
|
1346
|
-
function
|
|
1345
|
+
var ti = Y ? Y.prototype : void 0, ii = ti ? ti.toString : void 0;
|
|
1346
|
+
function Di(t) {
|
|
1347
1347
|
if (typeof t == "string")
|
|
1348
1348
|
return t;
|
|
1349
|
-
if (
|
|
1350
|
-
return
|
|
1349
|
+
if (U(t))
|
|
1350
|
+
return To(t, Di) + "";
|
|
1351
1351
|
if (Ce(t))
|
|
1352
|
-
return
|
|
1352
|
+
return ii ? ii.call(t) : "";
|
|
1353
1353
|
var e = t + "";
|
|
1354
1354
|
return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1357
|
-
return t == null ? "" :
|
|
1356
|
+
function Hi(t) {
|
|
1357
|
+
return t == null ? "" : Di(t);
|
|
1358
1358
|
}
|
|
1359
|
-
function
|
|
1360
|
-
return
|
|
1359
|
+
function Ni(t, e) {
|
|
1360
|
+
return U(t) ? t : Pt(t, e) ? [t] : Ao(Hi(t));
|
|
1361
1361
|
}
|
|
1362
1362
|
function Ve(t) {
|
|
1363
1363
|
if (typeof t == "string" || Ce(t))
|
|
@@ -1365,76 +1365,76 @@ function Ve(t) {
|
|
|
1365
1365
|
var e = t + "";
|
|
1366
1366
|
return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
|
|
1367
1367
|
}
|
|
1368
|
-
function
|
|
1369
|
-
e =
|
|
1368
|
+
function Ui(t, e) {
|
|
1369
|
+
e = Ni(e, t);
|
|
1370
1370
|
for (var i = 0, r = e.length; t != null && i < r; )
|
|
1371
1371
|
t = t[Ve(e[i++])];
|
|
1372
1372
|
return i && i == r ? t : void 0;
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1375
|
-
var r = t == null ? void 0 :
|
|
1374
|
+
function ko(t, e, i) {
|
|
1375
|
+
var r = t == null ? void 0 : Ui(t, e);
|
|
1376
1376
|
return r === void 0 ? i : r;
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1378
|
+
function Ro(t, e) {
|
|
1379
1379
|
return t != null && e in Object(t);
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1382
|
-
e =
|
|
1383
|
-
for (var r = -1,
|
|
1381
|
+
function Do(t, e, i) {
|
|
1382
|
+
e = Ni(e, t);
|
|
1383
|
+
for (var r = -1, n = e.length, s = !1; ++r < n; ) {
|
|
1384
1384
|
var o = Ve(e[r]);
|
|
1385
|
-
if (!(
|
|
1385
|
+
if (!(s = t != null && i(t, o)))
|
|
1386
1386
|
break;
|
|
1387
1387
|
t = t[o];
|
|
1388
1388
|
}
|
|
1389
|
-
return
|
|
1389
|
+
return s || ++r != n ? s : (n = t == null ? 0 : t.length, !!n && wt(n) && $i(o, n) && (U(t) || xi(t)));
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1392
|
-
return t != null &&
|
|
1391
|
+
function Ho(t, e) {
|
|
1392
|
+
return t != null && Do(t, e, Ro);
|
|
1393
1393
|
}
|
|
1394
|
-
var
|
|
1395
|
-
function
|
|
1396
|
-
return Pt(t) &&
|
|
1397
|
-
var r =
|
|
1398
|
-
return r === void 0 && r === e ?
|
|
1394
|
+
var No = 1, Uo = 2;
|
|
1395
|
+
function jo(t, e) {
|
|
1396
|
+
return Pt(t) && ki(e) ? Ri(Ve(t), e) : function(i) {
|
|
1397
|
+
var r = ko(i, t);
|
|
1398
|
+
return r === void 0 && r === e ? Ho(i, t) : Bt(e, r, No | Uo);
|
|
1399
1399
|
};
|
|
1400
1400
|
}
|
|
1401
|
-
function
|
|
1401
|
+
function Vo(t) {
|
|
1402
1402
|
return t;
|
|
1403
1403
|
}
|
|
1404
|
-
function
|
|
1404
|
+
function qo(t) {
|
|
1405
1405
|
return function(e) {
|
|
1406
1406
|
return e?.[t];
|
|
1407
1407
|
};
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1409
|
+
function zo(t) {
|
|
1410
1410
|
return function(e) {
|
|
1411
|
-
return
|
|
1411
|
+
return Ui(e, t);
|
|
1412
1412
|
};
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1415
|
-
return Pt(t) ?
|
|
1414
|
+
function Go(t) {
|
|
1415
|
+
return Pt(t) ? qo(Ve(t)) : zo(t);
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1418
|
-
return typeof t == "function" ? t : t == null ?
|
|
1417
|
+
function ji(t) {
|
|
1418
|
+
return typeof t == "function" ? t : t == null ? Vo : typeof t == "object" ? U(t) ? jo(t[0], t[1]) : Po(t) : Go(t);
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function Yo(t, e) {
|
|
1421
1421
|
return t < e;
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1424
|
-
return t && t.length ?
|
|
1423
|
+
function Wo(t, e) {
|
|
1424
|
+
return t && t.length ? Gr(t, ji(e), Yo) : void 0;
|
|
1425
1425
|
}
|
|
1426
|
-
class
|
|
1426
|
+
class Ko {
|
|
1427
1427
|
_isMaskMode;
|
|
1428
1428
|
_hiddenBuildings;
|
|
1429
1429
|
_history;
|
|
1430
1430
|
constructor(e) {
|
|
1431
|
-
this._isMaskMode = e, this._hiddenBuildings = [], this._history =
|
|
1431
|
+
this._isMaskMode = e, this._hiddenBuildings = [], this._history = G.getInstance();
|
|
1432
1432
|
}
|
|
1433
1433
|
getLayeredData(e) {
|
|
1434
|
-
const { selectedVenueId: i, venueMap: r, buildingMap:
|
|
1434
|
+
const { selectedVenueId: i, venueMap: r, buildingMap: n, sharedFloorMap: s } = e, o = [], a = [], l = [], d = [], u = [], h = [], c = [...r.values()], f = i ? [
|
|
1435
1435
|
r.get(i),
|
|
1436
|
-
...
|
|
1437
|
-
] :
|
|
1436
|
+
...c.filter((p) => p.properties.id !== i)
|
|
1437
|
+
] : c;
|
|
1438
1438
|
for (const p of f) {
|
|
1439
1439
|
if (!p || !p.properties) continue;
|
|
1440
1440
|
const {
|
|
@@ -1444,7 +1444,7 @@ class Yo {
|
|
|
1444
1444
|
shared_level_ids: v,
|
|
1445
1445
|
default_displayed_ordinal: B,
|
|
1446
1446
|
default_displayed_building: C
|
|
1447
|
-
} = p.properties, w = _ === i, b =
|
|
1447
|
+
} = p.properties, w = _ === i, b = Zo(g), E = L(y), x = this._history.getHistoryOrdinal(_);
|
|
1448
1448
|
let P = x ?? B;
|
|
1449
1449
|
if (P)
|
|
1450
1450
|
x || (this._history.setHistoryOrdinal(_, P), this._history.setHistoryBuildingUnit(_, {
|
|
@@ -1452,15 +1452,15 @@ class Yo {
|
|
|
1452
1452
|
type: "building"
|
|
1453
1453
|
}));
|
|
1454
1454
|
else {
|
|
1455
|
-
const { ordinal:
|
|
1456
|
-
if (!
|
|
1457
|
-
P =
|
|
1455
|
+
const { ordinal: I, buildingId: T } = Xo(E, n);
|
|
1456
|
+
if (!I) continue;
|
|
1457
|
+
P = I, this._history.setHistoryOrdinal(_, P), this._history.setHistoryBuildingUnit(_, {
|
|
1458
1458
|
id: T,
|
|
1459
1459
|
type: "building"
|
|
1460
1460
|
});
|
|
1461
1461
|
}
|
|
1462
|
-
E.forEach((
|
|
1463
|
-
const T =
|
|
1462
|
+
E.forEach((I) => {
|
|
1463
|
+
const T = n.get(I), O = Qo(
|
|
1464
1464
|
T,
|
|
1465
1465
|
P
|
|
1466
1466
|
);
|
|
@@ -1468,18 +1468,18 @@ class Yo {
|
|
|
1468
1468
|
level: O,
|
|
1469
1469
|
overlap: b.get(O) ?? null,
|
|
1470
1470
|
venueId: _
|
|
1471
|
-
})) : u.push(
|
|
1471
|
+
})) : u.push(I) : (o.push({
|
|
1472
1472
|
level: O,
|
|
1473
1473
|
overlap: b.get(O) ?? null,
|
|
1474
1474
|
venueId: _
|
|
1475
|
-
}), w && a.push(O)) : d.push(
|
|
1476
|
-
}),
|
|
1477
|
-
const T =
|
|
1478
|
-
level:
|
|
1479
|
-
overlap: b.get(
|
|
1475
|
+
}), w && a.push(O)) : d.push(I);
|
|
1476
|
+
}), L(v).forEach((I) => {
|
|
1477
|
+
const T = s.get(I), { ordinal: O, persistence: D } = T?.properties || {}, W = D === "true" && 0 <= O && O <= P, ie = O === P, xe = W || ie, ye = {
|
|
1478
|
+
level: I,
|
|
1479
|
+
overlap: b.get(I) ?? null,
|
|
1480
1480
|
venueId: _
|
|
1481
1481
|
};
|
|
1482
|
-
xe ? this._isMaskMode ? w ? (o.push(
|
|
1482
|
+
xe ? this._isMaskMode ? w ? (o.push(ye), W && l.push(I), ie && a.push(I)) : h.push(I) : (o.push(ye), w && ie && a.push(I), W && l.push(I)) : d.push(I);
|
|
1483
1483
|
});
|
|
1484
1484
|
}
|
|
1485
1485
|
return this._hiddenBuildings = d, {
|
|
@@ -1487,45 +1487,45 @@ class Yo {
|
|
|
1487
1487
|
selectedLevelIds: a,
|
|
1488
1488
|
alwaysDisplayedSharedLevelIds: l,
|
|
1489
1489
|
maskBuildingIds: u,
|
|
1490
|
-
maskSharedFloorIds:
|
|
1490
|
+
maskSharedFloorIds: h
|
|
1491
1491
|
};
|
|
1492
1492
|
}
|
|
1493
1493
|
getHiddenBuildings() {
|
|
1494
1494
|
return this._hiddenBuildings;
|
|
1495
1495
|
}
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1498
|
-
const i = t.find((
|
|
1499
|
-
return { ordinal: r ?
|
|
1497
|
+
function Xo(t, e) {
|
|
1498
|
+
const i = t.find((s) => e.has(s)) ?? t[0] ?? null, r = i ? e.get(i) : null;
|
|
1499
|
+
return { ordinal: r ? Vi(r) : null, buildingId: i };
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function Vi(t) {
|
|
1502
1502
|
if (!t || !t.properties)
|
|
1503
1503
|
return null;
|
|
1504
|
-
const { level_ids: e, ordinals: i, default_displayed_floor: r } = t.properties,
|
|
1505
|
-
let
|
|
1504
|
+
const { level_ids: e, ordinals: i, default_displayed_floor: r } = t.properties, n = L(i);
|
|
1505
|
+
let s = null;
|
|
1506
1506
|
if (r) {
|
|
1507
|
-
const o =
|
|
1507
|
+
const o = L(e).findIndex(
|
|
1508
1508
|
(a) => a === r
|
|
1509
1509
|
);
|
|
1510
|
-
|
|
1510
|
+
s = n[o] ?? null;
|
|
1511
1511
|
}
|
|
1512
|
-
return
|
|
1512
|
+
return s || (s = Wo(n, (o) => Math.abs(Number(o) - 0.1))), s;
|
|
1513
1513
|
}
|
|
1514
|
-
function
|
|
1514
|
+
function Qo(t, e) {
|
|
1515
1515
|
if (!t || !t.properties) return null;
|
|
1516
|
-
const { level_ids: i, ordinals: r } = t.properties,
|
|
1517
|
-
return
|
|
1516
|
+
const { level_ids: i, ordinals: r } = t.properties, n = L(r).findIndex((s) => s === e);
|
|
1517
|
+
return L(i)[n] ?? null;
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1519
|
+
function Zo(t) {
|
|
1520
1520
|
const e = /* @__PURE__ */ new Map();
|
|
1521
1521
|
if (!t) return e;
|
|
1522
|
-
for (const i of
|
|
1523
|
-
const [r,
|
|
1524
|
-
e.set(r,
|
|
1522
|
+
for (const i of L(t, "/")) {
|
|
1523
|
+
const [r, n] = L(i, ":");
|
|
1524
|
+
e.set(r, L(n));
|
|
1525
1525
|
}
|
|
1526
1526
|
return e;
|
|
1527
1527
|
}
|
|
1528
|
-
class
|
|
1528
|
+
class Jo {
|
|
1529
1529
|
_maplibre;
|
|
1530
1530
|
_isAnimated = !0;
|
|
1531
1531
|
_bounds = null;
|
|
@@ -1552,15 +1552,15 @@ class Qo {
|
|
|
1552
1552
|
this._fitBoundsTimer && (clearTimeout(this._fitBoundsTimer), this._fitBoundsTimer = null);
|
|
1553
1553
|
const e = this._isAnimated ? { animate: !0, duration: 500 } : { animate: !1 }, i = this._isAnimated ? 500 : 0;
|
|
1554
1554
|
return new Promise((r) => {
|
|
1555
|
-
const
|
|
1556
|
-
this._maplibre.off("idle",
|
|
1555
|
+
const n = () => {
|
|
1556
|
+
this._maplibre.off("idle", n), r(!0);
|
|
1557
1557
|
};
|
|
1558
|
-
this._maplibre.on("idle",
|
|
1558
|
+
this._maplibre.on("idle", n), this._maplibre.fitBounds(this._bounds, {
|
|
1559
1559
|
...e,
|
|
1560
1560
|
padding: this._boundsPadding,
|
|
1561
1561
|
bearing: this._maplibre.getBearing()
|
|
1562
1562
|
}), this._fitBoundsTimer = setTimeout(() => {
|
|
1563
|
-
this._maplibre.off("idle",
|
|
1563
|
+
this._maplibre.off("idle", n), this._fitBoundsTimer = null, r(!0);
|
|
1564
1564
|
}, i + 200);
|
|
1565
1565
|
});
|
|
1566
1566
|
}
|
|
@@ -1570,52 +1570,52 @@ class Qo {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
var We = function() {
|
|
1572
1572
|
return R.Date.now();
|
|
1573
|
-
},
|
|
1574
|
-
function
|
|
1575
|
-
for (var e = t.length; e-- &&
|
|
1573
|
+
}, ea = /\s/;
|
|
1574
|
+
function ta(t) {
|
|
1575
|
+
for (var e = t.length; e-- && ea.test(t.charAt(e)); )
|
|
1576
1576
|
;
|
|
1577
1577
|
return e;
|
|
1578
1578
|
}
|
|
1579
|
-
var
|
|
1580
|
-
function
|
|
1581
|
-
return t && t.slice(0,
|
|
1579
|
+
var ia = /^\s+/;
|
|
1580
|
+
function ra(t) {
|
|
1581
|
+
return t && t.slice(0, ta(t) + 1).replace(ia, "");
|
|
1582
1582
|
}
|
|
1583
|
-
var
|
|
1583
|
+
var ri = NaN, sa = /^[-+]0x[0-9a-f]+$/i, na = /^0b[01]+$/i, oa = /^0o[0-7]+$/i, aa = parseInt;
|
|
1584
1584
|
function Ne(t) {
|
|
1585
1585
|
if (typeof t == "number")
|
|
1586
1586
|
return t;
|
|
1587
1587
|
if (Ce(t))
|
|
1588
|
-
return
|
|
1589
|
-
if (
|
|
1588
|
+
return ri;
|
|
1589
|
+
if (_e(t)) {
|
|
1590
1590
|
var e = typeof t.valueOf == "function" ? t.valueOf() : t;
|
|
1591
|
-
t =
|
|
1591
|
+
t = _e(e) ? e + "" : e;
|
|
1592
1592
|
}
|
|
1593
1593
|
if (typeof t != "string")
|
|
1594
1594
|
return t === 0 ? t : +t;
|
|
1595
|
-
t =
|
|
1596
|
-
var i =
|
|
1597
|
-
return i ||
|
|
1595
|
+
t = ra(t);
|
|
1596
|
+
var i = na.test(t);
|
|
1597
|
+
return i || oa.test(t) ? aa(t.slice(2), i ? 2 : 8) : sa.test(t) ? ri : +t;
|
|
1598
1598
|
}
|
|
1599
|
-
var
|
|
1600
|
-
function
|
|
1601
|
-
var r,
|
|
1599
|
+
var la = "Expected a function", da = Math.max, ua = Math.min;
|
|
1600
|
+
function qi(t, e, i) {
|
|
1601
|
+
var r, n, s, o, a, l, d = 0, u = !1, h = !1, c = !0;
|
|
1602
1602
|
if (typeof t != "function")
|
|
1603
|
-
throw new TypeError(
|
|
1604
|
-
e = Ne(e) || 0,
|
|
1603
|
+
throw new TypeError(la);
|
|
1604
|
+
e = Ne(e) || 0, _e(i) && (u = !!i.leading, h = "maxWait" in i, s = h ? da(Ne(i.maxWait) || 0, e) : s, c = "trailing" in i ? !!i.trailing : c);
|
|
1605
1605
|
function f(b) {
|
|
1606
|
-
var E = r, x =
|
|
1607
|
-
return r =
|
|
1606
|
+
var E = r, x = n;
|
|
1607
|
+
return r = n = void 0, d = b, o = t.apply(x, E), o;
|
|
1608
1608
|
}
|
|
1609
1609
|
function p(b) {
|
|
1610
1610
|
return d = b, a = setTimeout(y, e), u ? f(b) : o;
|
|
1611
1611
|
}
|
|
1612
1612
|
function _(b) {
|
|
1613
1613
|
var E = b - l, x = b - d, P = e - E;
|
|
1614
|
-
return
|
|
1614
|
+
return h ? ua(P, s - x) : P;
|
|
1615
1615
|
}
|
|
1616
1616
|
function g(b) {
|
|
1617
1617
|
var E = b - l, x = b - d;
|
|
1618
|
-
return l === void 0 || E >= e || E < 0 ||
|
|
1618
|
+
return l === void 0 || E >= e || E < 0 || h && x >= s;
|
|
1619
1619
|
}
|
|
1620
1620
|
function y() {
|
|
1621
1621
|
var b = We();
|
|
@@ -1624,84 +1624,84 @@ function Vi(t, e, i) {
|
|
|
1624
1624
|
a = setTimeout(y, _(b));
|
|
1625
1625
|
}
|
|
1626
1626
|
function v(b) {
|
|
1627
|
-
return a = void 0,
|
|
1627
|
+
return a = void 0, c && r ? f(b) : (r = n = void 0, o);
|
|
1628
1628
|
}
|
|
1629
1629
|
function B() {
|
|
1630
|
-
a !== void 0 && clearTimeout(a), d = 0, r = l =
|
|
1630
|
+
a !== void 0 && clearTimeout(a), d = 0, r = l = n = a = void 0;
|
|
1631
1631
|
}
|
|
1632
1632
|
function C() {
|
|
1633
1633
|
return a === void 0 ? o : v(We());
|
|
1634
1634
|
}
|
|
1635
1635
|
function w() {
|
|
1636
1636
|
var b = We(), E = g(b);
|
|
1637
|
-
if (r = arguments,
|
|
1637
|
+
if (r = arguments, n = this, l = b, E) {
|
|
1638
1638
|
if (a === void 0)
|
|
1639
1639
|
return p(l);
|
|
1640
|
-
if (
|
|
1640
|
+
if (h)
|
|
1641
1641
|
return clearTimeout(a), a = setTimeout(y, e), f(l);
|
|
1642
1642
|
}
|
|
1643
1643
|
return a === void 0 && (a = setTimeout(y, e)), o;
|
|
1644
1644
|
}
|
|
1645
1645
|
return w.cancel = B, w.flush = C, w;
|
|
1646
1646
|
}
|
|
1647
|
-
function
|
|
1648
|
-
for (var
|
|
1649
|
-
if (e(t[
|
|
1650
|
-
return
|
|
1647
|
+
function ca(t, e, i, r) {
|
|
1648
|
+
for (var n = t.length, s = i + -1; ++s < n; )
|
|
1649
|
+
if (e(t[s], s, t))
|
|
1650
|
+
return s;
|
|
1651
1651
|
return -1;
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function ha(t) {
|
|
1654
1654
|
return t !== t;
|
|
1655
1655
|
}
|
|
1656
|
-
function
|
|
1657
|
-
for (var r = i - 1,
|
|
1656
|
+
function _a(t, e, i) {
|
|
1657
|
+
for (var r = i - 1, n = t.length; ++r < n; )
|
|
1658
1658
|
if (t[r] === e)
|
|
1659
1659
|
return r;
|
|
1660
1660
|
return -1;
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1663
|
-
return e === e ?
|
|
1662
|
+
function fa(t, e, i) {
|
|
1663
|
+
return e === e ? _a(t, e, i) : ca(t, ha, i);
|
|
1664
1664
|
}
|
|
1665
|
-
function
|
|
1665
|
+
function pa(t, e) {
|
|
1666
1666
|
var i = t == null ? 0 : t.length;
|
|
1667
|
-
return !!i &&
|
|
1667
|
+
return !!i && fa(t, e, 0) > -1;
|
|
1668
1668
|
}
|
|
1669
|
-
function
|
|
1669
|
+
function ga() {
|
|
1670
1670
|
}
|
|
1671
|
-
var
|
|
1672
|
-
return new
|
|
1673
|
-
} :
|
|
1674
|
-
function
|
|
1675
|
-
var r = -1,
|
|
1676
|
-
if (
|
|
1677
|
-
var d = e ? null :
|
|
1671
|
+
var ya = 1 / 0, ma = ce && 1 / Lt(new ce([, -0]))[1] == ya ? function(t) {
|
|
1672
|
+
return new ce(t);
|
|
1673
|
+
} : ga, ba = 200;
|
|
1674
|
+
function va(t, e, i) {
|
|
1675
|
+
var r = -1, n = pa, s = t.length, o = !0, a = [], l = a;
|
|
1676
|
+
if (s >= ba) {
|
|
1677
|
+
var d = e ? null : ma(t);
|
|
1678
1678
|
if (d)
|
|
1679
|
-
return
|
|
1680
|
-
o = !1,
|
|
1679
|
+
return Lt(d);
|
|
1680
|
+
o = !1, n = Fi, l = new Fe();
|
|
1681
1681
|
} else
|
|
1682
1682
|
l = e ? [] : a;
|
|
1683
1683
|
e:
|
|
1684
|
-
for (; ++r <
|
|
1685
|
-
var u = t[r],
|
|
1686
|
-
if (u = u !== 0 ? u : 0, o &&
|
|
1687
|
-
for (var
|
|
1688
|
-
if (l[
|
|
1684
|
+
for (; ++r < s; ) {
|
|
1685
|
+
var u = t[r], h = e ? e(u) : u;
|
|
1686
|
+
if (u = u !== 0 ? u : 0, o && h === h) {
|
|
1687
|
+
for (var c = l.length; c--; )
|
|
1688
|
+
if (l[c] === h)
|
|
1689
1689
|
continue e;
|
|
1690
|
-
e && l.push(
|
|
1691
|
-
} else
|
|
1690
|
+
e && l.push(h), a.push(u);
|
|
1691
|
+
} else n(l, h, i) || (l !== a && l.push(h), a.push(u));
|
|
1692
1692
|
}
|
|
1693
1693
|
return a;
|
|
1694
1694
|
}
|
|
1695
|
-
function
|
|
1696
|
-
return t && t.length ?
|
|
1695
|
+
function zi(t, e) {
|
|
1696
|
+
return t && t.length ? va(t, ji(e)) : [];
|
|
1697
1697
|
}
|
|
1698
|
-
var
|
|
1698
|
+
var Sa = 0;
|
|
1699
1699
|
function J(t) {
|
|
1700
|
-
var e = ++
|
|
1701
|
-
return
|
|
1700
|
+
var e = ++Sa;
|
|
1701
|
+
return Hi(t) + e;
|
|
1702
1702
|
}
|
|
1703
|
-
const Se = "Indoor_selectedFloorChanged", Me = "Indoor_selectedBuildingChanged", ht = "Indoor_mapxusMapLoaded",
|
|
1704
|
-
class
|
|
1703
|
+
const Se = "Indoor_selectedFloorChanged", Me = "Indoor_selectedBuildingChanged", ht = "Indoor_mapxusMapLoaded", si = "Indoor_maplibreMapLoaded", Ke = "mapxus-venue-fill", oe = "mapxus-building-line", ni = "mapxus-level-fill", Xe = "mapxus-shared-level-fill", Qe = "highlight-mapxus_level", Ze = "highlight-mapxus_shared_level";
|
|
1704
|
+
class Gi extends br {
|
|
1705
1705
|
_map;
|
|
1706
1706
|
_features = [];
|
|
1707
1707
|
_allVenuesMap = /* @__PURE__ */ new Map();
|
|
@@ -1742,7 +1742,7 @@ class zi extends yr {
|
|
|
1742
1742
|
_featureIncomplete = !1;
|
|
1743
1743
|
_fitBounds;
|
|
1744
1744
|
_dragPan;
|
|
1745
|
-
_history =
|
|
1745
|
+
_history = G.getInstance();
|
|
1746
1746
|
_maskBuildings = /* @__PURE__ */ new Set();
|
|
1747
1747
|
_maskSharedFloors = /* @__PURE__ */ new Set();
|
|
1748
1748
|
_enableIndoorClickSelection;
|
|
@@ -1759,23 +1759,23 @@ class zi extends yr {
|
|
|
1759
1759
|
const {
|
|
1760
1760
|
map: i,
|
|
1761
1761
|
startWithIndoorView: r,
|
|
1762
|
-
outdoorMapShown:
|
|
1763
|
-
selectedHighlightStyle:
|
|
1762
|
+
outdoorMapShown: n,
|
|
1763
|
+
selectedHighlightStyle: s,
|
|
1764
1764
|
fitBounds: o,
|
|
1765
1765
|
boundsPadding: a,
|
|
1766
1766
|
maskNonSelectedAreas: l,
|
|
1767
1767
|
enableIndoorClickSelection: d,
|
|
1768
1768
|
enableOutdoorClickSelection: u,
|
|
1769
|
-
floorSwitchScope:
|
|
1769
|
+
floorSwitchScope: h
|
|
1770
1770
|
} = e;
|
|
1771
|
-
this.layeredHandler = new
|
|
1771
|
+
this.layeredHandler = new Ko(l), this.dragPanHandler = new Jo(i, a), this._map = i, this._enableIndoorClickSelection = d, this._enableOutdoorClickSelection = u, this._startWithIndoorView = r, this._outdoorMapShown = n, this._isMaskMode = l, this._fitBounds = o, this._floorSwitchScope = h, this._selectedHighlightStyle = s ? Object.assign(
|
|
1772
1772
|
{},
|
|
1773
1773
|
De,
|
|
1774
|
-
|
|
1774
|
+
s
|
|
1775
1775
|
) : De, this._bindMaplibreEventListeners();
|
|
1776
1776
|
}
|
|
1777
1777
|
destroy() {
|
|
1778
|
-
this._isDestroyed || (this._isDestroyed = !0, this._dispatch.on(`.${Se}`, null), this.off(Me), this.off(
|
|
1778
|
+
this._isDestroyed || (this._isDestroyed = !0, this._dispatch.on(`.${Se}`, null), this.off(Me), this.off(si), this.off(ht), this._debounceRendering?.cancel(), this._abortQueryFeature && (this._abortQueryFeature(), this._abortQueryFeature = null));
|
|
1779
1779
|
}
|
|
1780
1780
|
/**
|
|
1781
1781
|
* @deprecated
|
|
@@ -1834,10 +1834,10 @@ class zi extends yr {
|
|
|
1834
1834
|
* @param options
|
|
1835
1835
|
*/
|
|
1836
1836
|
getFeaturesById(e, i) {
|
|
1837
|
-
const { layerIds: r, filter:
|
|
1838
|
-
if (!
|
|
1839
|
-
const o =
|
|
1840
|
-
return
|
|
1837
|
+
const { layerIds: r, filter: n } = i || {}, s = this._queryRenderedFeatures(r);
|
|
1838
|
+
if (!s.length) return [];
|
|
1839
|
+
const o = n ? (a) => a.properties.id === e && n(a) : (a) => a.properties.id === e;
|
|
1840
|
+
return s.filter(o);
|
|
1841
1841
|
}
|
|
1842
1842
|
/**
|
|
1843
1843
|
* Switch floor by ordinal.
|
|
@@ -1869,8 +1869,8 @@ class zi extends yr {
|
|
|
1869
1869
|
])
|
|
1870
1870
|
if (this._map.getLayer(i))
|
|
1871
1871
|
if (e) {
|
|
1872
|
-
const { lineColor: r, lineOpacity:
|
|
1873
|
-
this._map.setPaintProperty(i, "line-color", r), this._map.setPaintProperty(i, "line-opacity",
|
|
1872
|
+
const { lineColor: r, lineOpacity: n, lineWidth: s, lineOffset: o } = this._selectedHighlightStyle, a = oi(s, o);
|
|
1873
|
+
this._map.setPaintProperty(i, "line-color", r), this._map.setPaintProperty(i, "line-opacity", n), this._map.setPaintProperty(i, "line-width", s), this._map.setPaintProperty(i, "line-offset", a);
|
|
1874
1874
|
} else
|
|
1875
1875
|
this._map.setPaintProperty(i, "line-opacity", 0);
|
|
1876
1876
|
}
|
|
@@ -1894,19 +1894,19 @@ class zi extends yr {
|
|
|
1894
1894
|
if (!e || !e.properties)
|
|
1895
1895
|
this.dragPanHandler.setCenter(null), this._clear();
|
|
1896
1896
|
else {
|
|
1897
|
-
const { floorId:
|
|
1898
|
-
this._featureIncomplete =
|
|
1897
|
+
const { floorId: n, featureIncomplete: s } = i || {};
|
|
1898
|
+
this._featureIncomplete = s ?? this._featureIncomplete;
|
|
1899
1899
|
const {
|
|
1900
1900
|
id: o,
|
|
1901
1901
|
"ref:venue": a,
|
|
1902
1902
|
label_center: l
|
|
1903
|
-
} = e.properties, d =
|
|
1903
|
+
} = e.properties, d = L(l).map(
|
|
1904
1904
|
(u) => parseFloat(u)
|
|
1905
1905
|
);
|
|
1906
1906
|
this._curBuildingFeature = e, this._curBuildingId = o, this._history.addVisitedBuildingUnit({
|
|
1907
1907
|
id: o,
|
|
1908
1908
|
type: "building"
|
|
1909
|
-
}), this.dragPanHandler.setCenter(d), this._curVenueId !== a && (this._curVenueId = a, this._curVenueFeature = await this._queryVenueFeature(a)), r = this._getBuildingDisplayedOrdinal(e,
|
|
1909
|
+
}), this.dragPanHandler.setCenter(d), this._curVenueId !== a && (this._curVenueId = a, this._curVenueFeature = await this._queryVenueFeature(a)), r = this._getBuildingDisplayedOrdinal(e, n);
|
|
1910
1910
|
}
|
|
1911
1911
|
await this.switchFloorByOrdinal(r), this.emit(
|
|
1912
1912
|
Me,
|
|
@@ -1920,11 +1920,11 @@ class zi extends yr {
|
|
|
1920
1920
|
async selectSharedFloor(e, i, r) {
|
|
1921
1921
|
if (e.id === this._curSharedLevelId)
|
|
1922
1922
|
return;
|
|
1923
|
-
const { id:
|
|
1924
|
-
this._isSelectSharedFloor = !0, this._curBuildingId = null, this._curBuildingFeature = null, this._sharedFloor = e, this._curSharedLevelId =
|
|
1925
|
-
const { label_center: o, id: a } = i.properties, l =
|
|
1926
|
-
this._curVenueId = a, this._curVenueFeature = i, this.dragPanHandler.setCenter(l), this._history.addVisitedBuildingUnit({ id:
|
|
1927
|
-
id:
|
|
1923
|
+
const { id: n, ordinal: s } = e;
|
|
1924
|
+
this._isSelectSharedFloor = !0, this._curBuildingId = null, this._curBuildingFeature = null, this._sharedFloor = e, this._curSharedLevelId = n, this._featureIncomplete = r?.featureIncomplete ?? this._featureIncomplete;
|
|
1925
|
+
const { label_center: o, id: a } = i.properties, l = L(o).map((d) => parseFloat(d));
|
|
1926
|
+
this._curVenueId = a, this._curVenueFeature = i, this.dragPanHandler.setCenter(l), this._history.addVisitedBuildingUnit({ id: n, type: "sharedFloor" }), this._history.setHistoryOrdinal(a, s), this._history.setHistoryBuildingUnit(a, {
|
|
1927
|
+
id: n,
|
|
1928
1928
|
type: "sharedFloor"
|
|
1929
1929
|
}), this._dragPan === !0 && (this._fitBounds ? await this.dragPanHandler.fitBounds() : await this.panToVenueCenter()), this._dispatch.call(Se, null, {
|
|
1930
1930
|
venue: this.venue,
|
|
@@ -1937,7 +1937,7 @@ class zi extends yr {
|
|
|
1937
1937
|
}
|
|
1938
1938
|
updateCustomLayers() {
|
|
1939
1939
|
const e = this._map.getStyle();
|
|
1940
|
-
this._originIndoorLayers = vt(e), this._outdoorLayers =
|
|
1940
|
+
this._originIndoorLayers = vt(e), this._outdoorLayers = Lr(e), this._copyOverlapLayers(), this._copySharedFloorBackgroundLayers(), this._addSelectedHighlightLayers(), this._addReserveFloorLayers(), this._isMaskMode && this._addBuildingMaskLayer(), this._outdoorMapShown || this._setOutdoorVisibility(!1);
|
|
1941
1941
|
}
|
|
1942
1942
|
updateRendering() {
|
|
1943
1943
|
this._updateFeatures(), this._updateSelectedFeatures(), this._layerFloors(), this._calExcludedPoisInMiddle(), this._filterLayers(), this._filterSelectedHighlight(), this._updateUnselectedMask();
|
|
@@ -1945,7 +1945,7 @@ class zi extends yr {
|
|
|
1945
1945
|
async panToBuildingCenter() {
|
|
1946
1946
|
if (this.dragPanHandler.panToCenter(), this._featureIncomplete) {
|
|
1947
1947
|
const e = () => this.getFeaturesById(this._curBuildingId, {
|
|
1948
|
-
layerIds: [
|
|
1948
|
+
layerIds: [oe]
|
|
1949
1949
|
})[0];
|
|
1950
1950
|
await this._waitForFeatureLoaded(e);
|
|
1951
1951
|
}
|
|
@@ -1959,19 +1959,19 @@ class zi extends yr {
|
|
|
1959
1959
|
}
|
|
1960
1960
|
}
|
|
1961
1961
|
async _waitForFeatureLoaded(e) {
|
|
1962
|
-
const i = () => this._isDestroyed ? (this._abortQueryFeature?.(), !0) : !!e(), { promise: r, abort:
|
|
1963
|
-
this._abortQueryFeature =
|
|
1962
|
+
const i = () => this._isDestroyed ? (this._abortQueryFeature?.(), !0) : !!e(), { promise: r, abort: n } = Br(i);
|
|
1963
|
+
this._abortQueryFeature = n;
|
|
1964
1964
|
try {
|
|
1965
1965
|
await Promise.race([
|
|
1966
1966
|
r,
|
|
1967
|
-
new Promise((
|
|
1967
|
+
new Promise((s, o) => {
|
|
1968
1968
|
this._abortQueryFeature = () => {
|
|
1969
1969
|
o(new Error("Aborted")), this._abortQueryFeature = null;
|
|
1970
1970
|
};
|
|
1971
1971
|
})
|
|
1972
1972
|
]);
|
|
1973
|
-
} catch (
|
|
1974
|
-
console.warn(
|
|
1973
|
+
} catch (s) {
|
|
1974
|
+
console.warn(s);
|
|
1975
1975
|
return;
|
|
1976
1976
|
}
|
|
1977
1977
|
}
|
|
@@ -1989,26 +1989,26 @@ class zi extends yr {
|
|
|
1989
1989
|
}) : "name" in e.floor && await this.selectSharedFloor(e.floor, e.venue));
|
|
1990
1990
|
}
|
|
1991
1991
|
queryIndoorInfoByPoint(e) {
|
|
1992
|
-
const i = this._map.unproject(e), r = this._queryVisibleFeature(e),
|
|
1992
|
+
const i = this._map.unproject(e), r = this._queryVisibleFeature(e), n = {
|
|
1993
1993
|
coordinate: i,
|
|
1994
1994
|
venue: null,
|
|
1995
1995
|
building: null,
|
|
1996
1996
|
floor: null
|
|
1997
1997
|
};
|
|
1998
|
-
if (!r) return
|
|
1999
|
-
const { sourceLayer:
|
|
2000
|
-
let o =
|
|
2001
|
-
if (
|
|
1998
|
+
if (!r) return n;
|
|
1999
|
+
const { sourceLayer: s } = r;
|
|
2000
|
+
let o = n;
|
|
2001
|
+
if (s === "mapxus_level") {
|
|
2002
2002
|
const a = r.properties?.["ref:building"], l = this.getFeaturesById(a)?.[0];
|
|
2003
2003
|
if (l) {
|
|
2004
2004
|
const d = l.properties?.["ref:venue"], u = this.getFeaturesById(d)?.[0];
|
|
2005
2005
|
if (u) {
|
|
2006
|
-
const { id:
|
|
2006
|
+
const { id: h, name: c, ordinal: f } = r.properties;
|
|
2007
2007
|
o = {
|
|
2008
2008
|
coordinate: i,
|
|
2009
2009
|
venue: u,
|
|
2010
2010
|
building: l,
|
|
2011
|
-
floor: { id:
|
|
2011
|
+
floor: { id: h, code: c, ordinal: f }
|
|
2012
2012
|
};
|
|
2013
2013
|
} else
|
|
2014
2014
|
console.warn(
|
|
@@ -2016,16 +2016,16 @@ class zi extends yr {
|
|
|
2016
2016
|
a
|
|
2017
2017
|
);
|
|
2018
2018
|
}
|
|
2019
|
-
} else if (
|
|
2019
|
+
} else if (s === "mapxus_shared_level") {
|
|
2020
2020
|
const {
|
|
2021
2021
|
id: a,
|
|
2022
2022
|
ordinal: l,
|
|
2023
2023
|
name: d,
|
|
2024
2024
|
"ref:venue": u
|
|
2025
|
-
} = r.properties || {},
|
|
2026
|
-
|
|
2025
|
+
} = r.properties || {}, h = this.getFeaturesById(u)?.[0];
|
|
2026
|
+
h ? o = {
|
|
2027
2027
|
coordinate: i,
|
|
2028
|
-
venue:
|
|
2028
|
+
venue: h,
|
|
2029
2029
|
building: null,
|
|
2030
2030
|
floor: {
|
|
2031
2031
|
id: a,
|
|
@@ -2049,10 +2049,10 @@ class zi extends yr {
|
|
|
2049
2049
|
}
|
|
2050
2050
|
_bindMaplibreEventListeners() {
|
|
2051
2051
|
this._map.once("styledata", () => this.updateCustomLayers()), this._map.once("idle", () => {
|
|
2052
|
-
this.emit(
|
|
2052
|
+
this.emit(si), (!this._startWithIndoorView || this._map.getZoom() < 14) && this._dispatchIndoorMapLoaded();
|
|
2053
2053
|
}), this._map.on(
|
|
2054
2054
|
"sourcedata",
|
|
2055
|
-
this._debounceRendering =
|
|
2055
|
+
this._debounceRendering = qi(
|
|
2056
2056
|
() => this.updateRendering(),
|
|
2057
2057
|
300
|
|
2058
2058
|
)
|
|
@@ -2067,14 +2067,14 @@ class zi extends yr {
|
|
|
2067
2067
|
);
|
|
2068
2068
|
}
|
|
2069
2069
|
_getBuildingFloorByOrdinal(e, i) {
|
|
2070
|
-
let r = null,
|
|
2070
|
+
let r = null, n = null;
|
|
2071
2071
|
if (e?.properties) {
|
|
2072
|
-
const { ordinals:
|
|
2072
|
+
const { ordinals: s, level_names: o, level_ids: a } = e.properties, l = L(s).findIndex(
|
|
2073
2073
|
(d) => d === i
|
|
2074
2074
|
);
|
|
2075
|
-
r =
|
|
2075
|
+
r = L(o)[l] ?? null, n = L(a)[l] ?? null;
|
|
2076
2076
|
}
|
|
2077
|
-
return { code: r, id:
|
|
2077
|
+
return { code: r, id: n, ordinal: i };
|
|
2078
2078
|
}
|
|
2079
2079
|
_isCurrentFeature(e) {
|
|
2080
2080
|
const i = e?.properties?.id ?? null, r = this._isSelectSharedFloor ? this._curSharedLevelId : this._curBuildingId;
|
|
@@ -2096,13 +2096,13 @@ class zi extends yr {
|
|
|
2096
2096
|
if (this._map.getLayer(e)) continue;
|
|
2097
2097
|
const i = e.split("_")[1], r = this._map.getLayer(i);
|
|
2098
2098
|
if (!r) continue;
|
|
2099
|
-
const { source:
|
|
2099
|
+
const { source: n, sourceLayer: s } = r, o = e === Re ? this._middleLayers[0] : this._lowerLayers[0];
|
|
2100
2100
|
let a = {
|
|
2101
2101
|
"fill-opacity": 0
|
|
2102
2102
|
};
|
|
2103
2103
|
if (this._isMaskMode && e === $) {
|
|
2104
2104
|
const l = this._originIndoorLayers.find(
|
|
2105
|
-
({ id: d }) => d ===
|
|
2105
|
+
({ id: d }) => d === oe
|
|
2106
2106
|
);
|
|
2107
2107
|
l && (a = Object.assign(
|
|
2108
2108
|
{},
|
|
@@ -2113,8 +2113,8 @@ class zi extends yr {
|
|
|
2113
2113
|
this._map.addLayer(
|
|
2114
2114
|
{
|
|
2115
2115
|
id: e,
|
|
2116
|
-
source:
|
|
2117
|
-
"source-layer":
|
|
2116
|
+
source: n,
|
|
2117
|
+
"source-layer": s,
|
|
2118
2118
|
type: "fill",
|
|
2119
2119
|
paint: a
|
|
2120
2120
|
},
|
|
@@ -2125,7 +2125,7 @@ class zi extends yr {
|
|
|
2125
2125
|
_addBuildingMaskLayer() {
|
|
2126
2126
|
if (this._map.getLayer(be)) return;
|
|
2127
2127
|
const e = this._originIndoorLayers.find(
|
|
2128
|
-
({ id: i }) => i ===
|
|
2128
|
+
({ id: i }) => i === oe
|
|
2129
2129
|
);
|
|
2130
2130
|
if (e) {
|
|
2131
2131
|
const i = Object.assign({}, e, {
|
|
@@ -2137,7 +2137,7 @@ class zi extends yr {
|
|
|
2137
2137
|
"fill-opacity": 0
|
|
2138
2138
|
})
|
|
2139
2139
|
});
|
|
2140
|
-
this._map.addLayer(i,
|
|
2140
|
+
this._map.addLayer(i, oe);
|
|
2141
2141
|
}
|
|
2142
2142
|
}
|
|
2143
2143
|
_updateUnselectedMask() {
|
|
@@ -2179,24 +2179,24 @@ class zi extends yr {
|
|
|
2179
2179
|
);
|
|
2180
2180
|
if (!i) {
|
|
2181
2181
|
const r = this._originIndoorLayers.findIndex(
|
|
2182
|
-
({ id:
|
|
2182
|
+
({ id: n }) => n === this._upperLayers[this._upperLayers.length - 1].id
|
|
2183
2183
|
);
|
|
2184
2184
|
i = this._originIndoorLayers[r + 1];
|
|
2185
2185
|
}
|
|
2186
|
-
for (const { layerId: r, sourceLayer:
|
|
2186
|
+
for (const { layerId: r, sourceLayer: n } of e) {
|
|
2187
2187
|
if (this._map.getLayer(r)) continue;
|
|
2188
|
-
const { lineWidth:
|
|
2188
|
+
const { lineWidth: s, lineOpacity: o, lineColor: a, lineOffset: l } = this._selectedHighlightStyle, d = oi(s, l);
|
|
2189
2189
|
this._map.addLayer(
|
|
2190
2190
|
{
|
|
2191
2191
|
id: r,
|
|
2192
2192
|
source: "indoor-planet",
|
|
2193
|
-
"source-layer":
|
|
2193
|
+
"source-layer": n,
|
|
2194
2194
|
type: "line",
|
|
2195
2195
|
filter: ["==", "id", ""],
|
|
2196
2196
|
// 默认不可见
|
|
2197
2197
|
paint: {
|
|
2198
2198
|
"line-offset": d,
|
|
2199
|
-
"line-width":
|
|
2199
|
+
"line-width": s,
|
|
2200
2200
|
"line-color": a,
|
|
2201
2201
|
"line-opacity": o
|
|
2202
2202
|
}
|
|
@@ -2218,19 +2218,19 @@ class zi extends yr {
|
|
|
2218
2218
|
}
|
|
2219
2219
|
_copyOverlapLayers() {
|
|
2220
2220
|
const e = this._originIndoorLayers.findIndex(
|
|
2221
|
-
({ type: a, "source-layer": l }) =>
|
|
2221
|
+
({ type: a, "source-layer": l }) => ai(l, a)
|
|
2222
2222
|
), i = this._originIndoorLayers.findIndex(
|
|
2223
2223
|
({ type: a, "source-layer": l }) => Je(l, a)
|
|
2224
2224
|
), r = this._originIndoorLayers.slice(e, i);
|
|
2225
2225
|
this._upperLayers = r.filter(
|
|
2226
|
-
({ type: a }) =>
|
|
2226
|
+
({ type: a }) => wa(a)
|
|
2227
2227
|
);
|
|
2228
|
-
const
|
|
2228
|
+
const n = this._originIndoorLayers.slice(i), s = n.findIndex(
|
|
2229
2229
|
({ type: a, "source-layer": l }) => !Je(l, a)
|
|
2230
2230
|
);
|
|
2231
|
-
if (
|
|
2232
|
-
this._commonPoiLayers =
|
|
2233
|
-
const a =
|
|
2231
|
+
if (s > -1) {
|
|
2232
|
+
this._commonPoiLayers = n.slice(0, s);
|
|
2233
|
+
const a = n.slice(s).filter(
|
|
2234
2234
|
({ "source-layer": l }) => l === "mapxus_section"
|
|
2235
2235
|
);
|
|
2236
2236
|
this._sectionFillLineLayers = a.filter(
|
|
@@ -2239,7 +2239,7 @@ class zi extends yr {
|
|
|
2239
2239
|
({ type: l }) => l === "symbol"
|
|
2240
2240
|
);
|
|
2241
2241
|
} else
|
|
2242
|
-
this._commonPoiLayers = [...
|
|
2242
|
+
this._commonPoiLayers = [...n], this._sectionSymbolLayers = r.filter(
|
|
2243
2243
|
({ type: a, "source-layer": l }) => l === "mapxus_section" && a === "symbol"
|
|
2244
2244
|
);
|
|
2245
2245
|
const o = this._upperLayers[0];
|
|
@@ -2253,49 +2253,49 @@ class zi extends yr {
|
|
|
2253
2253
|
}
|
|
2254
2254
|
_copySharedFloorBackgroundLayers() {
|
|
2255
2255
|
if (!!!this._upperLayers.find(
|
|
2256
|
-
(
|
|
2256
|
+
(n) => n.id === $.split("_")[1]
|
|
2257
2257
|
)) return;
|
|
2258
2258
|
const i = this._upperLayers.filter(
|
|
2259
|
-
({ "source-layer":
|
|
2259
|
+
({ "source-layer": n, type: s }) => !_t(n, s) && !et(s)
|
|
2260
2260
|
), r = this._middleLayers[0] || this._upperLayers[0];
|
|
2261
2261
|
this._lowerLayers = [
|
|
2262
2262
|
...i,
|
|
2263
2263
|
...this._commonPoiLayers
|
|
2264
|
-
].map((
|
|
2265
|
-
const
|
|
2266
|
-
let o = this._map.getLayer(
|
|
2267
|
-
return o || (o = Object.assign({},
|
|
2268
|
-
id:
|
|
2264
|
+
].map((n) => {
|
|
2265
|
+
const s = `${n.id}-shared-bg`;
|
|
2266
|
+
let o = this._map.getLayer(s);
|
|
2267
|
+
return o || (o = Object.assign({}, n, {
|
|
2268
|
+
id: s
|
|
2269
2269
|
}), this._map.addLayer(o, r.id)), o;
|
|
2270
2270
|
});
|
|
2271
2271
|
}
|
|
2272
2272
|
_updateFeatures() {
|
|
2273
2273
|
this._features = this._getIndoorFeatures();
|
|
2274
|
-
const e =
|
|
2274
|
+
const e = zi(
|
|
2275
2275
|
this._features,
|
|
2276
|
-
(
|
|
2277
|
-
), i = [], r = [],
|
|
2278
|
-
for (const
|
|
2279
|
-
const o =
|
|
2280
|
-
o === Ke ? i.push(
|
|
2276
|
+
(s) => s.layer.id + ":" + s.properties.id
|
|
2277
|
+
), i = [], r = [], n = [];
|
|
2278
|
+
for (const s of e) {
|
|
2279
|
+
const o = s.layer.id;
|
|
2280
|
+
o === Ke ? i.push(s) : o === oe ? r.push(s) : o === $ && n.push(s);
|
|
2281
2281
|
}
|
|
2282
2282
|
this._allVenuesMap = new Map(
|
|
2283
|
-
i.map((
|
|
2283
|
+
i.map((s) => [s.properties.id, s])
|
|
2284
2284
|
), this._allBuildingsMap = new Map(
|
|
2285
|
-
r.map((
|
|
2285
|
+
r.map((s) => [s.properties.id, s])
|
|
2286
2286
|
), this._allSharedLevelsMap = new Map(
|
|
2287
|
-
|
|
2287
|
+
n.map((s) => [s.properties.id, s])
|
|
2288
2288
|
);
|
|
2289
2289
|
}
|
|
2290
2290
|
_calExcludedPoisInMiddle() {
|
|
2291
2291
|
const e = this._map.querySourceFeatures("indoor-planet", {
|
|
2292
2292
|
sourceLayer: "mapxus_place"
|
|
2293
|
-
}), i = (
|
|
2294
|
-
const
|
|
2295
|
-
return this._middleLevels.has(
|
|
2293
|
+
}), i = (n) => n ? L(n).some((o) => this._upperLevels.has(o)) : !1, r = e.filter((n) => {
|
|
2294
|
+
const s = n.properties["ref:level"] || n.properties["ref:shared_level"];
|
|
2295
|
+
return this._middleLevels.has(s) ? i(n.properties.overlap) : !1;
|
|
2296
2296
|
});
|
|
2297
2297
|
this._excludedPoisInMiddle = r.map(
|
|
2298
|
-
(
|
|
2298
|
+
(n) => n.properties["osm:ref"]
|
|
2299
2299
|
);
|
|
2300
2300
|
}
|
|
2301
2301
|
_updateSelectedFeatures() {
|
|
@@ -2319,8 +2319,8 @@ class zi extends yr {
|
|
|
2319
2319
|
displayedLevels: e,
|
|
2320
2320
|
selectedLevelIds: i,
|
|
2321
2321
|
alwaysDisplayedSharedLevelIds: r,
|
|
2322
|
-
maskBuildingIds:
|
|
2323
|
-
maskSharedFloorIds:
|
|
2322
|
+
maskBuildingIds: n,
|
|
2323
|
+
maskSharedFloorIds: s
|
|
2324
2324
|
} = this.layeredHandler.getLayeredData({
|
|
2325
2325
|
selectedVenueId: this._curVenueId,
|
|
2326
2326
|
venueMap: this._allVenuesMap,
|
|
@@ -2331,32 +2331,32 @@ class zi extends yr {
|
|
|
2331
2331
|
e,
|
|
2332
2332
|
i,
|
|
2333
2333
|
r
|
|
2334
|
-
), this._isMaskMode && (this._maskBuildings.clear(), this._maskSharedFloors.clear(),
|
|
2334
|
+
), this._isMaskMode && (this._maskBuildings.clear(), this._maskSharedFloors.clear(), n.forEach((o) => {
|
|
2335
2335
|
this._maskBuildings.add(o);
|
|
2336
|
-
}),
|
|
2336
|
+
}), s.forEach((o) => {
|
|
2337
2337
|
this._maskSharedFloors.add(o);
|
|
2338
2338
|
}));
|
|
2339
2339
|
}
|
|
2340
2340
|
_layerSelectedLevels(e, i) {
|
|
2341
2341
|
for (const r of i) {
|
|
2342
2342
|
this._upperLevels.add(r), this._zIndexHistory.set(r, !0);
|
|
2343
|
-
const
|
|
2344
|
-
({ level:
|
|
2343
|
+
const n = e.find(
|
|
2344
|
+
({ level: s, overlap: o }) => s === r && !!o
|
|
2345
2345
|
);
|
|
2346
|
-
if (
|
|
2347
|
-
for (const
|
|
2348
|
-
this._zIndexHistory.get(
|
|
2346
|
+
if (n)
|
|
2347
|
+
for (const s of n.overlap)
|
|
2348
|
+
this._zIndexHistory.get(s) && this._zIndexHistory.delete(s);
|
|
2349
2349
|
}
|
|
2350
2350
|
}
|
|
2351
2351
|
_layerUnselectedLevels(e, i, r) {
|
|
2352
|
-
for (const
|
|
2353
|
-
if (i.includes(
|
|
2354
|
-
const { level:
|
|
2352
|
+
for (const n of e) {
|
|
2353
|
+
if (i.includes(n.level)) continue;
|
|
2354
|
+
const { level: s, overlap: o, venueId: a } = n, l = this._zIndexHistory.get(s), d = !o || !o.some((h) => this._upperLevels.has(h)), u = r.includes(s);
|
|
2355
2355
|
if (a === this._curVenueId && u) {
|
|
2356
|
-
this._lowerLevels.add(
|
|
2356
|
+
this._lowerLevels.add(s), this._zIndexHistory.delete(s);
|
|
2357
2357
|
continue;
|
|
2358
2358
|
}
|
|
2359
|
-
l ? this._upperLevels.add(
|
|
2359
|
+
l ? this._upperLevels.add(s) : l === !1 ? this._middleLevels.add(s) : u ? this._lowerLevels.add(s) : d ? (this._upperLevels.add(s), this._zIndexHistory.set(s, !0)) : (this._middleLevels.add(s), this._zIndexHistory.set(s, !1));
|
|
2360
2360
|
}
|
|
2361
2361
|
}
|
|
2362
2362
|
_filterLayers() {
|
|
@@ -2380,21 +2380,21 @@ class zi extends yr {
|
|
|
2380
2380
|
}
|
|
2381
2381
|
_filterIndoorLayers(e, i) {
|
|
2382
2382
|
let r;
|
|
2383
|
-
for (const
|
|
2383
|
+
for (const n of i) {
|
|
2384
2384
|
const {
|
|
2385
|
-
id:
|
|
2385
|
+
id: s,
|
|
2386
2386
|
filter: o,
|
|
2387
2387
|
type: a,
|
|
2388
2388
|
"source-layer": l
|
|
2389
|
-
} =
|
|
2390
|
-
|
|
2389
|
+
} = n, d = o ? [o] : [], u = s.includes("-shared-bg"), h = [...this._maskBuildings], c = [...this._maskSharedFloors];
|
|
2390
|
+
ai(l, a) ? r = [
|
|
2391
2391
|
"all",
|
|
2392
|
-
_t(l, a) ? ["!in", "ref:building", ...
|
|
2392
|
+
_t(l, a) ? ["!in", "ref:building", ...h] : ["!in", "id", ...c],
|
|
2393
2393
|
["in", "id", ...e],
|
|
2394
2394
|
...d
|
|
2395
2395
|
] : u ? r = [
|
|
2396
2396
|
"all",
|
|
2397
|
-
["!in", "ref:shared_level", ...
|
|
2397
|
+
["!in", "ref:shared_level", ...c],
|
|
2398
2398
|
["in", "ref:shared_level", ...e],
|
|
2399
2399
|
...d
|
|
2400
2400
|
] : (r = [
|
|
@@ -2403,7 +2403,7 @@ class zi extends yr {
|
|
|
2403
2403
|
"any",
|
|
2404
2404
|
[
|
|
2405
2405
|
"all",
|
|
2406
|
-
["!in", "ref:building", ...
|
|
2406
|
+
["!in", "ref:building", ...h],
|
|
2407
2407
|
["in", "ref:level", ...e]
|
|
2408
2408
|
],
|
|
2409
2409
|
// unit,section,gate in normal level
|
|
@@ -2412,7 +2412,7 @@ class zi extends yr {
|
|
|
2412
2412
|
[
|
|
2413
2413
|
"!in",
|
|
2414
2414
|
"ref:shared_level",
|
|
2415
|
-
...
|
|
2415
|
+
...c
|
|
2416
2416
|
],
|
|
2417
2417
|
["in", "ref:shared_level", ...e]
|
|
2418
2418
|
]
|
|
@@ -2436,7 +2436,7 @@ class zi extends yr {
|
|
|
2436
2436
|
...this._excludedPoisInMiddle
|
|
2437
2437
|
]
|
|
2438
2438
|
]
|
|
2439
|
-
])), this._map.setFilter(
|
|
2439
|
+
])), this._map.setFilter(s, r);
|
|
2440
2440
|
}
|
|
2441
2441
|
}
|
|
2442
2442
|
async _queryVenueFeature(e) {
|
|
@@ -2446,7 +2446,7 @@ class zi extends yr {
|
|
|
2446
2446
|
if (!i)
|
|
2447
2447
|
try {
|
|
2448
2448
|
const r = await at(e);
|
|
2449
|
-
i =
|
|
2449
|
+
i = It(r);
|
|
2450
2450
|
} catch (r) {
|
|
2451
2451
|
console.error(r);
|
|
2452
2452
|
}
|
|
@@ -2456,15 +2456,15 @@ class zi extends yr {
|
|
|
2456
2456
|
if (!e || !e.properties) return null;
|
|
2457
2457
|
const {
|
|
2458
2458
|
"ref:venue": r,
|
|
2459
|
-
level_ids:
|
|
2460
|
-
ordinals:
|
|
2461
|
-
} = e.properties, o =
|
|
2459
|
+
level_ids: n,
|
|
2460
|
+
ordinals: s
|
|
2461
|
+
} = e.properties, o = L(n), a = L(s);
|
|
2462
2462
|
if (i) {
|
|
2463
2463
|
const d = o.findIndex((u) => u === i);
|
|
2464
2464
|
return a[d] ?? null;
|
|
2465
2465
|
}
|
|
2466
2466
|
const l = this._history.getHistoryOrdinal(r);
|
|
2467
|
-
return l && a.includes(l) ? l :
|
|
2467
|
+
return l && a.includes(l) ? l : Vi(e);
|
|
2468
2468
|
}
|
|
2469
2469
|
_updateFloorState(e) {
|
|
2470
2470
|
if (!e) {
|
|
@@ -2484,7 +2484,7 @@ class zi extends yr {
|
|
|
2484
2484
|
}
|
|
2485
2485
|
async _checkAndPanToBuilding() {
|
|
2486
2486
|
this.getFeaturesById(this._curBuildingId, {
|
|
2487
|
-
layerIds: [
|
|
2487
|
+
layerIds: [oe]
|
|
2488
2488
|
})[0] || (this._fitBounds ? this.dragPanHandler.fitBounds() : this.dragPanHandler.panToCenter());
|
|
2489
2489
|
}
|
|
2490
2490
|
_queryVisibleFeature(e) {
|
|
@@ -2497,28 +2497,28 @@ class zi extends yr {
|
|
|
2497
2497
|
...this._isMaskMode ? [$, be] : []
|
|
2498
2498
|
].filter(
|
|
2499
2499
|
(o) => !!this._map.getLayer(o)
|
|
2500
|
-
),
|
|
2500
|
+
), n = this._map.queryRenderedFeatures(e, {
|
|
2501
2501
|
layers: r
|
|
2502
2502
|
});
|
|
2503
|
-
let
|
|
2503
|
+
let s = null;
|
|
2504
2504
|
for (const o of r) {
|
|
2505
|
-
const a =
|
|
2505
|
+
const a = n.find((l) => l.layer.id === o);
|
|
2506
2506
|
if (a) {
|
|
2507
|
-
|
|
2507
|
+
s = a;
|
|
2508
2508
|
break;
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
|
-
return
|
|
2511
|
+
return s && Ia(s.sourceLayer, s.layer.type) && (this._maskBuildings.has(s.properties?.id) || (s = null)), s;
|
|
2512
2512
|
}
|
|
2513
2513
|
_queryRenderedFeatures(e) {
|
|
2514
|
-
const i = (e || []).filter((
|
|
2514
|
+
const i = (e || []).filter((s) => this._map.getLayer(s));
|
|
2515
2515
|
if (e && e.length > 0 && i.length === 0)
|
|
2516
2516
|
return [];
|
|
2517
|
-
const r = i.length ? { layers: i } : {},
|
|
2517
|
+
const r = i.length ? { layers: i } : {}, n = this._map.getCanvas().getBoundingClientRect();
|
|
2518
2518
|
return this._map.queryRenderedFeatures(
|
|
2519
2519
|
[
|
|
2520
2520
|
[0, 0],
|
|
2521
|
-
[
|
|
2521
|
+
[n.width, n.height]
|
|
2522
2522
|
],
|
|
2523
2523
|
r
|
|
2524
2524
|
);
|
|
@@ -2529,12 +2529,12 @@ class zi extends yr {
|
|
|
2529
2529
|
_changeOtherVenuesHistory(e) {
|
|
2530
2530
|
const i = [...this._allVenuesMap.values()];
|
|
2531
2531
|
for (const r of i) {
|
|
2532
|
-
const
|
|
2533
|
-
|
|
2532
|
+
const n = r.properties.id;
|
|
2533
|
+
n !== this._curVenueId && this._history.setHistoryOrdinal(n, e);
|
|
2534
2534
|
}
|
|
2535
2535
|
}
|
|
2536
2536
|
}
|
|
2537
|
-
function
|
|
2537
|
+
function oi(t, e) {
|
|
2538
2538
|
const i = typeof t == "number" && t === De.lineWidth, r = typeof e == "number" && e === De.lineOffset;
|
|
2539
2539
|
if (!r)
|
|
2540
2540
|
return e;
|
|
@@ -2557,16 +2557,16 @@ function si(t, e) {
|
|
|
2557
2557
|
if (!i && r)
|
|
2558
2558
|
return typeof t == "number" ? -(t / 2) : e;
|
|
2559
2559
|
}
|
|
2560
|
-
function
|
|
2560
|
+
function Ia(t, e) {
|
|
2561
2561
|
return t === "mapxus_building" && (e === "fill" || e === "line" || e === "symbol");
|
|
2562
2562
|
}
|
|
2563
|
-
function
|
|
2564
|
-
return _t(t, e) ||
|
|
2563
|
+
function ai(t, e) {
|
|
2564
|
+
return _t(t, e) || La(t, e);
|
|
2565
2565
|
}
|
|
2566
2566
|
function _t(t, e) {
|
|
2567
2567
|
return t === "mapxus_level" && (e === "fill" || e === "line");
|
|
2568
2568
|
}
|
|
2569
|
-
function
|
|
2569
|
+
function La(t, e) {
|
|
2570
2570
|
return t === "mapxus_shared_level" && (e === "fill" || e === "line");
|
|
2571
2571
|
}
|
|
2572
2572
|
function Je(t, e) {
|
|
@@ -2575,11 +2575,11 @@ function Je(t, e) {
|
|
|
2575
2575
|
function et(t) {
|
|
2576
2576
|
return t === "fill-extrusion";
|
|
2577
2577
|
}
|
|
2578
|
-
function
|
|
2578
|
+
function wa(t) {
|
|
2579
2579
|
return t === "line" || t === "fill" || t === "fill-extrusion";
|
|
2580
2580
|
}
|
|
2581
2581
|
const $e = "Poi_poiClick";
|
|
2582
|
-
class
|
|
2582
|
+
class Yi {
|
|
2583
2583
|
_map;
|
|
2584
2584
|
_currentStyle = null;
|
|
2585
2585
|
_styleLayersLength = 0;
|
|
@@ -2616,33 +2616,33 @@ class Gi {
|
|
|
2616
2616
|
}
|
|
2617
2617
|
);
|
|
2618
2618
|
if (i.length === 0) return;
|
|
2619
|
-
const r = i[0],
|
|
2620
|
-
if (
|
|
2619
|
+
const r = i[0], n = L(r.properties["ref:sections"]), s = !!r.properties["ref:shared_level"], o = { coordinate: e.lngLat, poi: r };
|
|
2620
|
+
if (n.length > 0) {
|
|
2621
2621
|
const a = this._map.querySourceFeatures(
|
|
2622
2622
|
"indoor-planet",
|
|
2623
2623
|
{
|
|
2624
2624
|
sourceLayer: "mapxus_section"
|
|
2625
2625
|
}
|
|
2626
2626
|
);
|
|
2627
|
-
o.sections =
|
|
2627
|
+
o.sections = n.map((l) => {
|
|
2628
2628
|
const d = a.find(
|
|
2629
2629
|
(p) => p.properties.id === l
|
|
2630
2630
|
), {
|
|
2631
2631
|
id: u,
|
|
2632
|
-
section:
|
|
2633
|
-
correlation_id:
|
|
2634
|
-
} = d?.properties || {}, f =
|
|
2632
|
+
section: h = "",
|
|
2633
|
+
correlation_id: c
|
|
2634
|
+
} = d?.properties || {}, f = li(
|
|
2635
2635
|
d?.properties
|
|
2636
2636
|
);
|
|
2637
2637
|
return {
|
|
2638
2638
|
id: u,
|
|
2639
|
-
category:
|
|
2639
|
+
category: h,
|
|
2640
2640
|
sectionName: f,
|
|
2641
|
-
...
|
|
2641
|
+
...c && { correlationId: c }
|
|
2642
2642
|
};
|
|
2643
2643
|
});
|
|
2644
2644
|
}
|
|
2645
|
-
if (
|
|
2645
|
+
if (s) {
|
|
2646
2646
|
const a = r.properties["ref:shared_level"], { floor: l, venue: d } = this._queryIndoorFeaturesBySharedFloor(a);
|
|
2647
2647
|
o.floor = l, o.venue = d;
|
|
2648
2648
|
} else {
|
|
@@ -2660,12 +2660,12 @@ class Gi {
|
|
|
2660
2660
|
);
|
|
2661
2661
|
if (!r)
|
|
2662
2662
|
return { floor: null, venue: null };
|
|
2663
|
-
const
|
|
2664
|
-
(d) => d.layer.id === "mapxus-venue-fill" && d.properties.id ===
|
|
2665
|
-
) ?? null, { id: o, ordinal: a } = r.properties, l =
|
|
2663
|
+
const n = r.properties["ref:venue"], s = i.find(
|
|
2664
|
+
(d) => d.layer.id === "mapxus-venue-fill" && d.properties.id === n
|
|
2665
|
+
) ?? null, { id: o, ordinal: a } = r.properties, l = li(r.properties);
|
|
2666
2666
|
return {
|
|
2667
2667
|
floor: { id: o, ordinal: a, name: l },
|
|
2668
|
-
venue:
|
|
2668
|
+
venue: s
|
|
2669
2669
|
};
|
|
2670
2670
|
}
|
|
2671
2671
|
_queryIndoorFeaturesByFloor(e) {
|
|
@@ -2681,8 +2681,8 @@ class Gi {
|
|
|
2681
2681
|
if (!r)
|
|
2682
2682
|
return { floor: null, building: null, venue: null };
|
|
2683
2683
|
const {
|
|
2684
|
-
id:
|
|
2685
|
-
ordinal:
|
|
2684
|
+
id: n,
|
|
2685
|
+
ordinal: s,
|
|
2686
2686
|
name: o,
|
|
2687
2687
|
"ref:building": a
|
|
2688
2688
|
} = r.properties || {}, l = i.find(
|
|
@@ -2691,16 +2691,16 @@ class Gi {
|
|
|
2691
2691
|
(u) => u.layer.id === "mapxus-venue-fill" && u.properties.id === l?.properties?.["ref:venue"]
|
|
2692
2692
|
) ?? null;
|
|
2693
2693
|
return {
|
|
2694
|
-
floor: { id:
|
|
2694
|
+
floor: { id: n, ordinal: s, code: o },
|
|
2695
2695
|
building: l,
|
|
2696
2696
|
venue: d
|
|
2697
2697
|
};
|
|
2698
2698
|
}
|
|
2699
2699
|
}
|
|
2700
|
-
function
|
|
2700
|
+
function li(t) {
|
|
2701
2701
|
return t ? Object.keys(t).filter((i) => i.includes("name")).reduce((i, r) => {
|
|
2702
|
-
const [,
|
|
2703
|
-
return
|
|
2702
|
+
const [, n] = L(r, ":");
|
|
2703
|
+
return n ? i[n] = t[r] : i.default = t[r], i;
|
|
2704
2704
|
}, {}) : { default: "" };
|
|
2705
2705
|
}
|
|
2706
2706
|
function Ee(t) {
|
|
@@ -2710,7 +2710,7 @@ function F(t, e, i) {
|
|
|
2710
2710
|
const r = document.createElement(t);
|
|
2711
2711
|
return e && (r.className = e), i && i.appendChild(r), r;
|
|
2712
2712
|
}
|
|
2713
|
-
class
|
|
2713
|
+
class Wi {
|
|
2714
2714
|
_map;
|
|
2715
2715
|
_maplibre;
|
|
2716
2716
|
_buildingId;
|
|
@@ -2750,9 +2750,9 @@ class Yi {
|
|
|
2750
2750
|
this._visible = e, e ? this._$showLayout() : this._$hideLayout();
|
|
2751
2751
|
}
|
|
2752
2752
|
changePosition(e, i, r) {
|
|
2753
|
-
const
|
|
2753
|
+
const n = document.querySelector(
|
|
2754
2754
|
`.maplibregl-ctrl-${e}`
|
|
2755
|
-
),
|
|
2755
|
+
), s = n.querySelector(
|
|
2756
2756
|
".maplibregl-ctrl-building-filter"
|
|
2757
2757
|
);
|
|
2758
2758
|
if (e !== i) {
|
|
@@ -2760,13 +2760,13 @@ class Yi {
|
|
|
2760
2760
|
const o = document.querySelector(
|
|
2761
2761
|
`.maplibregl-ctrl-${i}`
|
|
2762
2762
|
);
|
|
2763
|
-
|
|
2764
|
-
|
|
2763
|
+
s && (n.removeChild(s), Number.isFinite(r) ? o.insertBefore(
|
|
2764
|
+
s,
|
|
2765
2765
|
o.children[r]
|
|
2766
|
-
) : o.append(
|
|
2767
|
-
} else Number.isFinite(r) &&
|
|
2768
|
-
|
|
2769
|
-
|
|
2766
|
+
) : o.append(s), this._updateBuildingListLayout(i));
|
|
2767
|
+
} else Number.isFinite(r) && n.children[r] !== s && (n.removeChild(s), n.insertBefore(
|
|
2768
|
+
s,
|
|
2769
|
+
n.children[r]
|
|
2770
2770
|
));
|
|
2771
2771
|
}
|
|
2772
2772
|
_bindEvents() {
|
|
@@ -2807,13 +2807,13 @@ class Yi {
|
|
|
2807
2807
|
layers: ["mapxus-building-line"]
|
|
2808
2808
|
}) : [];
|
|
2809
2809
|
for (const r of i) {
|
|
2810
|
-
const { properties:
|
|
2811
|
-
this._features.find((l) => l.properties.id ===
|
|
2810
|
+
const { properties: n } = r, { id: s, name: o } = n, a = n?.[`name:${this._language}`] ?? o;
|
|
2811
|
+
this._features.find((l) => l.properties.id === s) || (this._features.push(r), this._$buildingList.appendChild(
|
|
2812
2812
|
this._buildingNameCreate(
|
|
2813
2813
|
"p",
|
|
2814
2814
|
a,
|
|
2815
|
-
|
|
2816
|
-
|
|
2815
|
+
s,
|
|
2816
|
+
s === this._map.building?.properties?.id
|
|
2817
2817
|
)
|
|
2818
2818
|
));
|
|
2819
2819
|
}
|
|
@@ -2823,18 +2823,18 @@ class Yi {
|
|
|
2823
2823
|
this._$buildingList.replaceChildren();
|
|
2824
2824
|
}
|
|
2825
2825
|
_setBuildingListHeight(e) {
|
|
2826
|
-
const
|
|
2827
|
-
const o =
|
|
2826
|
+
const n = e.map((s) => {
|
|
2827
|
+
const o = s?.properties?.[`name:${this._language}`] ?? s?.properties?.name;
|
|
2828
2828
|
return o ? Math.ceil(o.length * 8 / 107) : 0;
|
|
2829
|
-
}).reduce((
|
|
2830
|
-
this._listHeight =
|
|
2829
|
+
}).reduce((s, o) => s + o, 0);
|
|
2830
|
+
this._listHeight = n * 26 + e.length * 8, this._$buildingList.style.height = this._$listContainer.style.height = `${this._listHeight >= 208 ? 208 : this._listHeight}px`;
|
|
2831
2831
|
}
|
|
2832
|
-
_buildingNameCreate(e, i, r,
|
|
2833
|
-
const
|
|
2832
|
+
_buildingNameCreate(e, i, r, n) {
|
|
2833
|
+
const s = F(
|
|
2834
2834
|
e,
|
|
2835
|
-
`mapxus-building-name${
|
|
2835
|
+
`mapxus-building-name${n ? " active" : ""}`
|
|
2836
2836
|
);
|
|
2837
|
-
return
|
|
2837
|
+
return s.dataset.id = r, s.innerText = i, this._buildingNameClickEvent(s), s;
|
|
2838
2838
|
}
|
|
2839
2839
|
_toggleList(e) {
|
|
2840
2840
|
this._isListShown = e, this._$listContainer.style.display = e ? "block" : "none";
|
|
@@ -2870,24 +2870,24 @@ class Yi {
|
|
|
2870
2870
|
).matches;
|
|
2871
2871
|
}
|
|
2872
2872
|
}
|
|
2873
|
-
var
|
|
2874
|
-
function
|
|
2875
|
-
return t >=
|
|
2873
|
+
var Ba = Math.max, Pa = Math.min;
|
|
2874
|
+
function Fa(t, e, i) {
|
|
2875
|
+
return t >= Pa(e, i) && t < Ba(e, i);
|
|
2876
2876
|
}
|
|
2877
|
-
var
|
|
2878
|
-
function
|
|
2877
|
+
var di = 1 / 0, Ca = 17976931348623157e292;
|
|
2878
|
+
function ui(t) {
|
|
2879
2879
|
if (!t)
|
|
2880
2880
|
return t === 0 ? t : 0;
|
|
2881
|
-
if (t = Ne(t), t ===
|
|
2881
|
+
if (t = Ne(t), t === di || t === -di) {
|
|
2882
2882
|
var e = t < 0 ? -1 : 1;
|
|
2883
|
-
return e *
|
|
2883
|
+
return e * Ca;
|
|
2884
2884
|
}
|
|
2885
2885
|
return t === t ? t : 0;
|
|
2886
2886
|
}
|
|
2887
|
-
function
|
|
2888
|
-
return e =
|
|
2887
|
+
function Ki(t, e, i) {
|
|
2888
|
+
return e = ui(e), i === void 0 ? (i = e, e = 0) : i = ui(i), t = Ne(t), Fa(t, e, i);
|
|
2889
2889
|
}
|
|
2890
|
-
class
|
|
2890
|
+
class Xi {
|
|
2891
2891
|
_container;
|
|
2892
2892
|
_indoor;
|
|
2893
2893
|
_maplibre;
|
|
@@ -2916,8 +2916,8 @@ class Ki {
|
|
|
2916
2916
|
_debounceScroll;
|
|
2917
2917
|
_clearScrollEventListener;
|
|
2918
2918
|
constructor(e, i) {
|
|
2919
|
-
const { style: r, enabled:
|
|
2920
|
-
this._indoor = e, this._language =
|
|
2919
|
+
const { style: r, enabled: n = !0, language: s } = i;
|
|
2920
|
+
this._indoor = e, this._language = s, this._style = r ? Object.assign({}, Mt, r) : Mt, this._isEnabled = n, this._addIndoorEventListeners();
|
|
2921
2921
|
}
|
|
2922
2922
|
onAdd(e) {
|
|
2923
2923
|
return this._maplibre = e, this._addMapMoveEventListener(), this._container = F(
|
|
@@ -2949,9 +2949,9 @@ class Ki {
|
|
|
2949
2949
|
this._ordinal = e, this._dragPan = i ?? !0, await this._indoor.switchFloorByOrdinal(e), this._updateSelectorStatus(e), this._scrollCenterActiveFloor();
|
|
2950
2950
|
}
|
|
2951
2951
|
changePosition(e, i, r) {
|
|
2952
|
-
const
|
|
2952
|
+
const n = document.querySelector(
|
|
2953
2953
|
`.maplibregl-ctrl-${e}`
|
|
2954
|
-
),
|
|
2954
|
+
), s = n.querySelector(
|
|
2955
2955
|
".mapxus-ctrl-floors"
|
|
2956
2956
|
);
|
|
2957
2957
|
if (e !== i) {
|
|
@@ -2959,13 +2959,13 @@ class Ki {
|
|
|
2959
2959
|
const o = document.querySelector(
|
|
2960
2960
|
`.maplibregl-ctrl-${i}`
|
|
2961
2961
|
);
|
|
2962
|
-
|
|
2963
|
-
|
|
2962
|
+
s && (n.removeChild(s), Number.isFinite(r) ? o.insertBefore(
|
|
2963
|
+
s,
|
|
2964
2964
|
o.children[r]
|
|
2965
|
-
) : o.append(
|
|
2966
|
-
} else Number.isFinite(r) &&
|
|
2967
|
-
|
|
2968
|
-
|
|
2965
|
+
) : o.append(s), this._show(), this._scrollCenterActiveFloor());
|
|
2966
|
+
} else Number.isFinite(r) && n.children[r] !== s && (n.removeChild(s), n.insertBefore(
|
|
2967
|
+
s,
|
|
2968
|
+
n.children[r]
|
|
2969
2969
|
), this._show(), this._scrollCenterActiveFloor());
|
|
2970
2970
|
}
|
|
2971
2971
|
setStyle(e) {
|
|
@@ -2988,20 +2988,20 @@ class Ki {
|
|
|
2988
2988
|
this._clearState(), this._visible && this._hide(), this._componentDidMount && this._clearFloors();
|
|
2989
2989
|
}
|
|
2990
2990
|
_renderBuildingFloors(e, i) {
|
|
2991
|
-
const { level_names: r, ordinals:
|
|
2992
|
-
this._buildingId =
|
|
2993
|
-
const o = this._indoor.getFeaturesById(
|
|
2991
|
+
const { level_names: r, ordinals: n, id: s } = e.properties;
|
|
2992
|
+
this._buildingId = s, this._floorNames = r.split(",").reverse(), this._ordinals = n.split(",").reverse(), this._ordinal = i, this._calcSelectorLayout(), this._render();
|
|
2993
|
+
const o = this._indoor.getFeaturesById(s, {
|
|
2994
2994
|
filter: (a) => a.layer.id === "mapxus-building-line"
|
|
2995
2995
|
})[0];
|
|
2996
2996
|
this._checkIfShowFloorSelector(o);
|
|
2997
2997
|
}
|
|
2998
2998
|
_renderSharedLevelFloor(e) {
|
|
2999
|
-
const { name: i, ordinal: r, id:
|
|
2999
|
+
const { name: i, ordinal: r, id: n } = e;
|
|
3000
3000
|
this._floorNames = [i[this._language] || i.default], this._ordinals = [r], this._ordinal = r, this._calcSelectorLayout(), this._render();
|
|
3001
|
-
const
|
|
3001
|
+
const s = this._indoor.getFeaturesById(n, {
|
|
3002
3002
|
layerIds: [$]
|
|
3003
3003
|
})[0];
|
|
3004
|
-
this._checkIfShowFloorSelector(
|
|
3004
|
+
this._checkIfShowFloorSelector(s);
|
|
3005
3005
|
}
|
|
3006
3006
|
_checkIfShowFloorSelector(e) {
|
|
3007
3007
|
this.enabled && (this._dragPan !== !1 || this._dragPan === !1 && e) && (this._show(), this._scrollCenterActiveFloor());
|
|
@@ -3039,9 +3039,9 @@ class Ki {
|
|
|
3039
3039
|
);
|
|
3040
3040
|
}
|
|
3041
3041
|
_$expandedSelector(e, i) {
|
|
3042
|
-
const { itemSize: r, itemCount:
|
|
3042
|
+
const { itemSize: r, itemCount: n, defaultFolded: s, backgroundColor: o } = this._style, a = F(
|
|
3043
3043
|
"div",
|
|
3044
|
-
`mapxus-ctrl-floors-expanded ${
|
|
3044
|
+
`mapxus-ctrl-floors-expanded ${s ? "hidden" : ""}`,
|
|
3045
3045
|
e
|
|
3046
3046
|
);
|
|
3047
3047
|
if (this._floorNames.length > 1) {
|
|
@@ -3057,16 +3057,16 @@ class Ki {
|
|
|
3057
3057
|
"mapxus-ctrl-floors-wrapper",
|
|
3058
3058
|
a
|
|
3059
3059
|
);
|
|
3060
|
-
return l.style.backgroundColor = o, this._floorNames.length >
|
|
3060
|
+
return l.style.backgroundColor = o, this._floorNames.length > n && (this._$arrowBtnUp = this._$createScrollButton(l, "up"), this._$arrowBtnUp.onclick = () => this._handleScroll("up")), this._$innerFloors = F(
|
|
3061
3061
|
"div",
|
|
3062
3062
|
"mapxus-ctrl-floors-inner",
|
|
3063
3063
|
l
|
|
3064
3064
|
), Object.assign(this._$innerFloors.style, {
|
|
3065
|
-
maxHeight: `${r *
|
|
3065
|
+
maxHeight: `${r * n}px`,
|
|
3066
3066
|
width: `${r}px`
|
|
3067
|
-
}), this._$createFloors(this._$innerFloors), this._floorNames.length >
|
|
3067
|
+
}), this._$createFloors(this._$innerFloors), this._floorNames.length > n && (this._$arrowBtnDown = this._$createScrollButton(l, "down"), this._$arrowBtnDown.onclick = () => this._handleScroll("down"), this._$innerFloors.addEventListener(
|
|
3068
3068
|
"scroll",
|
|
3069
|
-
this._debounceScroll =
|
|
3069
|
+
this._debounceScroll = qi((d) => {
|
|
3070
3070
|
d.stopPropagation(), this._resetArrowBtnStatus(this._$innerFloors.scrollTop);
|
|
3071
3071
|
}, 100)
|
|
3072
3072
|
), this._clearScrollEventListener = () => this._$innerFloors.removeEventListener(
|
|
@@ -3077,8 +3077,8 @@ class Ki {
|
|
|
3077
3077
|
_$foldedSelector(e, i) {
|
|
3078
3078
|
const {
|
|
3079
3079
|
itemSize: r,
|
|
3080
|
-
activeFontColor:
|
|
3081
|
-
activeBackgroundColor:
|
|
3080
|
+
activeFontColor: n,
|
|
3081
|
+
activeBackgroundColor: s,
|
|
3082
3082
|
defaultFolded: o
|
|
3083
3083
|
} = this._style, a = F(
|
|
3084
3084
|
"div",
|
|
@@ -3089,8 +3089,8 @@ class Ki {
|
|
|
3089
3089
|
width: `${r}px`,
|
|
3090
3090
|
height: `${r}px`,
|
|
3091
3091
|
lineHeight: `${r}px`,
|
|
3092
|
-
color:
|
|
3093
|
-
backgroundColor:
|
|
3092
|
+
color: n,
|
|
3093
|
+
backgroundColor: s
|
|
3094
3094
|
}), a;
|
|
3095
3095
|
}
|
|
3096
3096
|
_clearFloors() {
|
|
@@ -3105,13 +3105,13 @@ class Ki {
|
|
|
3105
3105
|
}
|
|
3106
3106
|
_$createFloors(e) {
|
|
3107
3107
|
const { fontColor: i, itemSize: r } = this._style;
|
|
3108
|
-
let
|
|
3109
|
-
this._floorNames.forEach((
|
|
3110
|
-
|
|
3108
|
+
let n;
|
|
3109
|
+
this._floorNames.forEach((s, o) => {
|
|
3110
|
+
n = F("div", "mapxus-ctrl-floors-floor", e), n.dataset.floor = s, n.dataset.ordinal = this._ordinals[o], n.innerText = s, Object.assign(n.style, {
|
|
3111
3111
|
color: i,
|
|
3112
3112
|
height: `${r}px`,
|
|
3113
3113
|
lineHeight: `${r}px`
|
|
3114
|
-
}),
|
|
3114
|
+
}), n.dataset.ordinal === this._ordinal && (this._$activeFloor = n, this._resetActiveFloor(!0), this._$selectorFolded.innerText = s), n.onclick = async (a) => {
|
|
3115
3115
|
this._indoor.setDragPan("restrict"), this._indoor.dragPanHandler.setAnimated(!0), await this.switchByOrdinal(
|
|
3116
3116
|
a.target.dataset.ordinal
|
|
3117
3117
|
);
|
|
@@ -3122,8 +3122,8 @@ class Ki {
|
|
|
3122
3122
|
const i = this._floorNames[this._ordinals.indexOf(e)];
|
|
3123
3123
|
this._$activeFloor && this._resetActiveFloor(!1);
|
|
3124
3124
|
for (const r of this._$innerFloors.children) {
|
|
3125
|
-
const
|
|
3126
|
-
|
|
3125
|
+
const n = r;
|
|
3126
|
+
n.dataset.ordinal === e && (this._$activeFloor = n, this._resetActiveFloor(!0));
|
|
3127
3127
|
}
|
|
3128
3128
|
this._$selectorFolded.innerText = i;
|
|
3129
3129
|
}
|
|
@@ -3134,11 +3134,11 @@ class Ki {
|
|
|
3134
3134
|
const {
|
|
3135
3135
|
activeBackgroundColor: i,
|
|
3136
3136
|
backgroundColor: r,
|
|
3137
|
-
activeFontColor:
|
|
3138
|
-
fontColor:
|
|
3137
|
+
activeFontColor: n,
|
|
3138
|
+
fontColor: s
|
|
3139
3139
|
} = this._style;
|
|
3140
3140
|
Object.assign(this._$activeFloor.style, {
|
|
3141
|
-
color: e ?
|
|
3141
|
+
color: e ? n : s,
|
|
3142
3142
|
backgroundColor: e ? i : r,
|
|
3143
3143
|
fontWeight: e ? "bold" : "normal",
|
|
3144
3144
|
cursor: e ? "auto" : "pointer"
|
|
@@ -3151,24 +3151,24 @@ class Ki {
|
|
|
3151
3151
|
}
|
|
3152
3152
|
}
|
|
3153
3153
|
_getScrollTop(e) {
|
|
3154
|
-
return
|
|
3154
|
+
return Ki(this._centerSelectorIdx, this._lastNormalScrollableIdx + 1) ? (e - this._centerSelectorIdx) * this._style.itemSize : e > this._lastNormalScrollableIdx ? this._maxScrollTop : 0;
|
|
3155
3155
|
}
|
|
3156
3156
|
_handleScroll(e) {
|
|
3157
3157
|
const i = this._$innerFloors.scrollTop, { itemSize: r } = this._style;
|
|
3158
3158
|
if (e === "up") {
|
|
3159
|
-
const
|
|
3160
|
-
this._$innerFloors.scrollTop =
|
|
3159
|
+
const n = i - r * 2;
|
|
3160
|
+
this._$innerFloors.scrollTop = n < 0 ? 0 : n;
|
|
3161
3161
|
} else if (e === "down") {
|
|
3162
|
-
const
|
|
3163
|
-
this._$innerFloors.scrollTop =
|
|
3162
|
+
const n = i + r * 2;
|
|
3163
|
+
this._$innerFloors.scrollTop = n > this._maxScrollTop ? this._maxScrollTop : n;
|
|
3164
3164
|
}
|
|
3165
3165
|
}
|
|
3166
3166
|
_expandSelector(e) {
|
|
3167
3167
|
e ? (this._$selectorExpanded.classList.remove("hidden"), this._$selectorFolded.classList.add("hidden")) : (this._$selectorExpanded.classList.add("hidden"), this._$selectorFolded.classList.remove("hidden"));
|
|
3168
3168
|
}
|
|
3169
3169
|
}
|
|
3170
|
-
const
|
|
3171
|
-
class
|
|
3170
|
+
const Qi = yt.includes("co.jp"), Ea = Qi ? "kawasaki-logo" : "mapxus-logo", xa = Qi ? "https://www.khi.co.jp/groupvision2030/mapxus.html" : "https://www.mapxus.com/";
|
|
3171
|
+
class Oa {
|
|
3172
3172
|
_container;
|
|
3173
3173
|
_isEnabled;
|
|
3174
3174
|
constructor(e) {
|
|
@@ -3182,10 +3182,10 @@ class Ea {
|
|
|
3182
3182
|
), this._isEnabled) {
|
|
3183
3183
|
const i = F(
|
|
3184
3184
|
"a",
|
|
3185
|
-
|
|
3185
|
+
Ea,
|
|
3186
3186
|
this._container
|
|
3187
3187
|
);
|
|
3188
|
-
i.target = "_blank", i.href =
|
|
3188
|
+
i.target = "_blank", i.href = xa, i.setAttribute("aria-label", "Mapxus logo"), i.setAttribute("rel", "noopener"), this._container.appendChild(i);
|
|
3189
3189
|
}
|
|
3190
3190
|
return this._container;
|
|
3191
3191
|
}
|
|
@@ -3196,8 +3196,8 @@ class Ea {
|
|
|
3196
3196
|
return "bottom-left";
|
|
3197
3197
|
}
|
|
3198
3198
|
}
|
|
3199
|
-
const
|
|
3200
|
-
class
|
|
3199
|
+
const $a = yt.includes("co.jp");
|
|
3200
|
+
class Ma {
|
|
3201
3201
|
_container;
|
|
3202
3202
|
_anchor;
|
|
3203
3203
|
_theme;
|
|
@@ -3225,10 +3225,10 @@ class Oa {
|
|
|
3225
3225
|
this._setCopyrightInfo(e);
|
|
3226
3226
|
}
|
|
3227
3227
|
_setCopyrightInfo(e) {
|
|
3228
|
-
this._anchor.innerText = e === "landsD" ? "© The Government of the Hong Kong SAR" :
|
|
3228
|
+
this._anchor.innerText = e === "landsD" ? "© The Government of the Hong Kong SAR" : $a ? "©Mapxus driven by Kawasaki ©OpenStreetMap contributors" : "©Mapxus ©OpenStreetMap contributors", e === "landsD" && (this._anchor.href = "https://www.map.gov.hk/gm/");
|
|
3229
3229
|
}
|
|
3230
3230
|
}
|
|
3231
|
-
class
|
|
3231
|
+
class Aa {
|
|
3232
3232
|
_container;
|
|
3233
3233
|
_$icon;
|
|
3234
3234
|
_removeClickEventListener;
|
|
@@ -3237,7 +3237,7 @@ class $a {
|
|
|
3237
3237
|
"div",
|
|
3238
3238
|
"maplibregl-ctrl mapxus-ctrl-collapsed-copyright",
|
|
3239
3239
|
e.getContainer()
|
|
3240
|
-
), this._container.innerHTML =
|
|
3240
|
+
), this._container.innerHTML = Ta(), this._bindEvents(), this._container;
|
|
3241
3241
|
}
|
|
3242
3242
|
onRemove() {
|
|
3243
3243
|
this._removeClickEventListener(), Ee(this._container);
|
|
@@ -3255,14 +3255,14 @@ class $a {
|
|
|
3255
3255
|
let i = !1;
|
|
3256
3256
|
this._$icon.addEventListener("click", r), this._removeClickEventListener = () => this._$icon.removeEventListener("click", r);
|
|
3257
3257
|
function r() {
|
|
3258
|
-
i = !i,
|
|
3258
|
+
i = !i, n();
|
|
3259
3259
|
}
|
|
3260
|
-
function
|
|
3260
|
+
function n() {
|
|
3261
3261
|
i ? e.classList.remove("hidden") : e.classList.add("hidden");
|
|
3262
3262
|
}
|
|
3263
3263
|
}
|
|
3264
3264
|
}
|
|
3265
|
-
function
|
|
3265
|
+
function Ta() {
|
|
3266
3266
|
return `
|
|
3267
3267
|
<div class="mapxus-collapsed-copyright-content">
|
|
3268
3268
|
<div class="mapxus-collapsed-copyright-menu hidden">
|
|
@@ -3275,10 +3275,10 @@ function Ma() {
|
|
|
3275
3275
|
`;
|
|
3276
3276
|
}
|
|
3277
3277
|
function tt(t) {
|
|
3278
|
-
return `${yt}/${
|
|
3278
|
+
return `${yt}/${pr}/${t}`;
|
|
3279
3279
|
}
|
|
3280
|
-
var
|
|
3281
|
-
class
|
|
3280
|
+
var Zi = /* @__PURE__ */ ((t) => (t.CHRISTMAS = "christmas_mims2_v1", t.HALLOWEEN = "halloween_mims2_v1", t.MAPPY_BEE = "mappybee_mims2_v2", t.MAPXUS = "mapxus_mims2_v1", t.LANDS_D = "lands_d_mims2_v1", t.COMMON = "common_mims2_v1", t.MAPXUS_V2 = "mapxus_v2", t.MAPXUS_DEFAULT = "mapxus_v8", t.ROSE_TEA = "rose_tea", t.PEAR_SORBET = "pear_sorbet", t.CITY_WALK = "city_walk", t.MOCHA_MOUSSE = "mocha_mousse", t.SECTION_DISPLAY_BY_COLOR = "mapxus_v7_with_section_v2", t.SECTION_DISPLAY_BY_CATEGORY = "mapxus_v7_with_section_v3", t))(Zi || {});
|
|
3281
|
+
class Ji {
|
|
3282
3282
|
_buildingSelector;
|
|
3283
3283
|
_isEnabled = !0;
|
|
3284
3284
|
_position;
|
|
@@ -3310,7 +3310,7 @@ class Zi {
|
|
|
3310
3310
|
return this._position;
|
|
3311
3311
|
}
|
|
3312
3312
|
}
|
|
3313
|
-
class
|
|
3313
|
+
class er {
|
|
3314
3314
|
_floorSelector;
|
|
3315
3315
|
_isEnabled;
|
|
3316
3316
|
_position;
|
|
@@ -3345,7 +3345,7 @@ class Ji {
|
|
|
3345
3345
|
return this._position;
|
|
3346
3346
|
}
|
|
3347
3347
|
}
|
|
3348
|
-
class
|
|
3348
|
+
class tr {
|
|
3349
3349
|
_indoor;
|
|
3350
3350
|
_isEnabled = !0;
|
|
3351
3351
|
constructor(e) {
|
|
@@ -3361,7 +3361,7 @@ class er {
|
|
|
3361
3361
|
return this._isEnabled;
|
|
3362
3362
|
}
|
|
3363
3363
|
}
|
|
3364
|
-
class
|
|
3364
|
+
class ir {
|
|
3365
3365
|
_indoor;
|
|
3366
3366
|
_isEnabled = !0;
|
|
3367
3367
|
constructor(e) {
|
|
@@ -3377,7 +3377,7 @@ class tr {
|
|
|
3377
3377
|
return this._isEnabled;
|
|
3378
3378
|
}
|
|
3379
3379
|
}
|
|
3380
|
-
class
|
|
3380
|
+
class rr {
|
|
3381
3381
|
_indoor;
|
|
3382
3382
|
_isEnabled = !0;
|
|
3383
3383
|
constructor(e) {
|
|
@@ -3393,7 +3393,7 @@ class ir {
|
|
|
3393
3393
|
return this._isEnabled;
|
|
3394
3394
|
}
|
|
3395
3395
|
}
|
|
3396
|
-
class
|
|
3396
|
+
class sr {
|
|
3397
3397
|
_indoor;
|
|
3398
3398
|
_isEnabled = !0;
|
|
3399
3399
|
constructor(e) {
|
|
@@ -3409,8 +3409,8 @@ class rr {
|
|
|
3409
3409
|
return this._isEnabled;
|
|
3410
3410
|
}
|
|
3411
3411
|
}
|
|
3412
|
-
const it = "Map_mapClick", rt = "Map_pointClick",
|
|
3413
|
-
let
|
|
3412
|
+
const it = "Map_mapClick", rt = "Map_pointClick", st = "Map_isRenderComplete", Ie = "Map_isDestroyed", X = fe.getInstance();
|
|
3413
|
+
let ka = class {
|
|
3414
3414
|
_map;
|
|
3415
3415
|
_indoor;
|
|
3416
3416
|
_poi;
|
|
@@ -3421,11 +3421,11 @@ let Aa = class {
|
|
|
3421
3421
|
_dispatch = mt(
|
|
3422
3422
|
it,
|
|
3423
3423
|
rt,
|
|
3424
|
-
|
|
3425
|
-
|
|
3424
|
+
st,
|
|
3425
|
+
Ie
|
|
3426
3426
|
);
|
|
3427
3427
|
_fitBounds;
|
|
3428
|
-
_history =
|
|
3428
|
+
_history = G.getInstance();
|
|
3429
3429
|
_transformRequestHandler;
|
|
3430
3430
|
isDestroyed = !1;
|
|
3431
3431
|
/** @deprecated Use "outdoorClickSelection" instead */
|
|
@@ -3438,7 +3438,7 @@ let Aa = class {
|
|
|
3438
3438
|
floorSelector;
|
|
3439
3439
|
constructor(e) {
|
|
3440
3440
|
if (!e.map)
|
|
3441
|
-
throw new
|
|
3441
|
+
throw new Ot("Parameter 'Map' is required!", {
|
|
3442
3442
|
type: "ValidationError"
|
|
3443
3443
|
});
|
|
3444
3444
|
X.registerSDK(), this._permissionCheck().then(() => this._setup(e)).catch((i) => {
|
|
@@ -3451,7 +3451,7 @@ let Aa = class {
|
|
|
3451
3451
|
* @param callback
|
|
3452
3452
|
*/
|
|
3453
3453
|
renderComplete(e) {
|
|
3454
|
-
const i = J(`${
|
|
3454
|
+
const i = J(`${st}.`);
|
|
3455
3455
|
this._dispatch.on(i, e);
|
|
3456
3456
|
}
|
|
3457
3457
|
/**
|
|
@@ -3459,9 +3459,9 @@ let Aa = class {
|
|
|
3459
3459
|
* @param callback
|
|
3460
3460
|
*/
|
|
3461
3461
|
destroyed(e) {
|
|
3462
|
-
const i = J(`${
|
|
3462
|
+
const i = J(`${Ie}.`);
|
|
3463
3463
|
this._dispatch.on(i, () => {
|
|
3464
|
-
e(), this._dispatch.on(i, null), this._dispatch._[
|
|
3464
|
+
e(), this._dispatch.on(i, null), this._dispatch._[Ie].length === 0 && (delete this._dispatch, Object.freeze(this));
|
|
3465
3465
|
});
|
|
3466
3466
|
}
|
|
3467
3467
|
/**
|
|
@@ -3513,10 +3513,10 @@ let Aa = class {
|
|
|
3513
3513
|
if (this._language === e) return;
|
|
3514
3514
|
this._language = e;
|
|
3515
3515
|
const i = this._map?.getStyle()?.layers || [];
|
|
3516
|
-
for (const { id: r, type:
|
|
3517
|
-
if (!this._map.getLayer(r) ||
|
|
3518
|
-
const
|
|
3519
|
-
!
|
|
3516
|
+
for (const { id: r, type: n } of i) {
|
|
3517
|
+
if (!this._map.getLayer(r) || n !== "symbol") continue;
|
|
3518
|
+
const s = this._map.getLayoutProperty(r, "text-field");
|
|
3519
|
+
!s || typeof s == "string" || this._map.setLayoutProperty(r, "text-field", [
|
|
3520
3520
|
"coalesce",
|
|
3521
3521
|
["get", `name:${e}`],
|
|
3522
3522
|
["get", "name"],
|
|
@@ -3553,29 +3553,29 @@ let Aa = class {
|
|
|
3553
3553
|
* @returns
|
|
3554
3554
|
*/
|
|
3555
3555
|
queryIndoorFeaturesByPoint(e) {
|
|
3556
|
-
const { x: i, y: r } = e,
|
|
3556
|
+
const { x: i, y: r } = e, n = this._map.queryRenderedFeatures([i, r], {
|
|
3557
3557
|
layers: [
|
|
3558
3558
|
"mapxus-venue-fill",
|
|
3559
3559
|
"mapxus-building-line",
|
|
3560
3560
|
Re,
|
|
3561
3561
|
$
|
|
3562
3562
|
]
|
|
3563
|
-
}),
|
|
3563
|
+
}), s = n.find(
|
|
3564
3564
|
(o) => o.layer.id === "mapxus-venue-fill"
|
|
3565
3565
|
);
|
|
3566
|
-
if (
|
|
3566
|
+
if (s) {
|
|
3567
3567
|
const o = this._history.getHistoryOrdinal(
|
|
3568
|
-
|
|
3569
|
-
), a =
|
|
3568
|
+
s.properties.id
|
|
3569
|
+
), a = n.find(
|
|
3570
3570
|
(l) => l.properties?.ordinal === o
|
|
3571
3571
|
);
|
|
3572
3572
|
if (a) {
|
|
3573
3573
|
if (a.sourceLayer === "mapxus_shared_level")
|
|
3574
|
-
return { venue:
|
|
3575
|
-
const l =
|
|
3574
|
+
return { venue: s, sharedLevel: a };
|
|
3575
|
+
const l = n.find(
|
|
3576
3576
|
(d) => d.properties.id === a.properties["ref:building"]
|
|
3577
3577
|
);
|
|
3578
|
-
return { venue:
|
|
3578
|
+
return { venue: s, building: l, level: a };
|
|
3579
3579
|
}
|
|
3580
3580
|
}
|
|
3581
3581
|
return null;
|
|
@@ -3587,7 +3587,7 @@ let Aa = class {
|
|
|
3587
3587
|
* @param ordinal
|
|
3588
3588
|
*/
|
|
3589
3589
|
getIndoorFeaturesByCoordinates(e, i) {
|
|
3590
|
-
const r = this._map.project(e),
|
|
3590
|
+
const r = this._map.project(e), n = this._map.queryRenderedFeatures(r, {
|
|
3591
3591
|
layers: [
|
|
3592
3592
|
"mapxus-venue-fill",
|
|
3593
3593
|
"mapxus-building-line",
|
|
@@ -3595,15 +3595,15 @@ let Aa = class {
|
|
|
3595
3595
|
"mapxus-level-fill-overlap-copy"
|
|
3596
3596
|
]
|
|
3597
3597
|
});
|
|
3598
|
-
if (
|
|
3598
|
+
if (n.length === 0)
|
|
3599
3599
|
return { venue: null, building: null, level: null };
|
|
3600
|
-
const o =
|
|
3600
|
+
const o = n.filter(
|
|
3601
3601
|
(d) => d.layer.id.includes("mapxus-level-fill")
|
|
3602
3602
|
).find((d) => Number.isFinite(i) ? d.properties.ordinal === i + "" : d.layer.id.startsWith("mapxus-level-fill"));
|
|
3603
3603
|
if (!o)
|
|
3604
3604
|
return { venue: null, building: null, level: null };
|
|
3605
|
-
const a =
|
|
3606
|
-
return { venue:
|
|
3605
|
+
const a = n.find((d) => d.properties.id === o.properties["ref:building"]);
|
|
3606
|
+
return { venue: n.find((d) => d.properties.id === a.properties["ref:venue"]), building: a, level: o };
|
|
3607
3607
|
}
|
|
3608
3608
|
/**
|
|
3609
3609
|
* Query rendered features from bbox by id. One id may correspond to multiple features,
|
|
@@ -3630,93 +3630,116 @@ let Aa = class {
|
|
|
3630
3630
|
* Default is true.
|
|
3631
3631
|
*/
|
|
3632
3632
|
async selectFloorById(e, i) {
|
|
3633
|
-
const { dragPan: r = !0, animate:
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3633
|
+
const { dragPan: r = !0, animate: n = !0, fitBounds: s } = i || {}, o = s ?? this._fitBounds, a = async () => {
|
|
3634
|
+
try {
|
|
3635
|
+
const l = await ci(e);
|
|
3636
|
+
if (l?.bbox) {
|
|
3637
|
+
const { maxLat: d, maxLon: u, minLat: h, minLon: c } = l.bbox;
|
|
3638
|
+
return this._indoor.dragPanHandler.setBounds([
|
|
3639
|
+
c,
|
|
3640
|
+
h,
|
|
3641
|
+
u,
|
|
3642
|
+
d
|
|
3643
|
+
]), !0;
|
|
3644
|
+
}
|
|
3645
|
+
return !1;
|
|
3646
|
+
} catch (l) {
|
|
3647
|
+
return console.error(
|
|
3648
|
+
"Failed to fetch bounds for floor:",
|
|
3649
|
+
e,
|
|
3650
|
+
l
|
|
3651
|
+
), !1;
|
|
3652
|
+
}
|
|
3641
3653
|
};
|
|
3642
|
-
if (this._indoor.setDragPan(r), this._indoor.setFitBounds(o), this._indoor.dragPanHandler.setAnimated(
|
|
3654
|
+
if (this._indoor.setDragPan(r), this._indoor.setFitBounds(o), this._indoor.dragPanHandler.setAnimated(n), e === this.floor?.id) {
|
|
3643
3655
|
if (!r) return;
|
|
3644
|
-
|
|
3656
|
+
if (o) {
|
|
3657
|
+
if (!this._indoor.dragPanHandler.getBounds() && !await a())
|
|
3658
|
+
return;
|
|
3659
|
+
await this._indoor.dragPanHandler.fitBounds();
|
|
3660
|
+
} else
|
|
3661
|
+
this._indoor.dragPanHandler.panToCenter();
|
|
3645
3662
|
} else {
|
|
3646
|
-
let l = !1, d = (this._map.getLayer("mapxus-building-line") ? this._map.queryRenderedFeatures({
|
|
3663
|
+
let l = !1, d = !1, u = (this._map.getLayer("mapxus-building-line") ? this._map.queryRenderedFeatures({
|
|
3647
3664
|
layers: ["mapxus-building-line"]
|
|
3648
3665
|
}) : []).find(
|
|
3649
3666
|
(c) => c.properties?.level_ids?.includes(e)
|
|
3650
3667
|
) ?? null;
|
|
3651
|
-
if (
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
if (d)
|
|
3657
|
-
o && await a();
|
|
3658
|
-
else {
|
|
3659
|
-
const c = await ui(e), { maxLat: h, maxLon: f, minLat: p, minLon: _ } = c.bbox;
|
|
3660
|
-
l = !0, d = c.feature, this._indoor.dragPanHandler.setBounds([
|
|
3668
|
+
if (!u)
|
|
3669
|
+
try {
|
|
3670
|
+
const c = await ci(e), { maxLat: f, maxLon: p, minLat: _, minLon: g } = c.bbox;
|
|
3671
|
+
d = !0, l = !0, u = c.feature, this._indoor.dragPanHandler.setBounds([
|
|
3672
|
+
g,
|
|
3661
3673
|
_,
|
|
3662
3674
|
p,
|
|
3663
|
-
f
|
|
3664
|
-
h
|
|
3675
|
+
f
|
|
3665
3676
|
]);
|
|
3677
|
+
} catch (c) {
|
|
3678
|
+
console.error(
|
|
3679
|
+
"Failed to fetch building feature for floor:",
|
|
3680
|
+
e,
|
|
3681
|
+
c
|
|
3682
|
+
);
|
|
3683
|
+
return;
|
|
3666
3684
|
}
|
|
3667
|
-
|
|
3685
|
+
if (o && !d && !await a())
|
|
3686
|
+
return;
|
|
3687
|
+
if (!!(u && u.properties?.id === this.building?.properties?.id)) {
|
|
3688
|
+
const { level_ids: c, ordinals: f } = u.properties, p = L(c).indexOf(e), _ = L(f)[p] ?? null;
|
|
3689
|
+
await this._floorsControl.switchByOrdinal(_, r);
|
|
3690
|
+
} else
|
|
3691
|
+
await this._indoor.selectBuilding(u, {
|
|
3668
3692
|
floorId: e,
|
|
3669
3693
|
featureIncomplete: l
|
|
3670
3694
|
});
|
|
3671
|
-
}
|
|
3672
3695
|
}
|
|
3673
3696
|
}
|
|
3674
3697
|
async selectSharedFloorById(e, i) {
|
|
3675
|
-
const { dragPan: r = !0, animate:
|
|
3676
|
-
const l = await
|
|
3698
|
+
const { dragPan: r = !0, animate: n = !0, fitBounds: s } = i || {}, o = s ?? this._fitBounds, a = async () => {
|
|
3699
|
+
const l = await Ra(e), { maxLat: d, maxLon: u, minLat: h, minLon: c } = l?.bbox || {};
|
|
3677
3700
|
this._indoor.dragPanHandler.setBounds([
|
|
3678
|
-
h,
|
|
3679
3701
|
c,
|
|
3702
|
+
h,
|
|
3680
3703
|
u,
|
|
3681
3704
|
d
|
|
3682
3705
|
]);
|
|
3683
3706
|
};
|
|
3684
|
-
if (this._indoor.setDragPan(r), this._indoor.setFitBounds(o), this._indoor.dragPanHandler.setAnimated(
|
|
3707
|
+
if (this._indoor.setDragPan(r), this._indoor.setFitBounds(o), this._indoor.dragPanHandler.setAnimated(n), e === this.floor?.id) {
|
|
3685
3708
|
if (!r) return;
|
|
3686
3709
|
o ? (this._indoor.dragPanHandler.getBounds() || await a(), await this._indoor.dragPanHandler.fitBounds()) : this._indoor.dragPanHandler.panToCenter();
|
|
3687
3710
|
} else {
|
|
3688
3711
|
let l = !1, d, u;
|
|
3689
|
-
const
|
|
3712
|
+
const h = (this._map.getLayer($) ? this._map.queryRenderedFeatures({
|
|
3690
3713
|
layers: [$]
|
|
3691
3714
|
}) : []).find(
|
|
3692
|
-
(
|
|
3715
|
+
(c) => c.properties?.id === e
|
|
3693
3716
|
) ?? null;
|
|
3694
|
-
if (
|
|
3717
|
+
if (h)
|
|
3695
3718
|
o && await a();
|
|
3696
3719
|
else {
|
|
3697
|
-
const
|
|
3698
|
-
u =
|
|
3699
|
-
const { maxLat: f, maxLon: p, minLat: _, minLon: g } =
|
|
3720
|
+
const c = await Ii(e);
|
|
3721
|
+
u = It(c), l = !0;
|
|
3722
|
+
const { maxLat: f, maxLon: p, minLat: _, minLon: g } = c?.bbox || {};
|
|
3700
3723
|
this._indoor.dragPanHandler.setBounds([
|
|
3701
3724
|
g,
|
|
3702
3725
|
_,
|
|
3703
3726
|
p,
|
|
3704
3727
|
f
|
|
3705
3728
|
]);
|
|
3706
|
-
const y =
|
|
3729
|
+
const y = c.sharedFloors.find(
|
|
3707
3730
|
({ id: w }) => w === e
|
|
3708
3731
|
), { id: v, name: B, ordinal: C } = y;
|
|
3709
3732
|
d = { id: v, name: B, ordinal: C + "" };
|
|
3710
3733
|
}
|
|
3711
3734
|
if (!l) {
|
|
3712
3735
|
const {
|
|
3713
|
-
id:
|
|
3736
|
+
id: c,
|
|
3714
3737
|
name: f,
|
|
3715
3738
|
ordinal: p,
|
|
3716
3739
|
"ref:venue": _
|
|
3717
|
-
} =
|
|
3740
|
+
} = h.properties || {};
|
|
3718
3741
|
d = {
|
|
3719
|
-
id:
|
|
3742
|
+
id: c,
|
|
3720
3743
|
name: typeof f == "string" ? { default: f } : f,
|
|
3721
3744
|
ordinal: p
|
|
3722
3745
|
}, u = (this._map.getLayer("mapxus-venue-fill") ? this._map.queryRenderedFeatures({
|
|
@@ -3741,16 +3764,16 @@ let Aa = class {
|
|
|
3741
3764
|
* Default is true.
|
|
3742
3765
|
*/
|
|
3743
3766
|
async selectBuildingById(e, i) {
|
|
3744
|
-
const { dragPan: r = !0, animate:
|
|
3745
|
-
const l = await ot(e), { maxLat: d, maxLon: u, minLat:
|
|
3767
|
+
const { dragPan: r = !0, animate: n = !0, fitBounds: s } = i || {}, o = s ?? this._fitBounds, a = async () => {
|
|
3768
|
+
const l = await ot(e), { maxLat: d, maxLon: u, minLat: h, minLon: c } = l?.bbox || {};
|
|
3746
3769
|
this._indoor.dragPanHandler.setBounds([
|
|
3747
|
-
h,
|
|
3748
3770
|
c,
|
|
3771
|
+
h,
|
|
3749
3772
|
u,
|
|
3750
3773
|
d
|
|
3751
3774
|
]);
|
|
3752
3775
|
};
|
|
3753
|
-
if (this._indoor.setDragPan(r), this._indoor.setFitBounds(o), this._indoor.dragPanHandler.setAnimated(
|
|
3776
|
+
if (this._indoor.setDragPan(r), this._indoor.setFitBounds(o), this._indoor.dragPanHandler.setAnimated(n), e === this.building?.properties?.id) {
|
|
3754
3777
|
if (!r) return;
|
|
3755
3778
|
o ? (this._indoor.dragPanHandler.getBounds() || await a(), await this._indoor.dragPanHandler.fitBounds()) : this._indoor.dragPanHandler.panToCenter();
|
|
3756
3779
|
} else {
|
|
@@ -3762,12 +3785,12 @@ let Aa = class {
|
|
|
3762
3785
|
if (d)
|
|
3763
3786
|
o && await a();
|
|
3764
3787
|
else {
|
|
3765
|
-
const u = await ot(e), { maxLat:
|
|
3766
|
-
d =
|
|
3788
|
+
const u = await ot(e), { maxLat: h, maxLon: c, minLat: f, minLon: p } = u?.bbox || {};
|
|
3789
|
+
d = pi(u), l = !0, this._indoor.dragPanHandler.setBounds([
|
|
3767
3790
|
p,
|
|
3768
3791
|
f,
|
|
3769
|
-
|
|
3770
|
-
|
|
3792
|
+
c,
|
|
3793
|
+
h
|
|
3771
3794
|
]);
|
|
3772
3795
|
}
|
|
3773
3796
|
await this._indoor?.selectBuilding(d, {
|
|
@@ -3786,38 +3809,38 @@ let Aa = class {
|
|
|
3786
3809
|
await this._indoor?.selectBuilding(null);
|
|
3787
3810
|
return;
|
|
3788
3811
|
}
|
|
3789
|
-
const { dragPan:
|
|
3790
|
-
const d = await at(e), { maxLat: u, maxLon:
|
|
3812
|
+
const { dragPan: n = !0, animate: s = !0, fitBounds: o } = i || {}, a = o ?? this._fitBounds, l = async () => {
|
|
3813
|
+
const d = await at(e), { maxLat: u, maxLon: h, minLat: c, minLon: f } = d?.bbox || {};
|
|
3791
3814
|
this._indoor.dragPanHandler.setBounds([
|
|
3792
3815
|
f,
|
|
3793
|
-
h,
|
|
3794
3816
|
c,
|
|
3817
|
+
h,
|
|
3795
3818
|
u
|
|
3796
3819
|
]);
|
|
3797
3820
|
};
|
|
3798
|
-
if (this._indoor.setDragPan(
|
|
3799
|
-
if (!
|
|
3821
|
+
if (this._indoor.setDragPan(n), this._indoor.setFitBounds(a), this._indoor.dragPanHandler.setAnimated(s), e === this.venue?.properties?.id) {
|
|
3822
|
+
if (!n) return;
|
|
3800
3823
|
a ? (this._indoor.dragPanHandler.getBounds() || await l(), await this._indoor.dragPanHandler.fitBounds()) : this._indoor.dragPanHandler.panToCenter();
|
|
3801
3824
|
} else {
|
|
3802
3825
|
const d = this._history.getHistoryBuildingUnit(e);
|
|
3803
3826
|
if (d) {
|
|
3804
|
-
const { id: u, type:
|
|
3805
|
-
|
|
3827
|
+
const { id: u, type: h } = d;
|
|
3828
|
+
h === "building" ? await this.selectBuildingById(u, i) : await this.selectSharedFloorById(u, i);
|
|
3806
3829
|
} else {
|
|
3807
3830
|
const u = (this._map.getLayer("mapxus-venue-fill") ? this._map.queryRenderedFeatures({
|
|
3808
3831
|
layers: ["mapxus-venue-fill"]
|
|
3809
3832
|
}) : []).find(
|
|
3810
|
-
(
|
|
3833
|
+
(c) => c.properties?.id === e
|
|
3811
3834
|
) ?? null;
|
|
3812
|
-
let
|
|
3835
|
+
let h;
|
|
3813
3836
|
if (u) {
|
|
3814
|
-
const { default_displayed_building:
|
|
3815
|
-
|
|
3837
|
+
const { default_displayed_building: c, building_ids: f } = u.properties;
|
|
3838
|
+
h = c || L(f)[0];
|
|
3816
3839
|
} else {
|
|
3817
|
-
const
|
|
3818
|
-
|
|
3840
|
+
const c = await at(e);
|
|
3841
|
+
h = c.defaultBuilding || c.buildings[0]?.id;
|
|
3819
3842
|
}
|
|
3820
|
-
await this.selectBuildingById(
|
|
3843
|
+
await this.selectBuildingById(h, i);
|
|
3821
3844
|
}
|
|
3822
3845
|
}
|
|
3823
3846
|
}
|
|
@@ -3882,22 +3905,22 @@ let Aa = class {
|
|
|
3882
3905
|
const {
|
|
3883
3906
|
map: i,
|
|
3884
3907
|
poiId: r,
|
|
3885
|
-
sharedFloorId:
|
|
3886
|
-
floorId:
|
|
3908
|
+
sharedFloorId: n,
|
|
3909
|
+
floorId: s,
|
|
3887
3910
|
buildingId: o,
|
|
3888
3911
|
venueId: a,
|
|
3889
|
-
theme: l =
|
|
3912
|
+
theme: l = Zi.MAPXUS_DEFAULT,
|
|
3890
3913
|
floorSelectorEnabled: d,
|
|
3891
3914
|
buildingSelectorEnabled: u,
|
|
3892
|
-
outdoorMapShown:
|
|
3893
|
-
collapseCopyright:
|
|
3915
|
+
outdoorMapShown: h = !0,
|
|
3916
|
+
collapseCopyright: c = !1,
|
|
3894
3917
|
maskNonSelectedAreas: f = !1,
|
|
3895
3918
|
fitBuildingBounds: p,
|
|
3896
3919
|
fitBounds: _,
|
|
3897
3920
|
boundsPadding: g = 30,
|
|
3898
3921
|
selectedHighlightStyle: y,
|
|
3899
3922
|
floorSelectorStyle: v,
|
|
3900
|
-
language: B =
|
|
3923
|
+
language: B = wr,
|
|
3901
3924
|
autoSelectBuilding: C = !1,
|
|
3902
3925
|
transformRequest: w = null,
|
|
3903
3926
|
mapxusLogoEnabled: b = !0,
|
|
@@ -3905,10 +3928,10 @@ let Aa = class {
|
|
|
3905
3928
|
enableOutdoorClickSelection: x = !0,
|
|
3906
3929
|
floorSwitchScope: P = bt.VENUE
|
|
3907
3930
|
} = e;
|
|
3908
|
-
this._map = i, this._fitBounds = _ ?? p ?? !1, this._indoor = new
|
|
3931
|
+
this._map = i, this._fitBounds = _ ?? p ?? !1, this._indoor = new Gi({
|
|
3909
3932
|
map: this._map,
|
|
3910
|
-
startWithIndoorView: !!(a || o ||
|
|
3911
|
-
outdoorMapShown:
|
|
3933
|
+
startWithIndoorView: !!(a || o || s || r || n),
|
|
3934
|
+
outdoorMapShown: h,
|
|
3912
3935
|
fitBounds: this._fitBounds,
|
|
3913
3936
|
boundsPadding: g,
|
|
3914
3937
|
maskNonSelectedAreas: f,
|
|
@@ -3916,23 +3939,23 @@ let Aa = class {
|
|
|
3916
3939
|
enableIndoorClickSelection: E,
|
|
3917
3940
|
enableOutdoorClickSelection: x,
|
|
3918
3941
|
floorSwitchScope: P
|
|
3919
|
-
}), this._poi = new
|
|
3942
|
+
}), this._poi = new Yi(this._map), this._transformRequestHandler = w, this._resourceRequestTransform(), this._installRtlTextPlugin(), this._setStyle(tt(l)), X.setTheme(l), this._checkMapZoom(), c ? this._attributionControl = new Aa() : (this._attributionControl = new Ma({
|
|
3920
3943
|
theme: l
|
|
3921
|
-
}), this._addControl(new
|
|
3922
|
-
this._buildingFilterControl = new
|
|
3944
|
+
}), this._addControl(new Oa({ enabled: b }))), this._addControl(this._attributionControl), this._addControl(
|
|
3945
|
+
this._buildingFilterControl = new Wi(
|
|
3923
3946
|
this,
|
|
3924
3947
|
u
|
|
3925
3948
|
)
|
|
3926
3949
|
), this._addControl(
|
|
3927
|
-
this._floorsControl = new
|
|
3950
|
+
this._floorsControl = new Xi(this._indoor, {
|
|
3928
3951
|
language: B,
|
|
3929
3952
|
style: v,
|
|
3930
3953
|
enabled: d
|
|
3931
3954
|
})
|
|
3932
|
-
), r ? this._selectPoiById(r) :
|
|
3955
|
+
), r ? this._selectPoiById(r) : s ? this.selectFloorById(s, { animate: !1 }) : o ? this.selectBuildingById(o, { animate: !1 }) : a ? this.selectVenueById(a, { animate: !1 }) : n && this.selectSharedFloorById(n, { animate: !1 }), this.switchOutdoor = new ir(this._indoor), this.switchBuilding = new tr(this._indoor), this.outdoorClickSelection = new sr(this._indoor), this.indoorClickSelection = new rr(this._indoor), this.buildingSelector = new Ji(
|
|
3933
3956
|
this._buildingFilterControl
|
|
3934
|
-
), this.floorSelector = new
|
|
3935
|
-
C && this._map.on("moveend", () => this._selectCenterBuilding()), this._bindMapClickListener(), this._dispatch.call(
|
|
3957
|
+
), this.floorSelector = new er(this._floorsControl), this._map.once("styledata", () => this.setLanguage(B)), this._map.on("remove", () => this._destroy()), this._map.on("error", (I) => this._updatePermission(I)), this._indoor.once(ht, () => {
|
|
3958
|
+
C && this._map.on("moveend", () => this._selectCenterBuilding()), this._bindMapClickListener(), this._dispatch.call(st);
|
|
3936
3959
|
});
|
|
3937
3960
|
}
|
|
3938
3961
|
_setStyle(e, i) {
|
|
@@ -3946,10 +3969,10 @@ let Aa = class {
|
|
|
3946
3969
|
}
|
|
3947
3970
|
async _selectPoiById(e) {
|
|
3948
3971
|
try {
|
|
3949
|
-
const i = await
|
|
3972
|
+
const i = await Tr(e), { lon: r, lat: n } = i.location;
|
|
3950
3973
|
"floorId" in i ? await this.selectFloorById(i.floorId, { animate: !1 }) : "sharedFloorId" in i && await this.selectSharedFloorById(i.sharedFloorId, {
|
|
3951
3974
|
animate: !1
|
|
3952
|
-
}), this._map.panTo([r,
|
|
3975
|
+
}), this._map.panTo([r, n], { animate: !1 });
|
|
3953
3976
|
} catch (i) {
|
|
3954
3977
|
this._dispatchErrorGlobal("initError", i);
|
|
3955
3978
|
}
|
|
@@ -3958,14 +3981,14 @@ let Aa = class {
|
|
|
3958
3981
|
_resourceRequestTransform() {
|
|
3959
3982
|
this._map.setTransformRequest(
|
|
3960
3983
|
(e, i) => {
|
|
3961
|
-
const { host: r } = new URL(e),
|
|
3962
|
-
return
|
|
3984
|
+
const { host: r } = new URL(e), n = r.includes("map-api") && r.includes("mapxus"), s = vr();
|
|
3985
|
+
return n ? {
|
|
3963
3986
|
url: e,
|
|
3964
3987
|
headers: {
|
|
3965
3988
|
"Content-Type": "application/json",
|
|
3966
|
-
sdkVersion: `web-${
|
|
3967
|
-
identifier:
|
|
3968
|
-
token:
|
|
3989
|
+
sdkVersion: `web-${$t.MapSDK}/${gr}`,
|
|
3990
|
+
identifier: s.identifier,
|
|
3991
|
+
token: s.token
|
|
3969
3992
|
}
|
|
3970
3993
|
} : this._transformRequestHandler ? this._transformRequestHandler(e, i) : { url: e };
|
|
3971
3994
|
}
|
|
@@ -3979,7 +4002,7 @@ let Aa = class {
|
|
|
3979
4002
|
}
|
|
3980
4003
|
async _updatePermission(e) {
|
|
3981
4004
|
if (e.error?.status !== 401) return;
|
|
3982
|
-
await
|
|
4005
|
+
await Sr(), this._resourceRequestTransform();
|
|
3983
4006
|
const i = e.error.url;
|
|
3984
4007
|
/^https:\/\/[^/]+\/bms\/api\/v\d+\/tiles\/styles\//.test(i) && X.theme && this._setStyle(tt(X.theme));
|
|
3985
4008
|
}
|
|
@@ -3988,10 +4011,10 @@ let Aa = class {
|
|
|
3988
4011
|
if (!e.size) return;
|
|
3989
4012
|
let i = e.entries().next().value[1];
|
|
3990
4013
|
const r = this._history.getVisitedBuildingUnits().reverse();
|
|
3991
|
-
for (const
|
|
3992
|
-
const { id:
|
|
3993
|
-
if (e.get(
|
|
3994
|
-
i =
|
|
4014
|
+
for (const n of r) {
|
|
4015
|
+
const { id: s } = n;
|
|
4016
|
+
if (e.get(s)) {
|
|
4017
|
+
i = n;
|
|
3995
4018
|
break;
|
|
3996
4019
|
}
|
|
3997
4020
|
}
|
|
@@ -4002,28 +4025,28 @@ let Aa = class {
|
|
|
4002
4025
|
* @returns Map<buildingId, buildingFeature>
|
|
4003
4026
|
*/
|
|
4004
4027
|
_getCenterBuildingUnitsMap() {
|
|
4005
|
-
const e = this._map.getCanvas().getBoundingClientRect(), i = e.width / 4, r = e.height / 4,
|
|
4028
|
+
const e = this._map.getCanvas().getBoundingClientRect(), i = e.width / 4, r = e.height / 4, n = [i, r], s = [
|
|
4006
4029
|
e.width - i,
|
|
4007
4030
|
e.height - r
|
|
4008
4031
|
], o = [
|
|
4009
4032
|
"mapxus-building-line",
|
|
4010
4033
|
$
|
|
4011
4034
|
].filter((u) => this._map.getLayer(u)), a = this._map.queryRenderedFeatures(
|
|
4012
|
-
[
|
|
4035
|
+
[n, s],
|
|
4013
4036
|
{
|
|
4014
4037
|
layers: o
|
|
4015
4038
|
}
|
|
4016
|
-
), d =
|
|
4039
|
+
), d = zi(a, "properties.id").filter(
|
|
4017
4040
|
(u) => !this._indoor.layeredHandler.getHiddenBuildings().includes(u.properties.id)
|
|
4018
4041
|
);
|
|
4019
4042
|
return new globalThis.Map(
|
|
4020
4043
|
d.map((u) => {
|
|
4021
|
-
const { properties:
|
|
4044
|
+
const { properties: h } = u;
|
|
4022
4045
|
return [
|
|
4023
|
-
`${
|
|
4046
|
+
`${h.id}`,
|
|
4024
4047
|
{
|
|
4025
|
-
id:
|
|
4026
|
-
type:
|
|
4048
|
+
id: h.id,
|
|
4049
|
+
type: h.building ? "building" : "sharedFloor"
|
|
4027
4050
|
}
|
|
4028
4051
|
];
|
|
4029
4052
|
})
|
|
@@ -4031,29 +4054,29 @@ let Aa = class {
|
|
|
4031
4054
|
}
|
|
4032
4055
|
_bindMapClickListener() {
|
|
4033
4056
|
this._map.on("click", async (e) => {
|
|
4034
|
-
const { point: i, lngLat: r } = e,
|
|
4035
|
-
await this._indoor.selectByClickMap(
|
|
4057
|
+
const { point: i, lngLat: r } = e, n = this._indoor.queryIndoorInfoByPoint(i);
|
|
4058
|
+
await this._indoor.selectByClickMap(n), this._dispatch.call(rt, null, {
|
|
4036
4059
|
point: i,
|
|
4037
4060
|
coordinate: r
|
|
4038
|
-
}), this._dispatch.call(it, null,
|
|
4061
|
+
}), this._dispatch.call(it, null, n);
|
|
4039
4062
|
});
|
|
4040
4063
|
}
|
|
4041
4064
|
_dispatchErrorGlobal(e, i) {
|
|
4042
4065
|
const r = X.getGlobalDispatcher();
|
|
4043
4066
|
if (!r) return;
|
|
4044
|
-
const
|
|
4045
|
-
r.call(e, null, { status:
|
|
4067
|
+
const n = i.response?.status || i.status || "unknown", s = i.response?.data?.message || i.message || "unknown";
|
|
4068
|
+
r.call(e, null, { status: n, message: s });
|
|
4046
4069
|
}
|
|
4047
4070
|
_installRtlTextPlugin() {
|
|
4048
|
-
|
|
4071
|
+
xt.getRTLTextPluginStatus() === "unavailable" && xt.setRTLTextPlugin(
|
|
4049
4072
|
"https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.3.0/dist/mapbox-gl-rtl-text.js",
|
|
4050
4073
|
!0
|
|
4051
4074
|
);
|
|
4052
4075
|
}
|
|
4053
4076
|
async _permissionCheck() {
|
|
4054
4077
|
try {
|
|
4055
|
-
if (!(await
|
|
4056
|
-
throw new
|
|
4078
|
+
if (!(await Ir($t.MapSDK) === "true"))
|
|
4079
|
+
throw new Ot("Permission invalid!", {
|
|
4057
4080
|
status: 403,
|
|
4058
4081
|
type: "PermissionError"
|
|
4059
4082
|
});
|
|
@@ -4067,26 +4090,26 @@ let Aa = class {
|
|
|
4067
4090
|
this.isDestroyed = !0;
|
|
4068
4091
|
const e = this._dispatch._;
|
|
4069
4092
|
for (const i in e)
|
|
4070
|
-
i !==
|
|
4093
|
+
i !== Ie && e.hasOwnProperty(i) && e[i].forEach(({ name: r }) => {
|
|
4071
4094
|
this._dispatch.on(`${i}.${r}`, null);
|
|
4072
4095
|
});
|
|
4073
4096
|
this._indoor.destroy(), this._poi.destroy(), Object.keys(this).forEach((i) => {
|
|
4074
4097
|
i !== "isDestroyed" && i !== "_dispatch" && delete this[i];
|
|
4075
|
-
}), this._dispatch.call(
|
|
4098
|
+
}), this._dispatch.call(Ie);
|
|
4076
4099
|
}
|
|
4077
4100
|
};
|
|
4078
|
-
async function
|
|
4079
|
-
const e = await
|
|
4101
|
+
async function ci(t) {
|
|
4102
|
+
const e = await Ar(t);
|
|
4080
4103
|
return {
|
|
4081
|
-
feature:
|
|
4104
|
+
feature: pi(e),
|
|
4082
4105
|
bbox: e.bbox
|
|
4083
4106
|
};
|
|
4084
4107
|
}
|
|
4085
|
-
async function
|
|
4086
|
-
const e = await
|
|
4087
|
-
return { feature:
|
|
4108
|
+
async function Ra(t) {
|
|
4109
|
+
const e = await Ii(t);
|
|
4110
|
+
return { feature: It(e), bbox: e.bbox };
|
|
4088
4111
|
}
|
|
4089
|
-
async function
|
|
4112
|
+
async function Le(t, e) {
|
|
4090
4113
|
if (!t.hasImage(e))
|
|
4091
4114
|
try {
|
|
4092
4115
|
const i = await t.loadImage(e);
|
|
@@ -4095,7 +4118,7 @@ async function Ie(t, e) {
|
|
|
4095
4118
|
throw new Error(i);
|
|
4096
4119
|
}
|
|
4097
4120
|
}
|
|
4098
|
-
class
|
|
4121
|
+
class Da {
|
|
4099
4122
|
_maplibreMap;
|
|
4100
4123
|
_layerId;
|
|
4101
4124
|
_sourceId;
|
|
@@ -4115,7 +4138,7 @@ class ka {
|
|
|
4115
4138
|
async setIcon(e) {
|
|
4116
4139
|
if (typeof e != "string" || !e.trim())
|
|
4117
4140
|
throw new Error("Icon must be a non-empty string.");
|
|
4118
|
-
await
|
|
4141
|
+
await Le(this._maplibreMap, e.trim()), this._imageName = e;
|
|
4119
4142
|
}
|
|
4120
4143
|
/**
|
|
4121
4144
|
* Set marker image size.
|
|
@@ -4162,29 +4185,29 @@ class ka {
|
|
|
4162
4185
|
* update: Array of features to update, the new properties will replace the old ones.
|
|
4163
4186
|
*/
|
|
4164
4187
|
updateData(e) {
|
|
4165
|
-
const i = !!(e.remove && e.remove.length), r = !!(e.add && e.add.length),
|
|
4188
|
+
const i = !!(e.remove && e.remove.length), r = !!(e.add && e.add.length), n = !!(e.update && e.update.length), s = this._maplibreMap.getSource(
|
|
4166
4189
|
this._sourceId
|
|
4167
4190
|
);
|
|
4168
|
-
if (!i && !r && !
|
|
4191
|
+
if (!i && !r && !n || !s) return;
|
|
4169
4192
|
const o = {};
|
|
4170
4193
|
i && (o.remove = e.remove), r && (o.add = e.add.map(
|
|
4171
4194
|
(a) => this._createIconFeature(a)
|
|
4172
|
-
)),
|
|
4173
|
-
const l = this._createIconFeature(a), { id: d, geometry: u, properties:
|
|
4195
|
+
)), n && (o.update = e.update.map((a) => {
|
|
4196
|
+
const l = this._createIconFeature(a), { id: d, geometry: u, properties: h } = l;
|
|
4174
4197
|
return {
|
|
4175
4198
|
id: d,
|
|
4176
4199
|
...u && { newGeometry: u },
|
|
4177
|
-
...
|
|
4178
|
-
addOrUpdateProperties: Object.entries(
|
|
4179
|
-
([
|
|
4180
|
-
key:
|
|
4200
|
+
...h && {
|
|
4201
|
+
addOrUpdateProperties: Object.entries(h).map(
|
|
4202
|
+
([c, f]) => ({
|
|
4203
|
+
key: c,
|
|
4181
4204
|
value: f
|
|
4182
4205
|
})
|
|
4183
4206
|
)
|
|
4184
4207
|
},
|
|
4185
|
-
...!u && !
|
|
4208
|
+
...!u && !h && { removeAllProperties: !0 }
|
|
4186
4209
|
};
|
|
4187
|
-
})),
|
|
4210
|
+
})), s.updateData(o);
|
|
4188
4211
|
}
|
|
4189
4212
|
/**
|
|
4190
4213
|
* Remove marker[s] layer and source.
|
|
@@ -4198,13 +4221,13 @@ class ka {
|
|
|
4198
4221
|
* @param callback
|
|
4199
4222
|
*/
|
|
4200
4223
|
on(e, i) {
|
|
4201
|
-
const r = (
|
|
4224
|
+
const r = (s) => this._handleEventListener(s, i), { unsubscribe: n } = this._maplibreMap.on(
|
|
4202
4225
|
e,
|
|
4203
4226
|
this._layerId,
|
|
4204
4227
|
r
|
|
4205
4228
|
);
|
|
4206
4229
|
return {
|
|
4207
|
-
off:
|
|
4230
|
+
off: n
|
|
4208
4231
|
};
|
|
4209
4232
|
}
|
|
4210
4233
|
/**
|
|
@@ -4286,7 +4309,7 @@ class ka {
|
|
|
4286
4309
|
*/
|
|
4287
4310
|
setOpacityByVenue(e, i, r) {
|
|
4288
4311
|
if (this._maplibreMap.getLayer(this._layerId)) {
|
|
4289
|
-
const
|
|
4312
|
+
const n = [
|
|
4290
4313
|
"case",
|
|
4291
4314
|
[
|
|
4292
4315
|
"all",
|
|
@@ -4305,7 +4328,7 @@ class ka {
|
|
|
4305
4328
|
this._maplibreMap.setPaintProperty(
|
|
4306
4329
|
this._layerId,
|
|
4307
4330
|
"icon-opacity",
|
|
4308
|
-
|
|
4331
|
+
n
|
|
4309
4332
|
);
|
|
4310
4333
|
}
|
|
4311
4334
|
}
|
|
@@ -4320,7 +4343,7 @@ class ka {
|
|
|
4320
4343
|
*/
|
|
4321
4344
|
setOpacityByBuilding(e, i, r) {
|
|
4322
4345
|
if (this._maplibreMap.getLayer(this._layerId)) {
|
|
4323
|
-
const
|
|
4346
|
+
const n = [
|
|
4324
4347
|
"case",
|
|
4325
4348
|
[
|
|
4326
4349
|
"all",
|
|
@@ -4339,7 +4362,7 @@ class ka {
|
|
|
4339
4362
|
this._maplibreMap.setPaintProperty(
|
|
4340
4363
|
this._layerId,
|
|
4341
4364
|
"icon-opacity",
|
|
4342
|
-
|
|
4365
|
+
n
|
|
4343
4366
|
);
|
|
4344
4367
|
}
|
|
4345
4368
|
}
|
|
@@ -4382,17 +4405,17 @@ class ka {
|
|
|
4382
4405
|
});
|
|
4383
4406
|
}
|
|
4384
4407
|
_handleEventListener(e, i) {
|
|
4385
|
-
const { point: r } = e,
|
|
4408
|
+
const { point: r } = e, n = this._maplibreMap.queryRenderedFeatures(r, {
|
|
4386
4409
|
layers: [this._layerId]
|
|
4387
4410
|
});
|
|
4388
|
-
i(
|
|
4411
|
+
i(n[0]);
|
|
4389
4412
|
}
|
|
4390
4413
|
}
|
|
4391
4414
|
function Ae(t) {
|
|
4392
4415
|
var e = t == null ? 0 : t.length;
|
|
4393
4416
|
return e ? t[e - 1] : void 0;
|
|
4394
4417
|
}
|
|
4395
|
-
const
|
|
4418
|
+
const nt = {
|
|
4396
4419
|
indoorLineColor: "#45b1cc",
|
|
4397
4420
|
outdoorLineColor: "#8183ba",
|
|
4398
4421
|
dashedLineColor: "#969696",
|
|
@@ -4413,21 +4436,21 @@ const st = {
|
|
|
4413
4436
|
size: 0.25,
|
|
4414
4437
|
spacing: 1
|
|
4415
4438
|
}
|
|
4416
|
-
}, Te = "mmws-source-line-solid",
|
|
4439
|
+
}, Te = "mmws-source-line-solid", ae = "mmws-layer-line-solid", le = "mmws-layer-icon-line-symbol", ft = "mmws-source-line-dashed", Q = "mmws-layer-line-dashed", pt = "mmws-source-icon-connector", nr = "mmws-layer-icon-connector", ke = "mmws-source-icon-marker", gt = "mmws-layer-icon-marker", hi = [
|
|
4440
|
+
ae,
|
|
4417
4441
|
le,
|
|
4418
|
-
de,
|
|
4419
4442
|
Q,
|
|
4420
4443
|
nr,
|
|
4421
4444
|
gt
|
|
4422
|
-
],
|
|
4445
|
+
], Ha = [
|
|
4423
4446
|
Te,
|
|
4424
4447
|
ft,
|
|
4425
4448
|
pt,
|
|
4426
4449
|
ke
|
|
4427
4450
|
];
|
|
4428
|
-
class
|
|
4451
|
+
class Na {
|
|
4429
4452
|
_maplibreMap;
|
|
4430
|
-
_routeStyle =
|
|
4453
|
+
_routeStyle = nt;
|
|
4431
4454
|
_styleDiffs = {};
|
|
4432
4455
|
_filterBy = "venue";
|
|
4433
4456
|
_curVenue = null;
|
|
@@ -4522,31 +4545,31 @@ class Da {
|
|
|
4522
4545
|
render(e, i) {
|
|
4523
4546
|
if (!this._renderBoundaryLayer) {
|
|
4524
4547
|
const d = this._maplibreMap.getStyle(), u = vt(d);
|
|
4525
|
-
let
|
|
4526
|
-
({ type:
|
|
4548
|
+
let h = u.find(
|
|
4549
|
+
({ type: c, id: f }) => !f.includes("-overlap-copy") && c === "fill-extrusion"
|
|
4527
4550
|
);
|
|
4528
|
-
|
|
4529
|
-
(
|
|
4530
|
-
)), this._renderBoundaryLayer =
|
|
4551
|
+
h || (h = u.find(
|
|
4552
|
+
(c) => c.type === "symbol" && c?.["source-layer"] === "mapxus_place"
|
|
4553
|
+
)), this._renderBoundaryLayer = h?.id;
|
|
4531
4554
|
}
|
|
4532
4555
|
const {
|
|
4533
4556
|
instructions: r,
|
|
4534
|
-
points: { coordinates:
|
|
4557
|
+
points: { coordinates: n }
|
|
4535
4558
|
} = e, {
|
|
4536
|
-
lineFeatures:
|
|
4559
|
+
lineFeatures: s,
|
|
4537
4560
|
connectorFeatures: o,
|
|
4538
4561
|
dashedLineFeatures: a,
|
|
4539
4562
|
markerFeatures: l
|
|
4540
|
-
} = this._classifyFeatures(r,
|
|
4541
|
-
this._renderSolidLines(
|
|
4563
|
+
} = this._classifyFeatures(r, n, i);
|
|
4564
|
+
this._renderSolidLines(s), this._renderLineSymbols(Te, le), this._routeStyle.disableDashedLine !== !0 && this._renderDashedLines(a), this._renderConnectors(o), this._renderMarkers(l);
|
|
4542
4565
|
}
|
|
4543
4566
|
/**
|
|
4544
4567
|
* Remove route from the map.
|
|
4545
4568
|
*/
|
|
4546
4569
|
remove() {
|
|
4547
|
-
|
|
4570
|
+
hi.forEach((e) => {
|
|
4548
4571
|
this._maplibreMap.getLayer(e) && this._maplibreMap.removeLayer(e);
|
|
4549
|
-
}),
|
|
4572
|
+
}), Ha.forEach((e) => {
|
|
4550
4573
|
this._maplibreMap.getSource(e) && this._maplibreMap.removeSource(e);
|
|
4551
4574
|
});
|
|
4552
4575
|
}
|
|
@@ -4567,27 +4590,27 @@ class Da {
|
|
|
4567
4590
|
this._filterBy = "building", this._curBuilding = e ?? null, this._curOrdinal = i ?? null, this._filterRouteOpacity();
|
|
4568
4591
|
}
|
|
4569
4592
|
_classifyFeatures(e, i, r) {
|
|
4570
|
-
const
|
|
4593
|
+
const n = [], s = [], o = [], a = [], l = [];
|
|
4571
4594
|
e.forEach((x, P) => {
|
|
4572
4595
|
const {
|
|
4573
|
-
venue_id:
|
|
4596
|
+
venue_id: I,
|
|
4574
4597
|
building_id: T,
|
|
4575
4598
|
floor_id: O,
|
|
4576
4599
|
ordinal: D,
|
|
4577
|
-
sign:
|
|
4600
|
+
sign: W,
|
|
4578
4601
|
type: ie,
|
|
4579
|
-
interval: [xe,
|
|
4602
|
+
interval: [xe, ye]
|
|
4580
4603
|
} = x;
|
|
4581
|
-
if (
|
|
4604
|
+
if (ja(W))
|
|
4582
4605
|
l.push(x);
|
|
4583
|
-
else if (
|
|
4584
|
-
P !== 0 && P !== e.length - 1 &&
|
|
4606
|
+
else if (Ua(W)) {
|
|
4607
|
+
P !== 0 && P !== e.length - 1 && s.push(
|
|
4585
4608
|
this._createIconFeature(
|
|
4586
|
-
`connector-${
|
|
4609
|
+
`connector-${s.length}`,
|
|
4587
4610
|
i[xe],
|
|
4588
4611
|
{
|
|
4589
|
-
...
|
|
4590
|
-
venue_id:
|
|
4612
|
+
...H({
|
|
4613
|
+
venue_id: I,
|
|
4591
4614
|
building_id: T,
|
|
4592
4615
|
floor_id: O,
|
|
4593
4616
|
ordinal: D
|
|
@@ -4599,21 +4622,21 @@ class Da {
|
|
|
4599
4622
|
const Ct = e[P + 1];
|
|
4600
4623
|
if (Ct) {
|
|
4601
4624
|
const {
|
|
4602
|
-
venue_id:
|
|
4603
|
-
building_id:
|
|
4604
|
-
floor_id:
|
|
4605
|
-
ordinal:
|
|
4625
|
+
venue_id: lr,
|
|
4626
|
+
building_id: dr,
|
|
4627
|
+
floor_id: ur,
|
|
4628
|
+
ordinal: cr
|
|
4606
4629
|
} = Ct;
|
|
4607
|
-
|
|
4630
|
+
s.push(
|
|
4608
4631
|
this._createIconFeature(
|
|
4609
|
-
`connector-${
|
|
4610
|
-
i[
|
|
4632
|
+
`connector-${s.length}`,
|
|
4633
|
+
i[ye],
|
|
4611
4634
|
{
|
|
4612
|
-
...
|
|
4613
|
-
venue_id:
|
|
4614
|
-
building_id:
|
|
4615
|
-
floor_id:
|
|
4616
|
-
ordinal:
|
|
4635
|
+
...H({
|
|
4636
|
+
venue_id: lr,
|
|
4637
|
+
building_id: dr,
|
|
4638
|
+
floor_id: ur,
|
|
4639
|
+
ordinal: cr
|
|
4617
4640
|
}),
|
|
4618
4641
|
icon: ie
|
|
4619
4642
|
}
|
|
@@ -4621,24 +4644,24 @@ class Da {
|
|
|
4621
4644
|
);
|
|
4622
4645
|
}
|
|
4623
4646
|
} else
|
|
4624
|
-
|
|
4647
|
+
n.push(
|
|
4625
4648
|
this._createLineFeature(
|
|
4626
|
-
`solid-line-${
|
|
4627
|
-
i.slice(xe,
|
|
4628
|
-
|
|
4629
|
-
venue_id:
|
|
4649
|
+
`solid-line-${n.length}`,
|
|
4650
|
+
i.slice(xe, ye + 1),
|
|
4651
|
+
H({
|
|
4652
|
+
venue_id: I,
|
|
4630
4653
|
building_id: T,
|
|
4631
4654
|
floor_id: O,
|
|
4632
4655
|
ordinal: D,
|
|
4633
|
-
isShuttleBus:
|
|
4656
|
+
isShuttleBus: Va(W) ? 1 : 0
|
|
4634
4657
|
})
|
|
4635
4658
|
)
|
|
4636
4659
|
);
|
|
4637
4660
|
});
|
|
4638
4661
|
const d = e[0], {
|
|
4639
4662
|
venue_id: u,
|
|
4640
|
-
building_id:
|
|
4641
|
-
floor_id:
|
|
4663
|
+
building_id: h,
|
|
4664
|
+
floor_id: c,
|
|
4642
4665
|
ordinal: f
|
|
4643
4666
|
} = d, p = e[e.length - 1], {
|
|
4644
4667
|
venue_id: _,
|
|
@@ -4650,10 +4673,10 @@ class Da {
|
|
|
4650
4673
|
this._createLineFeature(
|
|
4651
4674
|
`dashed-line-${o.length}`,
|
|
4652
4675
|
[w, B],
|
|
4653
|
-
|
|
4676
|
+
H({
|
|
4654
4677
|
venue_id: u,
|
|
4655
|
-
building_id:
|
|
4656
|
-
floor_id:
|
|
4678
|
+
building_id: h,
|
|
4679
|
+
floor_id: c,
|
|
4657
4680
|
ordinal: f
|
|
4658
4681
|
})
|
|
4659
4682
|
)
|
|
@@ -4661,7 +4684,7 @@ class Da {
|
|
|
4661
4684
|
this._createLineFeature(
|
|
4662
4685
|
`dashed-line-${o.length}`,
|
|
4663
4686
|
[C, b],
|
|
4664
|
-
|
|
4687
|
+
H({
|
|
4665
4688
|
venue_id: _,
|
|
4666
4689
|
building_id: g,
|
|
4667
4690
|
floor_id: y,
|
|
@@ -4672,7 +4695,7 @@ class Da {
|
|
|
4672
4695
|
({
|
|
4673
4696
|
venue_id: x,
|
|
4674
4697
|
building_id: P,
|
|
4675
|
-
floor_id:
|
|
4698
|
+
floor_id: I,
|
|
4676
4699
|
ordinal: T,
|
|
4677
4700
|
interval: [O]
|
|
4678
4701
|
}, D) => {
|
|
@@ -4680,10 +4703,10 @@ class Da {
|
|
|
4680
4703
|
this._createLineFeature(
|
|
4681
4704
|
`dashed-line-${o.length}`,
|
|
4682
4705
|
[i[O], E[D]],
|
|
4683
|
-
|
|
4706
|
+
H({
|
|
4684
4707
|
venue_id: x,
|
|
4685
4708
|
building_id: P,
|
|
4686
|
-
floor_id:
|
|
4709
|
+
floor_id: I,
|
|
4687
4710
|
ordinal: T
|
|
4688
4711
|
})
|
|
4689
4712
|
)
|
|
@@ -4692,10 +4715,10 @@ class Da {
|
|
|
4692
4715
|
`marker-${a.length}`,
|
|
4693
4716
|
E[D],
|
|
4694
4717
|
{
|
|
4695
|
-
...
|
|
4718
|
+
...H({
|
|
4696
4719
|
venue_id: x,
|
|
4697
4720
|
building_id: P,
|
|
4698
|
-
floor_id:
|
|
4721
|
+
floor_id: I,
|
|
4699
4722
|
ordinal: T,
|
|
4700
4723
|
markerType: `stops_${D}`
|
|
4701
4724
|
}),
|
|
@@ -4710,10 +4733,10 @@ class Da {
|
|
|
4710
4733
|
`marker-${a.length}`,
|
|
4711
4734
|
w ?? B,
|
|
4712
4735
|
{
|
|
4713
|
-
...
|
|
4736
|
+
...H({
|
|
4714
4737
|
venue_id: u,
|
|
4715
|
-
building_id:
|
|
4716
|
-
floor_id:
|
|
4738
|
+
building_id: h,
|
|
4739
|
+
floor_id: c,
|
|
4717
4740
|
ordinal: f,
|
|
4718
4741
|
markerType: "from"
|
|
4719
4742
|
}),
|
|
@@ -4726,7 +4749,7 @@ class Da {
|
|
|
4726
4749
|
`marker-${a.length}`,
|
|
4727
4750
|
b ?? C,
|
|
4728
4751
|
{
|
|
4729
|
-
...
|
|
4752
|
+
...H({
|
|
4730
4753
|
venue_id: _,
|
|
4731
4754
|
building_id: g,
|
|
4732
4755
|
floor_id: y,
|
|
@@ -4738,8 +4761,8 @@ class Da {
|
|
|
4738
4761
|
}
|
|
4739
4762
|
)
|
|
4740
4763
|
), {
|
|
4741
|
-
lineFeatures:
|
|
4742
|
-
connectorFeatures:
|
|
4764
|
+
lineFeatures: n,
|
|
4765
|
+
connectorFeatures: s,
|
|
4743
4766
|
dashedLineFeatures: o,
|
|
4744
4767
|
markerFeatures: a
|
|
4745
4768
|
};
|
|
@@ -4767,7 +4790,7 @@ class Da {
|
|
|
4767
4790
|
};
|
|
4768
4791
|
}
|
|
4769
4792
|
_renderSolidLines(e) {
|
|
4770
|
-
this._addCollectionSource(Te, e), this._addLineLayer(Te,
|
|
4793
|
+
this._addCollectionSource(Te, e), this._addLineLayer(Te, ae, {
|
|
4771
4794
|
"line-color": [
|
|
4772
4795
|
"case",
|
|
4773
4796
|
["==", ["get", "isShuttleBus"], "1"],
|
|
@@ -4871,74 +4894,74 @@ class Da {
|
|
|
4871
4894
|
});
|
|
4872
4895
|
}
|
|
4873
4896
|
_updateStyleProperties(e) {
|
|
4874
|
-
if (this._styleDiffs =
|
|
4897
|
+
if (this._styleDiffs = or(
|
|
4875
4898
|
this._routeStyle,
|
|
4876
|
-
e ??
|
|
4899
|
+
e ?? nt
|
|
4877
4900
|
), !e)
|
|
4878
|
-
this._routeStyle =
|
|
4901
|
+
this._routeStyle = nt;
|
|
4879
4902
|
else if (Object.keys(this._styleDiffs).length) {
|
|
4880
4903
|
const i = {
|
|
4881
4904
|
...this._routeStyle.lineSymbol,
|
|
4882
4905
|
...this._styleDiffs.lineSymbol ?? {}
|
|
4883
4906
|
}, r = this._styleDiffs.markers;
|
|
4884
|
-
let
|
|
4885
|
-
const
|
|
4907
|
+
let n = this._routeStyle.markers;
|
|
4908
|
+
const s = {
|
|
4886
4909
|
outdoorLineOpacity: (this._styleDiffs.outdoorLineOpacity > 1 ? 1 : this._styleDiffs.outdoorLineOpacity < 0 ? 0 : this._styleDiffs.outdoorLineOpacity) ?? this._routeStyle.outdoorLineOpacity
|
|
4887
4910
|
}, o = {
|
|
4888
4911
|
inactiveRouteOpacity: (this._styleDiffs.inactiveRouteOpacity > 1 ? 1 : this._styleDiffs.inactiveRouteOpacity < 0 ? 0 : this._styleDiffs.inactiveRouteOpacity) ?? this._routeStyle.inactiveRouteOpacity
|
|
4889
4912
|
};
|
|
4890
|
-
r && Object.keys(r).length && (
|
|
4891
|
-
...
|
|
4913
|
+
r && Object.keys(r).length && (n = {
|
|
4914
|
+
...n,
|
|
4892
4915
|
...r
|
|
4893
4916
|
}), this._routeStyle = {
|
|
4894
4917
|
...this._routeStyle,
|
|
4895
4918
|
...this._styleDiffs,
|
|
4896
|
-
...
|
|
4919
|
+
...s,
|
|
4897
4920
|
...o,
|
|
4898
|
-
markers:
|
|
4921
|
+
markers: n,
|
|
4899
4922
|
lineSymbol: i
|
|
4900
4923
|
};
|
|
4901
4924
|
}
|
|
4902
4925
|
}
|
|
4903
4926
|
async _loadMarkerIcons() {
|
|
4904
4927
|
const { markers: e, lineSymbol: i } = this._styleDiffs;
|
|
4905
|
-
if (i?.image && await
|
|
4906
|
-
const { from: r, to:
|
|
4907
|
-
if (r && await
|
|
4908
|
-
const o =
|
|
4928
|
+
if (i?.image && await Le(this._maplibreMap, i.image), e && Object.keys(e).length) {
|
|
4929
|
+
const { from: r, to: n, stops: s } = e;
|
|
4930
|
+
if (r && await Le(this._maplibreMap, r), n && await Le(this._maplibreMap, n), s && s.length) {
|
|
4931
|
+
const o = s.filter((a) => !!a);
|
|
4909
4932
|
o.length && await Promise.all(
|
|
4910
|
-
o.map((a) =>
|
|
4933
|
+
o.map((a) => Le(this._maplibreMap, a))
|
|
4911
4934
|
);
|
|
4912
4935
|
}
|
|
4913
4936
|
}
|
|
4914
4937
|
}
|
|
4915
4938
|
async _updateLayers() {
|
|
4916
|
-
if (!this._maplibreMap.getLayer(
|
|
4939
|
+
if (!this._maplibreMap.getLayer(ae)) return;
|
|
4917
4940
|
const {
|
|
4918
4941
|
indoorLineColor: e,
|
|
4919
4942
|
outdoorLineColor: i,
|
|
4920
4943
|
dashedLineColor: r,
|
|
4921
|
-
shuttleBusLineColor:
|
|
4922
|
-
lineWidth:
|
|
4944
|
+
shuttleBusLineColor: n,
|
|
4945
|
+
lineWidth: s,
|
|
4923
4946
|
dashedLineWidth: o,
|
|
4924
4947
|
disableDashedLine: a,
|
|
4925
4948
|
inactiveRouteOpacity: l,
|
|
4926
4949
|
outdoorLineOpacity: d,
|
|
4927
4950
|
markerIconSize: u,
|
|
4928
|
-
markers:
|
|
4929
|
-
lineSymbol:
|
|
4951
|
+
markers: h,
|
|
4952
|
+
lineSymbol: c
|
|
4930
4953
|
} = this._styleDiffs;
|
|
4931
|
-
if ((e || i ||
|
|
4954
|
+
if ((e || i || n) && this._maplibreMap.setPaintProperty(ae, "line-color", [
|
|
4932
4955
|
"case",
|
|
4933
4956
|
["==", ["get", "isShuttleBus"], "1"],
|
|
4934
4957
|
this._routeStyle.shuttleBusLineColor,
|
|
4935
4958
|
["==", ["get", "floor_id"], null],
|
|
4936
4959
|
this._routeStyle.outdoorLineColor,
|
|
4937
4960
|
this._routeStyle.indoorLineColor
|
|
4938
|
-
]),
|
|
4939
|
-
|
|
4961
|
+
]), s !== void 0 && s + "" && this._maplibreMap.setPaintProperty(
|
|
4962
|
+
ae,
|
|
4940
4963
|
"line-width",
|
|
4941
|
-
|
|
4964
|
+
s
|
|
4942
4965
|
), typeof a == "boolean" ? a ? this._maplibreMap.setPaintProperty(
|
|
4943
4966
|
Q,
|
|
4944
4967
|
"line-color",
|
|
@@ -4963,8 +4986,8 @@ class Da {
|
|
|
4963
4986
|
gt,
|
|
4964
4987
|
"icon-size",
|
|
4965
4988
|
u
|
|
4966
|
-
),
|
|
4967
|
-
const { from: f, to: p, stops: _ } =
|
|
4989
|
+
), h && Object.keys(h).length) {
|
|
4990
|
+
const { from: f, to: p, stops: _ } = h, g = this._maplibreMap.getSource(
|
|
4968
4991
|
ke
|
|
4969
4992
|
), y = await g.getData();
|
|
4970
4993
|
y.features = y.features.map((v) => {
|
|
@@ -4976,24 +4999,24 @@ class Da {
|
|
|
4976
4999
|
return v;
|
|
4977
5000
|
}), g.setData(y);
|
|
4978
5001
|
}
|
|
4979
|
-
if (
|
|
4980
|
-
const { image: f, size: p, spacing: _ } =
|
|
5002
|
+
if (c) {
|
|
5003
|
+
const { image: f, size: p, spacing: _ } = c;
|
|
4981
5004
|
f !== void 0 && this._maplibreMap.setLayoutProperty(
|
|
4982
|
-
|
|
5005
|
+
le,
|
|
4983
5006
|
"icon-image",
|
|
4984
5007
|
f
|
|
4985
5008
|
), p !== void 0 && p + "" && this._maplibreMap.setLayoutProperty(
|
|
4986
|
-
|
|
5009
|
+
le,
|
|
4987
5010
|
"icon-size",
|
|
4988
5011
|
p
|
|
4989
5012
|
), _ !== void 0 && _ + "" && this._maplibreMap.setLayoutProperty(
|
|
4990
|
-
|
|
5013
|
+
le,
|
|
4991
5014
|
"symbol-spacing",
|
|
4992
5015
|
_
|
|
4993
5016
|
);
|
|
4994
5017
|
}
|
|
4995
5018
|
d !== void 0 && d + "" && (this._maplibreMap.setPaintProperty(
|
|
4996
|
-
|
|
5019
|
+
ae,
|
|
4997
5020
|
"line-opacity",
|
|
4998
5021
|
[
|
|
4999
5022
|
"case",
|
|
@@ -5002,7 +5025,7 @@ class Da {
|
|
|
5002
5025
|
1
|
|
5003
5026
|
]
|
|
5004
5027
|
), this._maplibreMap.setPaintProperty(
|
|
5005
|
-
|
|
5028
|
+
le,
|
|
5006
5029
|
"icon-opacity",
|
|
5007
5030
|
[
|
|
5008
5031
|
"case",
|
|
@@ -5048,7 +5071,7 @@ class Da {
|
|
|
5048
5071
|
];
|
|
5049
5072
|
break;
|
|
5050
5073
|
}
|
|
5051
|
-
|
|
5074
|
+
hi.forEach((i) => {
|
|
5052
5075
|
this._maplibreMap.getLayer(i) && this._maplibreMap.setPaintProperty(
|
|
5053
5076
|
i,
|
|
5054
5077
|
i.includes("layer-line") ? "line-opacity" : "icon-opacity",
|
|
@@ -5057,7 +5080,7 @@ class Da {
|
|
|
5057
5080
|
});
|
|
5058
5081
|
}
|
|
5059
5082
|
}
|
|
5060
|
-
function
|
|
5083
|
+
function H(t) {
|
|
5061
5084
|
return Object.fromEntries(
|
|
5062
5085
|
Object.entries(t).map(([e, i]) => [
|
|
5063
5086
|
e,
|
|
@@ -5065,38 +5088,38 @@ function N(t) {
|
|
|
5065
5088
|
])
|
|
5066
5089
|
);
|
|
5067
5090
|
}
|
|
5068
|
-
function
|
|
5091
|
+
function Ua(t) {
|
|
5069
5092
|
return t === 100 || t === -100;
|
|
5070
5093
|
}
|
|
5071
|
-
function
|
|
5094
|
+
function ja(t) {
|
|
5072
5095
|
return t === 5;
|
|
5073
5096
|
}
|
|
5074
|
-
function
|
|
5075
|
-
return
|
|
5097
|
+
function Va(t) {
|
|
5098
|
+
return Ki(t, 104, 108);
|
|
5076
5099
|
}
|
|
5077
|
-
function
|
|
5100
|
+
function or(t, e) {
|
|
5078
5101
|
const i = {};
|
|
5079
5102
|
for (const r in e) {
|
|
5080
|
-
const
|
|
5103
|
+
const n = t[r], s = e[r];
|
|
5081
5104
|
if (r === "markers" || r === "lineSymbol")
|
|
5082
|
-
if (Array.isArray(
|
|
5083
|
-
const o =
|
|
5105
|
+
if (Array.isArray(s)) {
|
|
5106
|
+
const o = s.slice(1, s.length - 1);
|
|
5084
5107
|
i[r] = {
|
|
5085
|
-
from:
|
|
5086
|
-
to: Ae(
|
|
5087
|
-
stops: o.length ? o : [
|
|
5108
|
+
from: s[0],
|
|
5109
|
+
to: Ae(s),
|
|
5110
|
+
stops: o.length ? o : [s[0]]
|
|
5088
5111
|
};
|
|
5089
5112
|
} else {
|
|
5090
|
-
const o =
|
|
5113
|
+
const o = or(n, s);
|
|
5091
5114
|
Object.keys(o).length && (i[r] = o);
|
|
5092
5115
|
}
|
|
5093
|
-
else
|
|
5116
|
+
else s + "" != n + "" && (i[r] = r === "stops" ? s ?? [null] : s);
|
|
5094
5117
|
}
|
|
5095
5118
|
return i;
|
|
5096
5119
|
}
|
|
5097
|
-
var
|
|
5098
|
-
const
|
|
5099
|
-
class
|
|
5120
|
+
var ar = /* @__PURE__ */ ((t) => (t.FOOT = "foot", t.WHEELCHAIR = "wheelchair", t.ESCALATOR = "escalator", t.EMERGENCY = "emergency", t.ELEVATOR = "elevator", t))(ar || {});
|
|
5121
|
+
const qa = fe.getInstance();
|
|
5122
|
+
class za {
|
|
5100
5123
|
constructor() {
|
|
5101
5124
|
}
|
|
5102
5125
|
/**
|
|
@@ -5104,30 +5127,30 @@ class Va {
|
|
|
5104
5127
|
* @param options {IRouteSearchOptions}
|
|
5105
5128
|
*/
|
|
5106
5129
|
async search(e) {
|
|
5107
|
-
const { points: i, vehicle: r =
|
|
5130
|
+
const { points: i, vehicle: r = ar.FOOT, locale: n = "en" } = e;
|
|
5108
5131
|
if (!(i && i.length > 1 && i.length < 6))
|
|
5109
5132
|
throw new Error(
|
|
5110
5133
|
"Parameter error. It must be 1 < {points.length} < 6"
|
|
5111
5134
|
);
|
|
5112
|
-
if (
|
|
5135
|
+
if (Ga(i))
|
|
5113
5136
|
throw new Error("Parameter error. Points must have lat and lon.");
|
|
5114
|
-
return (await
|
|
5137
|
+
return (await qa.getHttpSession()).request(yr, {
|
|
5115
5138
|
method: "POST",
|
|
5116
5139
|
body: JSON.stringify({
|
|
5117
5140
|
points: i,
|
|
5118
5141
|
vehicle: r,
|
|
5119
|
-
locale:
|
|
5142
|
+
locale: n
|
|
5120
5143
|
})
|
|
5121
5144
|
});
|
|
5122
5145
|
}
|
|
5123
5146
|
}
|
|
5124
|
-
function
|
|
5147
|
+
function Ga(t) {
|
|
5125
5148
|
return t.some(
|
|
5126
5149
|
(e) => !e || typeof e.lat != "number" || typeof e.lon != "number"
|
|
5127
5150
|
);
|
|
5128
5151
|
}
|
|
5129
|
-
const
|
|
5130
|
-
class
|
|
5152
|
+
const _i = fe.getInstance();
|
|
5153
|
+
class Ya {
|
|
5131
5154
|
constructor() {
|
|
5132
5155
|
}
|
|
5133
5156
|
/**
|
|
@@ -5136,76 +5159,76 @@ class za {
|
|
|
5136
5159
|
*/
|
|
5137
5160
|
async searchCategories(e) {
|
|
5138
5161
|
const i = new URLSearchParams();
|
|
5139
|
-
if ("floorId" in e && m(e.floorId) ? i.set("floorId", e.floorId) : "buildingId" in e && m(e.buildingId) ? i.set("buildingId", e.buildingId) : "sharedFloorId" in e && m(e.sharedFloorId) ? i.set("sharedFloorId", e.sharedFloorId) : "venueId" in e && m(e.venueId) && i.set("venueId", e.venueId), "bounds" in e &&
|
|
5162
|
+
if ("floorId" in e && m(e.floorId) ? i.set("floorId", e.floorId) : "buildingId" in e && m(e.buildingId) ? i.set("buildingId", e.buildingId) : "sharedFloorId" in e && m(e.sharedFloorId) ? i.set("sharedFloorId", e.sharedFloorId) : "venueId" in e && m(e.venueId) && i.set("venueId", e.venueId), "bounds" in e && ue(e.bounds) && (i.set("bbox", e.bounds.flat().join()), m(e.keywords) && i.set("keywords", e.keywords)), i.toString().length === 0)
|
|
5140
5163
|
throw new Error(
|
|
5141
5164
|
"At least one of 'floorId', 'buildingId', 'sharedFloorId', 'venueId', or 'bounds' must be provided."
|
|
5142
5165
|
);
|
|
5143
|
-
const r = `${
|
|
5144
|
-
return (await
|
|
5166
|
+
const r = `${fi}?${i.toString()}`;
|
|
5167
|
+
return (await _i.getHttpSession()).request(r);
|
|
5145
5168
|
}
|
|
5146
5169
|
async searchCategoryTrees(e) {
|
|
5147
|
-
return (await
|
|
5148
|
-
`${
|
|
5170
|
+
return (await _i.getHttpSession()).request(
|
|
5171
|
+
`${mr}?featureType=${e}`
|
|
5149
5172
|
);
|
|
5150
5173
|
}
|
|
5151
5174
|
}
|
|
5152
|
-
var
|
|
5153
|
-
const
|
|
5154
|
-
Map:
|
|
5175
|
+
var Wa = /* @__PURE__ */ ((t) => (t.Poi = "POI", t))(Wa || {});
|
|
5176
|
+
const tl = {
|
|
5177
|
+
Map: ka,
|
|
5155
5178
|
/** @deprecated */
|
|
5156
|
-
Indoor:
|
|
5157
|
-
Marker:
|
|
5179
|
+
Indoor: Gi,
|
|
5180
|
+
Marker: Da,
|
|
5158
5181
|
/** @deprecated */
|
|
5159
|
-
Poi:
|
|
5160
|
-
RoutePainter:
|
|
5182
|
+
Poi: Yi,
|
|
5183
|
+
RoutePainter: Na,
|
|
5161
5184
|
/** @deprecated */
|
|
5162
|
-
BuildingFilterControl:
|
|
5163
|
-
BuildingSelectorHandler:
|
|
5185
|
+
BuildingFilterControl: Wi,
|
|
5186
|
+
BuildingSelectorHandler: Ji,
|
|
5164
5187
|
/** @deprecated */
|
|
5165
|
-
FloorsControl:
|
|
5166
|
-
FloorSelectorHandler:
|
|
5188
|
+
FloorsControl: Xi,
|
|
5189
|
+
FloorSelectorHandler: er,
|
|
5167
5190
|
/** @deprecated */
|
|
5168
|
-
SwitchBuildingHandler:
|
|
5191
|
+
SwitchBuildingHandler: tr,
|
|
5169
5192
|
/** @deprecated */
|
|
5170
|
-
SwitchOutdoorHandler:
|
|
5171
|
-
IndoorClickSelection:
|
|
5172
|
-
OutdoorClickSelection:
|
|
5173
|
-
VenuesService:
|
|
5174
|
-
BuildingsService:
|
|
5175
|
-
PoisService:
|
|
5176
|
-
RouteService:
|
|
5177
|
-
CategoryService:
|
|
5193
|
+
SwitchOutdoorHandler: ir,
|
|
5194
|
+
IndoorClickSelection: rr,
|
|
5195
|
+
OutdoorClickSelection: sr,
|
|
5196
|
+
VenuesService: mi,
|
|
5197
|
+
BuildingsService: bi,
|
|
5198
|
+
PoisService: yi,
|
|
5199
|
+
RouteService: za,
|
|
5200
|
+
CategoryService: Ya
|
|
5178
5201
|
};
|
|
5179
5202
|
export {
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5203
|
+
Wi as BuildingFilterControl,
|
|
5204
|
+
Ji as BuildingSelectorHandler,
|
|
5205
|
+
bi as BuildingsService,
|
|
5206
|
+
Ya as CategoryService,
|
|
5207
|
+
Pr as DistanceSearchType,
|
|
5208
|
+
Wa as FeatureType,
|
|
5209
|
+
er as FloorSelectorHandler,
|
|
5187
5210
|
bt as FloorSwitchScope,
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
+
Xi as FloorsControl,
|
|
5212
|
+
Gi as Indoor,
|
|
5213
|
+
rr as IndoorClickSelection,
|
|
5214
|
+
ka as Map,
|
|
5215
|
+
Da as Marker,
|
|
5216
|
+
gi as OrientationDistanceSearchType,
|
|
5217
|
+
sr as OutdoorClickSelection,
|
|
5218
|
+
Yi as Poi,
|
|
5219
|
+
Fr as PoisOrderBy,
|
|
5220
|
+
yi as PoisService,
|
|
5221
|
+
Cr as PoisSortBy,
|
|
5222
|
+
_r as PresetLanguage,
|
|
5223
|
+
Na as RoutePainter,
|
|
5224
|
+
za as RouteService,
|
|
5225
|
+
tr as SwitchBuildingHandler,
|
|
5226
|
+
ir as SwitchOutdoorHandler,
|
|
5227
|
+
Zi as ThemeType,
|
|
5228
|
+
ar as VehicleType,
|
|
5229
|
+
mi as VenuesService,
|
|
5230
|
+
tl as default,
|
|
5231
|
+
Or as omittedBuildingProps,
|
|
5232
|
+
Tt as omittedPoiProps,
|
|
5233
|
+
Er as omittedVenueKeys
|
|
5211
5234
|
};
|