@das-fed/upf-ui 6.4.0-dev.210 → 6.4.0-dev.211
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/front-end/i18n/front-end-page/dasui_en-US.js +2 -2
- package/front-end/i18n/front-end-page/dasui_zh-CN.js +2 -2
- package/front-end/i18n/front-end-page/dasui_zh-MO.js +2 -2
- package/package.json +5 -5
- package/packages/business-components/ai-panel/{index-BgyMyjJo.js → index-BybM3Q9u.js} +700 -711
- package/packages/business-components/ai-panel/index-BybM3Q9u.js.gz +0 -0
- package/packages/business-components/ai-panel/index-CgWRv2Ge.js +142 -0
- package/packages/business-components/ai-panel/index-CgWRv2Ge.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-Bw7rNZmA.js → index-CwdJKHy0.js} +9 -9
- package/packages/business-components/ai-panel/index-CwdJKHy0.js.gz +0 -0
- package/packages/business-components/ai-panel/index.js +1 -1
- package/packages/business-components/device-panel/index.js +8773 -8873
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/echarts/index.js +2049 -2056
- package/packages/business-components/echarts/index.js.gz +0 -0
- package/packages/business-components/process-configuration/index.js +50 -50
- package/packages/business-components/process-configuration/index.js.gz +0 -0
- package/packages/business-components/process-form/index.js +149 -149
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-search-form/index.js +60 -60
- package/packages/business-components/process-search-form/index.js.gz +0 -0
- package/packages/business-components/process-table/index.js +128 -130
- package/packages/business-components/process-table/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/index.js +896 -904
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/user-org-dialog/index.js +246 -249
- package/packages/business-components/user-org-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/index.js +0 -1
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/components/autocomplete/index.js +6 -12
- package/packages/components/autocomplete/index.js.gz +0 -0
- package/packages/components/button/index.js +182 -178
- package/packages/components/button/index.js.gz +0 -0
- package/packages/components/button/style.css +1 -1
- package/packages/components/button/style.css.gz +0 -0
- package/packages/components/calendar/index.js +104 -104
- package/packages/components/calendar/index.js.gz +0 -0
- package/packages/components/cascader/index.js +27 -27
- package/packages/components/cascader/index.js.gz +0 -0
- package/packages/components/checkbox/index.js +54 -54
- package/packages/components/checkbox/index.js.gz +0 -0
- package/packages/components/date-picker/index.js +459 -459
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/dimple-layout/index.js +61 -63
- package/packages/components/dimple-layout/index.js.gz +0 -0
- package/packages/components/dropdown/index.js +22 -23
- package/packages/components/dropdown/index.js.gz +0 -0
- package/packages/components/edit-table/index.js +223 -224
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/error-overlay-model/index.js +42 -44
- package/packages/components/error-overlay-model/index.js.gz +0 -0
- package/packages/components/form-item/index.js +63 -67
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/image-viewer/index.js +32 -32
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/input/index.js +51 -51
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input-number/index.js +44 -44
- package/packages/components/input-number/index.js.gz +0 -0
- package/packages/components/live-player/index.js +832 -834
- package/packages/components/live-player/index.js.gz +0 -0
- package/packages/components/map/index.js +431 -437
- package/packages/components/map/index.js.gz +0 -0
- package/packages/components/menu-aside/index.js +1 -1
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/message/index.js +6 -6
- package/packages/components/message/index.js.gz +0 -0
- package/packages/components/radio-tabs/index.js +33 -33
- package/packages/components/radio-tabs/index.js.gz +0 -0
- package/packages/components/rich-editor/index.js +4556 -4586
- package/packages/components/rich-editor/index.js.gz +0 -0
- package/packages/components/scrollbar/index.js +135 -135
- package/packages/components/scrollbar/index.js.gz +0 -0
- package/packages/components/search/index.js +2 -2
- package/packages/components/search/index.js.gz +0 -0
- package/packages/components/select/index.d.ts +3 -0
- package/packages/components/select/index.js +325 -289
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/src/Select.vue.d.ts +1 -0
- package/packages/components/select/src/type.d.ts +2 -0
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/select-list/index.js +6 -10
- package/packages/components/select-list/index.js.gz +0 -0
- package/packages/components/special-range-picker-month/index.js +14 -16
- package/packages/components/special-range-picker-month/index.js.gz +0 -0
- package/packages/components/special-range-picker-year/index.js +51 -53
- package/packages/components/special-range-picker-year/index.js.gz +0 -0
- package/packages/components/spin/index.js +35 -35
- package/packages/components/spin/index.js.gz +0 -0
- package/packages/components/split-panel/index.js +101 -102
- package/packages/components/split-panel/index.js.gz +0 -0
- package/packages/components/table/index.js +599 -604
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/time-line/index.js +1 -1
- package/packages/components/time-line/index.js.gz +0 -0
- package/packages/components/tree/index.js +173 -182
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree-select/index.js +377 -364
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/src/App.vue.d.ts +8 -2
- package/packages/components/tree-select/src/hooks/use-tree-select.d.ts +9 -3
- package/packages/components/tree-table/index.js +2 -2
- package/packages/components/tree-table/index.js.gz +0 -0
- package/packages/components/tree-v2/index.js +1208 -1240
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/packages/business-components/ai-panel/index-B4pMosXu.js +0 -143
- package/packages/business-components/ai-panel/index-B4pMosXu.js.gz +0 -0
- package/packages/business-components/ai-panel/index-BgyMyjJo.js.gz +0 -0
- package/packages/business-components/ai-panel/index-Bw7rNZmA.js.gz +0 -0
|
@@ -1,68 +1,66 @@
|
|
|
1
1
|
import '@das-fed/upf-ui/packages/components/map/style.css';
|
|
2
|
-
import { ref as S, defineComponent as Ae, shallowRef as H, computed as Se, onMounted as Oe, openBlock as Te, createElementBlock as $e, normalizeStyle as je, createElementVNode as W, withDirectives as Z, createVNode as de, unref as
|
|
3
|
-
import { withInstall as
|
|
2
|
+
import { ref as S, defineComponent as Ae, shallowRef as H, computed as Se, onMounted as Oe, openBlock as Te, createElementBlock as $e, normalizeStyle as je, createElementVNode as W, withDirectives as Z, createVNode as de, unref as B, withKeys as Le, h as Qt, render as ea, isRef as ta, vShow as Ke, withCtx as aa, createTextVNode as oa, toDisplayString as ra } from "vue";
|
|
3
|
+
import { withInstall as Ee } from "@das-fed/upf-utils/with-install/index";
|
|
4
4
|
import { ElAutocomplete as Pe, ElLoadingDirective as ke } from "element-plus/es";
|
|
5
5
|
import "element-plus/es/components/base/style/css";
|
|
6
6
|
import "element-plus/es/components/loading/style/css";
|
|
7
7
|
import "element-plus/es/components/autocomplete/style/css";
|
|
8
|
-
import { t as
|
|
8
|
+
import { t as P, setI18nRule as na } from "@das-fed/upf-web/packages/i18n/index";
|
|
9
9
|
import { vDasTooltip as Re } from "@das-fed/upf-ui/packages/components/text-tooltip/index";
|
|
10
|
-
import { DasMessage as
|
|
11
|
-
import { createService as
|
|
10
|
+
import { DasMessage as D } from "@das-fed/upf-ui/packages/components/message/index";
|
|
11
|
+
import { createService as ct } from "@das-fed/upf-utils/create-api-service";
|
|
12
12
|
import { DasButton as la } from "@das-fed/upf-ui/packages/components/button/index";
|
|
13
13
|
const Q = (e) => {
|
|
14
14
|
if (e)
|
|
15
15
|
return typeof e == "string" && hasCssUnit(e) ? e : e + "px";
|
|
16
|
-
}, st = ({ MapGL: e, map: t, marker: a, mapLoading: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode:
|
|
16
|
+
}, st = ({ MapGL: e, map: t, marker: a, mapLoading: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode: s, addressInfo: v }, b) => {
|
|
17
17
|
const C = S();
|
|
18
18
|
let M;
|
|
19
|
-
const
|
|
19
|
+
const k = (T, g, p, w) => {
|
|
20
20
|
C.value = p, w && (M = w);
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
24
|
-
|
|
21
|
+
const j = document.createElement("script");
|
|
22
|
+
if (j.src = `${location.protocol}//webapi.amap.com/maps?v=1.4.15&key=${T}&plugin=AMap.CitySearch&callback=onLoad`, g) {
|
|
23
|
+
const d = document.createElement("script");
|
|
24
|
+
d.innerHTML = `window._AMapSecurityConfig = {
|
|
25
25
|
securityJsCode: "${g}",
|
|
26
|
-
}`, document.head.appendChild(
|
|
26
|
+
}`, document.head.appendChild(d);
|
|
27
27
|
}
|
|
28
|
-
document.head.appendChild(
|
|
29
|
-
|
|
28
|
+
document.head.appendChild(j), window.onLoad = () => {
|
|
29
|
+
L();
|
|
30
30
|
};
|
|
31
|
-
},
|
|
32
|
-
var
|
|
33
|
-
if (e.value = AMap,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
}, L = () => {
|
|
32
|
+
var T, g;
|
|
33
|
+
if (e.value = AMap, !(typeof e.value > "u")) {
|
|
34
|
+
try {
|
|
35
|
+
const p = ((T = C.value) == null ? void 0 : T.mapOpt) ?? {};
|
|
36
|
+
t.value = new AMap.Map("map", {
|
|
37
|
+
zoom: 15,
|
|
38
|
+
...p
|
|
39
|
+
});
|
|
40
|
+
} catch {
|
|
41
|
+
r.value = !1, D.error(P("thirdPartyMapErrorRetry"));
|
|
42
|
+
}
|
|
43
|
+
AMap.plugin(["AMap.ToolBar"], () => {
|
|
44
|
+
t.value.addControl(
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
new AMap.ToolBar({
|
|
47
|
+
// 简易缩放模式,默认为 false
|
|
48
|
+
liteStyle: !0
|
|
49
|
+
})
|
|
50
|
+
);
|
|
51
|
+
}), i(), (g = C.value) != null && g.clickStream || c(), r.value = !1, M && M();
|
|
45
52
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
new AMap.ToolBar({
|
|
50
|
-
// 简易缩放模式,默认为 false
|
|
51
|
-
liteStyle: !0
|
|
52
|
-
})
|
|
53
|
-
);
|
|
54
|
-
}), c(), (g = C.value) != null && g.clickStream || i(), r.value = !1, M && M();
|
|
55
|
-
}, i = () => {
|
|
56
|
-
t.value.on("click", (O) => {
|
|
57
|
-
a.value && t.value.remove(a.value), o.value = [O.lnglat.getLng(), O.lnglat.getLat()], h(o.value, !0).then(() => {
|
|
53
|
+
}, c = () => {
|
|
54
|
+
t.value.on("click", (T) => {
|
|
55
|
+
a.value && t.value.remove(a.value), o.value = [T.lnglat.getLng(), T.lnglat.getLat()], h(o.value, !0).then(() => {
|
|
58
56
|
a.value = new AMap.Marker({
|
|
59
57
|
position: o.value,
|
|
60
58
|
title: n.value
|
|
61
|
-
}), t.value.add(a.value), t.value.setCenter(o.value)
|
|
59
|
+
}), t.value.add(a.value), t.value.setCenter(o.value);
|
|
62
60
|
});
|
|
63
61
|
});
|
|
64
|
-
},
|
|
65
|
-
!n.value && !o.value.length &&
|
|
62
|
+
}, i = async () => {
|
|
63
|
+
!n.value && !o.value.length && R(), n.value && o.value.length > 0 ? await h(o.value) : n.value ? await A(n.value) : o.value.length > 0 && await h(o.value, !0), n.value && _(n.value, (T, g) => {
|
|
66
64
|
if (g && g.length) {
|
|
67
65
|
const p = g.find(
|
|
68
66
|
(w) => w.value === n.value || w.info.name === n.value
|
|
@@ -77,54 +75,54 @@ const Q = (e) => {
|
|
|
77
75
|
position: o.value,
|
|
78
76
|
title: n.value
|
|
79
77
|
}), t.value.add(a.value), o.value.length && t.value.setCenter(o.value);
|
|
80
|
-
}, h = (
|
|
81
|
-
const p =
|
|
82
|
-
return new Promise((w,
|
|
78
|
+
}, h = (T, g = !1) => {
|
|
79
|
+
const p = T.join(",");
|
|
80
|
+
return new Promise((w, j) => {
|
|
83
81
|
AMap.service("AMap.Geocoder", () => {
|
|
84
82
|
new AMap.Geocoder({
|
|
85
83
|
city: "全国"
|
|
86
|
-
}).getAddress(p, (f,
|
|
87
|
-
var x,
|
|
88
|
-
if (
|
|
84
|
+
}).getAddress(p, (f, y) => {
|
|
85
|
+
var x, m;
|
|
86
|
+
if (f === "complete" && (y != null && y.regeocode)) {
|
|
89
87
|
if (g) {
|
|
90
|
-
const { province:
|
|
91
|
-
n.value =
|
|
92
|
-
district:
|
|
88
|
+
const { province: O = "", city: N = "", district: z = "", township: ne = "" } = y.regeocode.addressComponent;
|
|
89
|
+
n.value = y.regeocode.formattedAddress ?? "", v.value = {
|
|
90
|
+
district: O + N + z,
|
|
93
91
|
address: ne,
|
|
94
|
-
name: n.value.replace(
|
|
92
|
+
name: n.value.replace(O, "").replace(N, "").replace(z, "").replace(ne, "")
|
|
95
93
|
};
|
|
96
94
|
}
|
|
97
|
-
|
|
95
|
+
s.value = ((m = (x = y.regeocode) == null ? void 0 : x.addressComponent) == null ? void 0 : m.adcode) ?? "", w(y.regeocode);
|
|
98
96
|
} else
|
|
99
|
-
|
|
97
|
+
D.error(P("thirdPartyMapErrorRetry")), j();
|
|
100
98
|
});
|
|
101
99
|
});
|
|
102
100
|
});
|
|
103
|
-
}, A = (
|
|
101
|
+
}, A = (T) => new Promise((g, p) => {
|
|
104
102
|
AMap.service("AMap.Geocoder", () => {
|
|
105
103
|
new AMap.Geocoder({
|
|
106
104
|
city: "全国"
|
|
107
|
-
}).getLocation(
|
|
108
|
-
var f,
|
|
109
|
-
if (
|
|
110
|
-
const x =
|
|
111
|
-
o.value[0] = x.lng, o.value[1] = x.lat,
|
|
105
|
+
}).getLocation(T, (j, d) => {
|
|
106
|
+
var f, y;
|
|
107
|
+
if (j === "complete" && ((f = d.geocodes) != null && f.length)) {
|
|
108
|
+
const x = d.geocodes[0].location;
|
|
109
|
+
o.value[0] = x.lng, o.value[1] = x.lat, s.value = ((y = d.geocodes[0]) == null ? void 0 : y.adcode) ?? "", g(d.geocodes[0].location);
|
|
112
110
|
} else
|
|
113
|
-
|
|
111
|
+
D.error(P("thirdPartyMapErrorRetry")), p();
|
|
114
112
|
});
|
|
115
113
|
});
|
|
116
|
-
}),
|
|
114
|
+
}), R = () => {
|
|
117
115
|
new AMap.CitySearch().getLocalCity((g, p) => {
|
|
118
|
-
if (
|
|
116
|
+
if (g === "complete" && p.info === "OK") {
|
|
119
117
|
if (p && p.city && p.bounds) {
|
|
120
118
|
const w = p.bounds;
|
|
121
119
|
t.value.setBounds(w);
|
|
122
120
|
}
|
|
123
121
|
} else
|
|
124
|
-
|
|
122
|
+
D.error(P("thirdPartyMapErrorRetry"));
|
|
125
123
|
});
|
|
126
|
-
}, _ = (
|
|
127
|
-
if (u.value.activated = !0, !
|
|
124
|
+
}, _ = (T, g) => {
|
|
125
|
+
if (u.value.activated = !0, !T) {
|
|
128
126
|
l.value = [], g([]);
|
|
129
127
|
return;
|
|
130
128
|
}
|
|
@@ -132,19 +130,19 @@ const Q = (e) => {
|
|
|
132
130
|
var p = {
|
|
133
131
|
city: "全国"
|
|
134
132
|
}, w = new AMap.Autocomplete(p);
|
|
135
|
-
w.search(
|
|
136
|
-
if (l.value = [], !
|
|
137
|
-
let f =
|
|
133
|
+
w.search(T, function(j, d) {
|
|
134
|
+
if (l.value = [], !d || !d.tips) return g([]);
|
|
135
|
+
let f = d.tips;
|
|
138
136
|
if (!f || !f.length) return g([]);
|
|
139
|
-
f = f.map((
|
|
140
|
-
const { district: x = "", address:
|
|
137
|
+
f = f.map((y) => {
|
|
138
|
+
const { district: x = "", address: m = "", name: O = "", location: N = "" } = y;
|
|
141
139
|
return {
|
|
142
|
-
value: x +
|
|
143
|
-
point:
|
|
140
|
+
value: x + m + O,
|
|
141
|
+
point: N,
|
|
144
142
|
info: {
|
|
145
143
|
district: x,
|
|
146
|
-
address:
|
|
147
|
-
name:
|
|
144
|
+
address: m,
|
|
145
|
+
name: O
|
|
148
146
|
}
|
|
149
147
|
};
|
|
150
148
|
}), l.value = f.length > 5 ? f.slice(0, 5) : f, g(l.value, f);
|
|
@@ -153,8 +151,8 @@ const Q = (e) => {
|
|
|
153
151
|
};
|
|
154
152
|
return {
|
|
155
153
|
getLocationByInputSearch: _,
|
|
156
|
-
handleSelectAddress: (
|
|
157
|
-
n.value =
|
|
154
|
+
handleSelectAddress: (T) => {
|
|
155
|
+
n.value = T.value, v.value = T.info, A(T.value).then((g) => {
|
|
158
156
|
o.value = [g.lng, g.lat], a.value && t.value.remove(a.value), a.value = new AMap.Marker({
|
|
159
157
|
position: o.value,
|
|
160
158
|
title: n.value
|
|
@@ -163,10 +161,10 @@ const Q = (e) => {
|
|
|
163
161
|
});
|
|
164
162
|
},
|
|
165
163
|
getLocationParse: async () => {
|
|
166
|
-
var
|
|
167
|
-
if (!l.value.length) return
|
|
168
|
-
if (
|
|
169
|
-
return
|
|
164
|
+
var T;
|
|
165
|
+
if (!l.value.length) return D.error(P("thirdPartyMapErrorRetry"));
|
|
166
|
+
if (n.value = l.value[0].value, !((T = l.value[0]) != null && T.point))
|
|
167
|
+
return D.error(P("thirdPartyMapErrorRetry"));
|
|
170
168
|
o.value = [l.value[0].point.lng, l.value[0].point.lat], v.value = l.value[0].info, await h(o.value), a.value = new AMap.Marker({
|
|
171
169
|
position: o.value,
|
|
172
170
|
title: n.value
|
|
@@ -176,14 +174,14 @@ const Q = (e) => {
|
|
|
176
174
|
getMapInfo: () => ({
|
|
177
175
|
longitude: o.value[0],
|
|
178
176
|
latitude: o.value[1],
|
|
179
|
-
adCode:
|
|
177
|
+
adCode: s.value,
|
|
180
178
|
address: n.value,
|
|
181
179
|
addressInfo: v.value
|
|
182
180
|
}),
|
|
183
|
-
loadJavascript:
|
|
181
|
+
loadJavascript: k
|
|
184
182
|
};
|
|
185
|
-
}, dt = "v1", ua =
|
|
186
|
-
var n, o,
|
|
183
|
+
}, dt = "v1", ua = ct(`/api/tool/map/${dt}`), ia = ct(`/api/system-config/${dt}`), ca = ua.get("/regeo"), sa = ia.get("/platform/map/list"), Ge = async (e) => {
|
|
184
|
+
var n, o, s, v, b;
|
|
187
185
|
const t = ["", "baidu", "gaode", "google"];
|
|
188
186
|
let a = null, [r, u] = await sa().run();
|
|
189
187
|
if (r)
|
|
@@ -198,7 +196,7 @@ const Q = (e) => {
|
|
|
198
196
|
secretK: (o = C[0]) == null ? void 0 : o.securityKey
|
|
199
197
|
};
|
|
200
198
|
} else (l == null ? void 0 : l.length) == 1 && (a = {
|
|
201
|
-
mapType: t[(
|
|
199
|
+
mapType: t[(s = l[0]) == null ? void 0 : s.serviceProvider],
|
|
202
200
|
akVal: (v = l[0]) == null ? void 0 : v.akValue,
|
|
203
201
|
secretK: (b = l[0]) == null ? void 0 : b.securityKey
|
|
204
202
|
});
|
|
@@ -216,61 +214,61 @@ const Q = (e) => {
|
|
|
216
214
|
dev: { type: Boolean }
|
|
217
215
|
},
|
|
218
216
|
setup(e, { expose: t }) {
|
|
219
|
-
const a = e, r = H(null), u = H(null), l = H(null), n = S(!0), o = S(null),
|
|
217
|
+
const a = e, r = H(null), u = H(null), l = H(null), n = S(!0), o = S(null), s = S([]), v = Se(() => ({
|
|
220
218
|
width: a.width ? Q(a.width) : "100%",
|
|
221
219
|
height: a.height ? Q(a.height) : "100%"
|
|
222
|
-
})), b = S(""), C = S([]), M = S(""),
|
|
220
|
+
})), b = S(""), C = S([]), M = S(""), k = S(), { getLocationByInputSearch: L, handleSelectAddress: c, getLocationParse: i, getMapInfo: h, loadJavascript: A } = st(
|
|
223
221
|
{
|
|
224
222
|
MapGL: r,
|
|
225
223
|
map: u,
|
|
226
224
|
marker: l,
|
|
227
225
|
mapLoading: n,
|
|
228
226
|
$autocomplete: o,
|
|
229
|
-
searchResultList:
|
|
227
|
+
searchResultList: s,
|
|
230
228
|
innerInput: b,
|
|
231
229
|
innerPoint: C,
|
|
232
230
|
adCode: M,
|
|
233
|
-
addressInfo:
|
|
231
|
+
addressInfo: k
|
|
234
232
|
}
|
|
235
|
-
),
|
|
233
|
+
), R = async () => {
|
|
236
234
|
const _ = {
|
|
237
235
|
akValue: a.akValue ?? "",
|
|
238
236
|
secretKey: a.secretKey ?? ""
|
|
239
237
|
};
|
|
240
238
|
{
|
|
241
|
-
const [
|
|
242
|
-
|
|
239
|
+
const [$, G] = await Ge("gaode");
|
|
240
|
+
$ && D.error(P("获取地图配置信息失败")), !$ && !G && D.error(P("暂未配置地图")), G && (_.akValue || (_.akValue = G.akVal), _.secretKey || (_.secretKey = G.secretK));
|
|
243
241
|
}
|
|
244
242
|
return _;
|
|
245
243
|
};
|
|
246
244
|
return Oe(async () => {
|
|
247
245
|
a.defaultLongitude && a.defaultLatitude && (C.value = [a.defaultLongitude, a.defaultLatitude]), b.value = a.defaultAddress ?? "";
|
|
248
|
-
const { akValue: _, secretKey:
|
|
249
|
-
A(_,
|
|
246
|
+
const { akValue: _, secretKey: $ } = await R();
|
|
247
|
+
A(_, $);
|
|
250
248
|
}), t({
|
|
251
249
|
/** 获取经纬度、地址、行政区划编码 */
|
|
252
250
|
getMapInfo: h
|
|
253
|
-
}), (_,
|
|
254
|
-
const
|
|
251
|
+
}), (_, $) => {
|
|
252
|
+
const G = Pe, U = ke;
|
|
255
253
|
return Te(), $e("div", {
|
|
256
254
|
class: "das-map",
|
|
257
255
|
style: je(v.value)
|
|
258
256
|
}, [
|
|
259
257
|
W("div", da, [
|
|
260
|
-
Z(de(
|
|
258
|
+
Z(de(G, {
|
|
261
259
|
ref_key: "$autocomplete",
|
|
262
260
|
ref: o,
|
|
263
261
|
modelValue: b.value,
|
|
264
|
-
"onUpdate:modelValue":
|
|
265
|
-
"fetch-suggestions":
|
|
266
|
-
placeholder:
|
|
262
|
+
"onUpdate:modelValue": $[0] || ($[0] = (T) => b.value = T),
|
|
263
|
+
"fetch-suggestions": B(L),
|
|
264
|
+
placeholder: B(P)("请输入位置"),
|
|
267
265
|
style: { width: "100%" },
|
|
268
266
|
"trigger-on-focus": !1,
|
|
269
|
-
onSelect:
|
|
270
|
-
onKeyup:
|
|
267
|
+
onSelect: B(c),
|
|
268
|
+
onKeyup: Le(B(i), ["enter", "native"]),
|
|
271
269
|
clearable: ""
|
|
272
270
|
}, null, 8, ["modelValue", "fetch-suggestions", "placeholder", "onSelect", "onKeyup"]), [
|
|
273
|
-
[
|
|
271
|
+
[B(Re)]
|
|
274
272
|
])
|
|
275
273
|
]),
|
|
276
274
|
Z(W("div", fa, null, 512), [
|
|
@@ -284,27 +282,27 @@ const Q = (e) => {
|
|
|
284
282
|
], 4);
|
|
285
283
|
};
|
|
286
284
|
}
|
|
287
|
-
}),
|
|
285
|
+
}), ze = (e, t) => {
|
|
288
286
|
const a = e.__vccOpts || e;
|
|
289
287
|
for (const [r, u] of t)
|
|
290
288
|
a[r] = u;
|
|
291
289
|
return a;
|
|
292
|
-
}, ga = /* @__PURE__ */
|
|
290
|
+
}, ga = /* @__PURE__ */ ze(va, [["__scopeId", "data-v-15845511"]]), ft = ({ BMap: e, map: t, marker: a, mapLoading: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode: s, addressInfo: v }, b) => {
|
|
293
291
|
const C = S();
|
|
294
292
|
let M;
|
|
295
|
-
const
|
|
293
|
+
const k = (g, p, w) => {
|
|
296
294
|
C.value = p, w && (M = w);
|
|
297
|
-
const
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}, document.body.append(
|
|
301
|
-
},
|
|
295
|
+
const j = document.createElement("script");
|
|
296
|
+
j.src = `${location.protocol}//api.map.baidu.com/getscript?type=webgl&v=3.0&ak=${g}&services=&t=20200109192240`, j.onload = () => {
|
|
297
|
+
L();
|
|
298
|
+
}, document.body.append(j);
|
|
299
|
+
}, L = () => {
|
|
302
300
|
var p, w;
|
|
303
301
|
e.value = window.BMapGL;
|
|
304
302
|
try {
|
|
305
303
|
t.value = new e.value.Map("map", ((p = C.value) == null ? void 0 : p.mapOpt) ?? {});
|
|
306
304
|
} catch {
|
|
307
|
-
r.value = !1,
|
|
305
|
+
r.value = !1, D.error(P("thirdPartyMapErrorRetry"));
|
|
308
306
|
}
|
|
309
307
|
const g = new e.value.NavigationControl({
|
|
310
308
|
// @ts-ignore
|
|
@@ -312,16 +310,16 @@ const Q = (e) => {
|
|
|
312
310
|
// @ts-ignore
|
|
313
311
|
type: BMAP_NAVIGATION_CONTROL_ZOOM
|
|
314
312
|
});
|
|
315
|
-
t.value.addControl(g), t.value.enableScrollWheelZoom(!0),
|
|
316
|
-
},
|
|
317
|
-
new e.value.Geocoder().getPoint(g, (
|
|
318
|
-
|
|
313
|
+
t.value.addControl(g), t.value.enableScrollWheelZoom(!0), i(), (w = C.value) != null && w.clickStream || h(), r.value = !1, M && M();
|
|
314
|
+
}, c = (g) => new Promise((p, w) => {
|
|
315
|
+
new e.value.Geocoder().getPoint(g, (d) => {
|
|
316
|
+
!d || JSON.stringify(d) == "{}" ? (D.error(P("thirdPartyMapErrorRetry")), w()) : (o.value[0] = d.lng, o.value[1] = d.lat, p(d));
|
|
319
317
|
});
|
|
320
|
-
}),
|
|
321
|
-
!n.value && !o.value.length &&
|
|
318
|
+
}), i = async () => {
|
|
319
|
+
!n.value && !o.value.length && R(), n.value && o.value.length > 0 ? await A(o.value[0], o.value[1]) : n.value ? await c(n.value) : o.value.length > 0 && await A(o.value[0], o.value[1], !0), n.value && _(n.value, (g, p) => {
|
|
322
320
|
if (p && p.length) {
|
|
323
321
|
const w = p.find(
|
|
324
|
-
(
|
|
322
|
+
(j) => j.value === n.value || j.info.name === n.value
|
|
325
323
|
);
|
|
326
324
|
w ? v.value = w.info : v.value = {
|
|
327
325
|
province: "",
|
|
@@ -337,28 +335,28 @@ const Q = (e) => {
|
|
|
337
335
|
const p = g.latlng.lng, w = g.latlng.lat;
|
|
338
336
|
o.value = [p, w], A(p, w, !0);
|
|
339
337
|
});
|
|
340
|
-
}, A = (g, p, w = !1,
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
if (
|
|
344
|
-
n.value =
|
|
345
|
-
const { province:
|
|
338
|
+
}, A = (g, p, w = !1, j = "default") => new Promise((d, f) => {
|
|
339
|
+
const y = new e.value.Geocoder(), x = new e.value.Point(g, p);
|
|
340
|
+
y.getLocation(x, (m) => {
|
|
341
|
+
if (w) {
|
|
342
|
+
n.value = m.address;
|
|
343
|
+
const { province: O = "", city: N = "", district: z = "" } = m.addressComponents;
|
|
346
344
|
v.value = {
|
|
347
|
-
province:
|
|
348
|
-
city:
|
|
349
|
-
address:
|
|
350
|
-
name:
|
|
345
|
+
province: O,
|
|
346
|
+
city: N,
|
|
347
|
+
address: N + z,
|
|
348
|
+
name: m.address.replace(O, "").replace(N, "").replace(z, "")
|
|
351
349
|
};
|
|
352
350
|
}
|
|
353
|
-
|
|
351
|
+
m && m.address ? (j == "default" && (o.value[0] = m.point.lng, o.value[1] = m.point.lat, a.value && t.value.clearOverlays(), a.value = new e.value.Marker(x, { title: n.value }), t.value.addOverlay(a.value), t.value.centerAndZoom(x, 16)), U(g, p), d(m.address)) : (D.error(P("thirdPartyMapErrorRetry")), f());
|
|
354
352
|
});
|
|
355
|
-
}),
|
|
353
|
+
}), R = () => {
|
|
356
354
|
new e.value.LocalCity().get((p) => {
|
|
357
355
|
const w = p.center;
|
|
358
|
-
if (
|
|
356
|
+
if (!p.center) return D.error(P("thirdPartyMapErrorRetry"));
|
|
359
357
|
a.value && t.value.clearOverlays();
|
|
360
|
-
const
|
|
361
|
-
t.value.centerAndZoom(
|
|
358
|
+
const j = new e.value.Point(w.lng, w.lat);
|
|
359
|
+
t.value.centerAndZoom(j, 13);
|
|
362
360
|
});
|
|
363
361
|
}, _ = (g, p) => {
|
|
364
362
|
if (u.value.activated = !0, l.value = [], !g) {
|
|
@@ -366,51 +364,51 @@ const Q = (e) => {
|
|
|
366
364
|
return;
|
|
367
365
|
}
|
|
368
366
|
new e.value.LocalSearch(t.value, {
|
|
369
|
-
onSearchComplete: (
|
|
370
|
-
let
|
|
371
|
-
for (let f = 0; f <
|
|
372
|
-
|
|
373
|
-
if (!
|
|
374
|
-
|
|
375
|
-
const { address:
|
|
367
|
+
onSearchComplete: (j) => {
|
|
368
|
+
let d = [];
|
|
369
|
+
for (let f = 0; f < j.getCurrentNumPois(); f++)
|
|
370
|
+
d.push(j.getPoi(f));
|
|
371
|
+
if (!d.length) return p([]);
|
|
372
|
+
d = d.map((f) => {
|
|
373
|
+
const { address: y = "", title: x = "", province: m = "", city: O = "", point: N = {} } = f;
|
|
376
374
|
return {
|
|
377
|
-
value:
|
|
378
|
-
point:
|
|
375
|
+
value: y == x ? y : y + x,
|
|
376
|
+
point: N,
|
|
379
377
|
info: {
|
|
380
|
-
province:
|
|
381
|
-
city:
|
|
382
|
-
address:
|
|
378
|
+
province: m,
|
|
379
|
+
city: O,
|
|
380
|
+
address: y,
|
|
383
381
|
name: x
|
|
384
382
|
}
|
|
385
383
|
};
|
|
386
|
-
}), l.value =
|
|
384
|
+
}), l.value = d.length > 5 ? d.slice(0, 5) : d, p(l.value, d);
|
|
387
385
|
}
|
|
388
386
|
}).search(g);
|
|
389
|
-
},
|
|
387
|
+
}, $ = (g) => {
|
|
390
388
|
var p, w;
|
|
391
389
|
n.value = g.value, v.value = g.info, A((p = g.point) == null ? void 0 : p.lng, (w = g.point) == null ? void 0 : w.lat);
|
|
392
|
-
},
|
|
390
|
+
}, G = () => {
|
|
393
391
|
var g;
|
|
394
|
-
if (!l.value.length) return
|
|
395
|
-
if (
|
|
396
|
-
return
|
|
392
|
+
if (!l.value.length) return D.error(P("thirdPartyMapErrorRetry"));
|
|
393
|
+
if (n.value = l.value[0].value, v.value = l.value[0].info, !((g = l.value[0]) != null && g.point))
|
|
394
|
+
return D.error(P("thirdPartyMapErrorRetry"));
|
|
397
395
|
o.value = [l.value[0].point.lng, l.value[0].point.lat], A(o.value[0], o.value[1]), u.value.activated = !1;
|
|
398
396
|
}, U = async (g, p) => {
|
|
399
|
-
const [w,
|
|
400
|
-
w || (
|
|
397
|
+
const [w, j] = await ca().run({ longitude: g, latitude: p });
|
|
398
|
+
w || (s.value = j.areaCode);
|
|
401
399
|
};
|
|
402
400
|
return {
|
|
403
401
|
getLocationByInputSearch: _,
|
|
404
|
-
handleSelectAddress:
|
|
405
|
-
getLocationParse:
|
|
402
|
+
handleSelectAddress: $,
|
|
403
|
+
getLocationParse: G,
|
|
406
404
|
getMapInfo: () => ({
|
|
407
405
|
longitude: o.value[0],
|
|
408
406
|
latitude: o.value[1],
|
|
409
|
-
adCode:
|
|
407
|
+
adCode: s.value,
|
|
410
408
|
address: n.value,
|
|
411
409
|
addressInfo: v.value
|
|
412
410
|
}),
|
|
413
|
-
loadJavascript:
|
|
411
|
+
loadJavascript: k
|
|
414
412
|
};
|
|
415
413
|
}, pa = { class: "search-input" }, ha = { id: "map" }, ya = /* @__PURE__ */ Ae({
|
|
416
414
|
__name: "baiduMap",
|
|
@@ -425,55 +423,55 @@ const Q = (e) => {
|
|
|
425
423
|
dev: { type: Boolean }
|
|
426
424
|
},
|
|
427
425
|
setup(e, { expose: t }) {
|
|
428
|
-
const a = e, r = H(null), u = H(null), l = H(null), n = S(!0), o = S(null),
|
|
426
|
+
const a = e, r = H(null), u = H(null), l = H(null), n = S(!0), o = S(null), s = S([]), v = Se(() => ({
|
|
429
427
|
width: a.width ? Q(a.width) : "100%",
|
|
430
428
|
height: a.height ? Q(a.height) : "100%"
|
|
431
|
-
})), b = S(""), C = S([]), M = S(""),
|
|
429
|
+
})), b = S(""), C = S([]), M = S(""), k = S(), { getLocationByInputSearch: L, handleSelectAddress: c, getLocationParse: i, getMapInfo: h, loadJavascript: A } = ft(
|
|
432
430
|
{
|
|
433
431
|
BMap: r,
|
|
434
432
|
map: u,
|
|
435
433
|
marker: l,
|
|
436
434
|
mapLoading: n,
|
|
437
435
|
$autocomplete: o,
|
|
438
|
-
searchResultList:
|
|
436
|
+
searchResultList: s,
|
|
439
437
|
innerInput: b,
|
|
440
438
|
innerPoint: C,
|
|
441
439
|
adCode: M,
|
|
442
|
-
addressInfo:
|
|
440
|
+
addressInfo: k
|
|
443
441
|
}
|
|
444
|
-
),
|
|
442
|
+
), R = async () => {
|
|
445
443
|
if (a.akValue) return a.akValue;
|
|
446
|
-
const [_,
|
|
447
|
-
return _ ? (
|
|
444
|
+
const [_, $] = await Ge("baidu");
|
|
445
|
+
return _ ? (D.error(P("获取地图配置信息失败")), "") : !_ && !$ ? (D.error(P("暂未配置地图")), "") : $.akVal;
|
|
448
446
|
};
|
|
449
447
|
return Oe(async () => {
|
|
450
448
|
a.defaultLongitude && a.defaultLatitude && (C.value = [a.defaultLongitude, a.defaultLatitude]), b.value = a.defaultAddress ?? "";
|
|
451
|
-
const _ = await
|
|
449
|
+
const _ = await R();
|
|
452
450
|
A(_);
|
|
453
451
|
}), t({
|
|
454
452
|
// 获取经纬度、地址、行政区划信息
|
|
455
453
|
getMapInfo: h
|
|
456
|
-
}), (_,
|
|
457
|
-
const
|
|
454
|
+
}), (_, $) => {
|
|
455
|
+
const G = Pe, U = ke;
|
|
458
456
|
return Te(), $e("div", {
|
|
459
457
|
class: "das-map",
|
|
460
458
|
style: je(v.value)
|
|
461
459
|
}, [
|
|
462
460
|
W("div", pa, [
|
|
463
|
-
Z(de(
|
|
461
|
+
Z(de(G, {
|
|
464
462
|
ref_key: "$autocomplete",
|
|
465
463
|
ref: o,
|
|
466
464
|
modelValue: b.value,
|
|
467
|
-
"onUpdate:modelValue":
|
|
468
|
-
"fetch-suggestions":
|
|
469
|
-
placeholder:
|
|
465
|
+
"onUpdate:modelValue": $[0] || ($[0] = (T) => b.value = T),
|
|
466
|
+
"fetch-suggestions": B(L),
|
|
467
|
+
placeholder: B(P)("请输入位置"),
|
|
470
468
|
style: { width: "100%" },
|
|
471
469
|
"trigger-on-focus": !1,
|
|
472
|
-
onSelect:
|
|
473
|
-
onKeyup:
|
|
470
|
+
onSelect: B(c),
|
|
471
|
+
onKeyup: Le(B(i), ["enter", "native"]),
|
|
474
472
|
clearable: ""
|
|
475
473
|
}, null, 8, ["modelValue", "fetch-suggestions", "placeholder", "onSelect", "onKeyup"]), [
|
|
476
|
-
[
|
|
474
|
+
[B(Re)]
|
|
477
475
|
])
|
|
478
476
|
]),
|
|
479
477
|
Z(W("div", ha, null, 512), [
|
|
@@ -487,7 +485,7 @@ const Q = (e) => {
|
|
|
487
485
|
], 4);
|
|
488
486
|
};
|
|
489
487
|
}
|
|
490
|
-
}), ma = /* @__PURE__ */
|
|
488
|
+
}), ma = /* @__PURE__ */ ze(ya, [["__scopeId", "data-v-42e64d2c"]]);
|
|
491
489
|
function ba() {
|
|
492
490
|
this.__data__ = [], this.size = 0;
|
|
493
491
|
}
|
|
@@ -544,24 +542,24 @@ function Ta(e) {
|
|
|
544
542
|
function $a(e) {
|
|
545
543
|
return this.__data__.has(e);
|
|
546
544
|
}
|
|
547
|
-
var vt = typeof global == "object" && global && global.Object === Object && global, ja = typeof self == "object" && self && self.Object === Object && self, te = vt || ja || Function("return this")(), ee = te.Symbol, gt = Object.prototype,
|
|
545
|
+
var vt = typeof global == "object" && global && global.Object === Object && global, ja = typeof self == "object" && self && self.Object === Object && self, te = vt || ja || Function("return this")(), ee = te.Symbol, gt = Object.prototype, La = gt.hasOwnProperty, Ea = gt.toString, ue = ee ? ee.toStringTag : void 0;
|
|
548
546
|
function Pa(e) {
|
|
549
|
-
var t =
|
|
547
|
+
var t = La.call(e, ue), a = e[ue];
|
|
550
548
|
try {
|
|
551
549
|
e[ue] = void 0;
|
|
552
550
|
var r = !0;
|
|
553
551
|
} catch {
|
|
554
552
|
}
|
|
555
|
-
var u =
|
|
553
|
+
var u = Ea.call(e);
|
|
556
554
|
return r && (t ? e[ue] = a : delete e[ue]), u;
|
|
557
555
|
}
|
|
558
556
|
var ka = Object.prototype, Ra = ka.toString;
|
|
559
|
-
function
|
|
557
|
+
function Ga(e) {
|
|
560
558
|
return Ra.call(e);
|
|
561
559
|
}
|
|
562
|
-
var
|
|
560
|
+
var za = "[object Null]", Ba = "[object Undefined]", Fe = ee ? ee.toStringTag : void 0;
|
|
563
561
|
function se(e) {
|
|
564
|
-
return e == null ? e === void 0 ? Ba :
|
|
562
|
+
return e == null ? e === void 0 ? Ba : za : Fe && Fe in Object(e) ? Pa(e) : Ga(e);
|
|
565
563
|
}
|
|
566
564
|
function Y(e) {
|
|
567
565
|
var t = typeof e;
|
|
@@ -611,9 +609,9 @@ function De(e, t) {
|
|
|
611
609
|
var a = to(e, t);
|
|
612
610
|
return eo(a) ? a : void 0;
|
|
613
611
|
}
|
|
614
|
-
var pt = De(te, "Map"),
|
|
612
|
+
var pt = De(te, "Map"), ce = De(Object, "create");
|
|
615
613
|
function ao() {
|
|
616
|
-
this.__data__ =
|
|
614
|
+
this.__data__ = ce ? ce(null) : {}, this.size = 0;
|
|
617
615
|
}
|
|
618
616
|
function oo(e) {
|
|
619
617
|
var t = this.has(e) && delete this.__data__[e];
|
|
@@ -622,21 +620,21 @@ function oo(e) {
|
|
|
622
620
|
var ro = "__lodash_hash_undefined__", no = Object.prototype, lo = no.hasOwnProperty;
|
|
623
621
|
function uo(e) {
|
|
624
622
|
var t = this.__data__;
|
|
625
|
-
if (
|
|
623
|
+
if (ce) {
|
|
626
624
|
var a = t[e];
|
|
627
625
|
return a === ro ? void 0 : a;
|
|
628
626
|
}
|
|
629
627
|
return lo.call(t, e) ? t[e] : void 0;
|
|
630
628
|
}
|
|
631
|
-
var
|
|
629
|
+
var io = Object.prototype, co = io.hasOwnProperty;
|
|
632
630
|
function so(e) {
|
|
633
631
|
var t = this.__data__;
|
|
634
|
-
return
|
|
632
|
+
return ce ? t[e] !== void 0 : co.call(t, e);
|
|
635
633
|
}
|
|
636
634
|
var fo = "__lodash_hash_undefined__";
|
|
637
635
|
function vo(e, t) {
|
|
638
636
|
var a = this.__data__;
|
|
639
|
-
return this.size += this.has(e) ? 0 : 1, a[e] =
|
|
637
|
+
return this.size += this.has(e) ? 0 : 1, a[e] = ce && t === void 0 ? fo : t, this;
|
|
640
638
|
}
|
|
641
639
|
function q(e) {
|
|
642
640
|
var t = -1, a = e == null ? 0 : e.length;
|
|
@@ -732,8 +730,8 @@ function _e(e, t, a) {
|
|
|
732
730
|
function Mo(e) {
|
|
733
731
|
return function(t, a, r) {
|
|
734
732
|
for (var u = -1, l = Object(t), n = r(t), o = n.length; o--; ) {
|
|
735
|
-
var
|
|
736
|
-
if (a(l[
|
|
733
|
+
var s = n[++u];
|
|
734
|
+
if (a(l[s], s, l) === !1)
|
|
737
735
|
break;
|
|
738
736
|
}
|
|
739
737
|
return t;
|
|
@@ -777,12 +775,12 @@ function jo(e, t) {
|
|
|
777
775
|
return e(t(a));
|
|
778
776
|
};
|
|
779
777
|
}
|
|
780
|
-
var yt = jo(Object.getPrototypeOf, Object),
|
|
778
|
+
var yt = jo(Object.getPrototypeOf, Object), Lo = Object.prototype;
|
|
781
779
|
function mt(e) {
|
|
782
|
-
var t = e && e.constructor, a = typeof t == "function" && t.prototype ||
|
|
780
|
+
var t = e && e.constructor, a = typeof t == "function" && t.prototype || Lo;
|
|
783
781
|
return e === a;
|
|
784
782
|
}
|
|
785
|
-
function
|
|
783
|
+
function Eo(e) {
|
|
786
784
|
return typeof e.constructor == "function" && !mt(e) ? $o(yt(e)) : {};
|
|
787
785
|
}
|
|
788
786
|
function re(e) {
|
|
@@ -796,14 +794,14 @@ var bt = Object.prototype, ko = bt.hasOwnProperty, Ro = bt.propertyIsEnumerable,
|
|
|
796
794
|
return arguments;
|
|
797
795
|
}()) ? qe : function(e) {
|
|
798
796
|
return re(e) && ko.call(e, "callee") && !Ro.call(e, "callee");
|
|
799
|
-
}, ve = Array.isArray,
|
|
797
|
+
}, ve = Array.isArray, Go = 9007199254740991;
|
|
800
798
|
function _t(e) {
|
|
801
|
-
return typeof e == "number" && e > -1 && e % 1 == 0 && e <=
|
|
799
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Go;
|
|
802
800
|
}
|
|
803
801
|
function Ue(e) {
|
|
804
802
|
return e != null && _t(e.length) && !Be(e);
|
|
805
803
|
}
|
|
806
|
-
function
|
|
804
|
+
function zo(e) {
|
|
807
805
|
return re(e) && Ue(e);
|
|
808
806
|
}
|
|
809
807
|
function Bo() {
|
|
@@ -819,20 +817,20 @@ function Io(e) {
|
|
|
819
817
|
var a = Fo.call(t, "constructor") && t.constructor;
|
|
820
818
|
return typeof a == "function" && a instanceof a && xt.call(a) == Ho;
|
|
821
819
|
}
|
|
822
|
-
var Jo = "[object Arguments]", Zo = "[object Array]", Wo = "[object Boolean]", qo = "[object Date]", Yo = "[object Error]", Xo = "[object Function]", Qo = "[object Map]", er = "[object Number]", tr = "[object Object]", ar = "[object RegExp]", or = "[object Set]", rr = "[object String]", nr = "[object WeakMap]", lr = "[object ArrayBuffer]", ur = "[object DataView]",
|
|
823
|
-
|
|
824
|
-
|
|
820
|
+
var Jo = "[object Arguments]", Zo = "[object Array]", Wo = "[object Boolean]", qo = "[object Date]", Yo = "[object Error]", Xo = "[object Function]", Qo = "[object Map]", er = "[object Number]", tr = "[object Object]", ar = "[object RegExp]", or = "[object Set]", rr = "[object String]", nr = "[object WeakMap]", lr = "[object ArrayBuffer]", ur = "[object DataView]", ir = "[object Float32Array]", cr = "[object Float64Array]", sr = "[object Int8Array]", dr = "[object Int16Array]", fr = "[object Int32Array]", vr = "[object Uint8Array]", gr = "[object Uint8ClampedArray]", pr = "[object Uint16Array]", hr = "[object Uint32Array]", E = {};
|
|
821
|
+
E[ir] = E[cr] = E[sr] = E[dr] = E[fr] = E[vr] = E[gr] = E[pr] = E[hr] = !0;
|
|
822
|
+
E[Jo] = E[Zo] = E[lr] = E[Wo] = E[ur] = E[qo] = E[Yo] = E[Xo] = E[Qo] = E[er] = E[tr] = E[ar] = E[or] = E[rr] = E[nr] = !1;
|
|
825
823
|
function yr(e) {
|
|
826
|
-
return re(e) && _t(e.length) && !!
|
|
824
|
+
return re(e) && _t(e.length) && !!E[se(e)];
|
|
827
825
|
}
|
|
828
826
|
function mr(e) {
|
|
829
827
|
return function(t) {
|
|
830
828
|
return e(t);
|
|
831
829
|
};
|
|
832
830
|
}
|
|
833
|
-
var Ct = typeof exports == "object" && exports && !exports.nodeType && exports,
|
|
831
|
+
var Ct = typeof exports == "object" && exports && !exports.nodeType && exports, ie = Ct && typeof module == "object" && module && !module.nodeType && module, br = ie && ie.exports === Ct, be = br && vt.process, Qe = function() {
|
|
834
832
|
try {
|
|
835
|
-
var e =
|
|
833
|
+
var e = ie && ie.require && ie.require("util").types;
|
|
836
834
|
return e || be && be.binding && be.binding("util");
|
|
837
835
|
} catch {
|
|
838
836
|
}
|
|
@@ -850,8 +848,8 @@ function xr(e, t, a, r) {
|
|
|
850
848
|
var u = !a;
|
|
851
849
|
a || (a = {});
|
|
852
850
|
for (var l = -1, n = t.length; ++l < n; ) {
|
|
853
|
-
var o = t[l],
|
|
854
|
-
|
|
851
|
+
var o = t[l], s = void 0;
|
|
852
|
+
s === void 0 && (s = e[o]), u ? Ne(a, o, s) : Mr(a, o, s);
|
|
855
853
|
}
|
|
856
854
|
return a;
|
|
857
855
|
}
|
|
@@ -866,13 +864,13 @@ function St(e, t) {
|
|
|
866
864
|
return t = t ?? Ar, !!t && (a == "number" || a != "symbol" && Sr.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
867
865
|
}
|
|
868
866
|
function Or(e, t) {
|
|
869
|
-
var a = ve(e), r = !a && we(e), u = !a && !r && Mt(e), l = !a && !r && !u && At(e), n = a || r || u || l, o = n ? Cr(e.length, String) : [],
|
|
867
|
+
var a = ve(e), r = !a && we(e), u = !a && !r && Mt(e), l = !a && !r && !u && At(e), n = a || r || u || l, o = n ? Cr(e.length, String) : [], s = o.length;
|
|
870
868
|
for (var v in e)
|
|
871
869
|
n && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
872
870
|
(v == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
873
871
|
u && (v == "offset" || v == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
874
872
|
l && (v == "buffer" || v == "byteLength" || v == "byteOffset") || // Skip index properties.
|
|
875
|
-
St(v,
|
|
873
|
+
St(v, s)) || o.push(v);
|
|
876
874
|
return o;
|
|
877
875
|
}
|
|
878
876
|
function Tr(e) {
|
|
@@ -883,7 +881,7 @@ function Tr(e) {
|
|
|
883
881
|
return t;
|
|
884
882
|
}
|
|
885
883
|
var $r = Object.prototype, jr = $r.hasOwnProperty;
|
|
886
|
-
function
|
|
884
|
+
function Lr(e) {
|
|
887
885
|
if (!Y(e))
|
|
888
886
|
return Tr(e);
|
|
889
887
|
var t = mt(e), a = [];
|
|
@@ -892,23 +890,23 @@ function Er(e) {
|
|
|
892
890
|
return a;
|
|
893
891
|
}
|
|
894
892
|
function Ot(e) {
|
|
895
|
-
return Ue(e) ? Or(e) :
|
|
893
|
+
return Ue(e) ? Or(e) : Lr(e);
|
|
896
894
|
}
|
|
897
|
-
function
|
|
895
|
+
function Er(e) {
|
|
898
896
|
return xr(e, Ot(e));
|
|
899
897
|
}
|
|
900
898
|
function Pr(e, t, a, r, u, l, n) {
|
|
901
|
-
var o = Me(e, a),
|
|
899
|
+
var o = Me(e, a), s = Me(t, a), v = n.get(s);
|
|
902
900
|
if (v) {
|
|
903
901
|
_e(e, a, v);
|
|
904
902
|
return;
|
|
905
903
|
}
|
|
906
|
-
var b = l ? l(o,
|
|
904
|
+
var b = l ? l(o, s, a + "", e, t, n) : void 0, C = b === void 0;
|
|
907
905
|
if (C) {
|
|
908
|
-
var M = ve(
|
|
909
|
-
b =
|
|
906
|
+
var M = ve(s), k = !M && Mt(s), L = !M && !k && At(s);
|
|
907
|
+
b = s, M || k || L ? ve(o) ? b = o : zo(o) ? b = To(o) : k ? (C = !1, b = Ao(s)) : L ? (C = !1, b = Oo(s)) : b = [] : Io(s) || we(s) ? (b = o, we(o) ? b = Er(o) : (!Y(o) || Be(o)) && (b = Eo(s))) : C = !1;
|
|
910
908
|
}
|
|
911
|
-
C && (n.set(
|
|
909
|
+
C && (n.set(s, b), u(b, s, r, l, n), n.delete(s)), _e(e, a, b);
|
|
912
910
|
}
|
|
913
911
|
function Tt(e, t, a, r, u) {
|
|
914
912
|
e !== t && xo(t, function(l, n) {
|
|
@@ -947,16 +945,16 @@ function Rr(e, t, a) {
|
|
|
947
945
|
return o[t] = a(n), kr(e, this, o);
|
|
948
946
|
};
|
|
949
947
|
}
|
|
950
|
-
function
|
|
948
|
+
function Gr(e) {
|
|
951
949
|
return function() {
|
|
952
950
|
return e;
|
|
953
951
|
};
|
|
954
952
|
}
|
|
955
|
-
var
|
|
953
|
+
var zr = fe ? function(e, t) {
|
|
956
954
|
return fe(e, "toString", {
|
|
957
955
|
configurable: !0,
|
|
958
956
|
enumerable: !1,
|
|
959
|
-
value:
|
|
957
|
+
value: Gr(t),
|
|
960
958
|
writable: !0
|
|
961
959
|
});
|
|
962
960
|
} : $t, Br = 800, Dr = 16, Nr = Date.now;
|
|
@@ -972,7 +970,7 @@ function Ur(e) {
|
|
|
972
970
|
return e.apply(void 0, arguments);
|
|
973
971
|
};
|
|
974
972
|
}
|
|
975
|
-
var Vr = Ur(
|
|
973
|
+
var Vr = Ur(zr);
|
|
976
974
|
function Kr(e, t) {
|
|
977
975
|
return Vr(Rr(e, t, $t), e + "");
|
|
978
976
|
}
|
|
@@ -1003,64 +1001,64 @@ var jt = { exports: {} };
|
|
|
1003
1001
|
(function(t, a) {
|
|
1004
1002
|
e.exports ? e.exports = a() : t.coordtransform = a();
|
|
1005
1003
|
})(Jr, function() {
|
|
1006
|
-
var t = 52.35987755982988, a = 3.141592653589793, r = 6378245, u = 0.006693421622965943, l = function(
|
|
1007
|
-
var
|
|
1008
|
-
return [
|
|
1009
|
-
}, n = function(
|
|
1010
|
-
var
|
|
1011
|
-
return [
|
|
1012
|
-
}, o = function(
|
|
1013
|
-
var
|
|
1014
|
-
if (C(
|
|
1015
|
-
return [
|
|
1016
|
-
var h = v(
|
|
1004
|
+
var t = 52.35987755982988, a = 3.141592653589793, r = 6378245, u = 0.006693421622965943, l = function(c, i) {
|
|
1005
|
+
var c = +c, i = +i, h = c - 65e-4, A = i - 6e-3, R = Math.sqrt(h * h + A * A) - 2e-5 * Math.sin(A * t), _ = Math.atan2(A, h) - 3e-6 * Math.cos(h * t), $ = R * Math.cos(_), G = R * Math.sin(_);
|
|
1006
|
+
return [$, G];
|
|
1007
|
+
}, n = function(i, c) {
|
|
1008
|
+
var c = +c, i = +i, h = Math.sqrt(i * i + c * c) + 2e-5 * Math.sin(c * t), A = Math.atan2(c, i) + 3e-6 * Math.cos(i * t), R = h * Math.cos(A) + 65e-4, _ = h * Math.sin(A) + 6e-3;
|
|
1009
|
+
return [R, _];
|
|
1010
|
+
}, o = function(i, c) {
|
|
1011
|
+
var c = +c, i = +i;
|
|
1012
|
+
if (C(i, c))
|
|
1013
|
+
return [i, c];
|
|
1014
|
+
var h = v(i - 105, c - 35), A = b(i - 105, c - 35), R = c / 180 * a, _ = Math.sin(R);
|
|
1017
1015
|
_ = 1 - u * _ * _;
|
|
1018
|
-
var
|
|
1019
|
-
h = h * 180 / (r * (1 - u) / (_ *
|
|
1020
|
-
var
|
|
1021
|
-
return [U,
|
|
1022
|
-
},
|
|
1023
|
-
var
|
|
1024
|
-
if (C(
|
|
1025
|
-
return [
|
|
1026
|
-
var h = v(
|
|
1016
|
+
var $ = Math.sqrt(_);
|
|
1017
|
+
h = h * 180 / (r * (1 - u) / (_ * $) * a), A = A * 180 / (r / $ * Math.cos(R) * a);
|
|
1018
|
+
var G = c + h, U = i + A;
|
|
1019
|
+
return [U, G];
|
|
1020
|
+
}, s = function(i, c) {
|
|
1021
|
+
var c = +c, i = +i;
|
|
1022
|
+
if (C(i, c))
|
|
1023
|
+
return [i, c];
|
|
1024
|
+
var h = v(i - 105, c - 35), A = b(i - 105, c - 35), R = c / 180 * a, _ = Math.sin(R);
|
|
1027
1025
|
_ = 1 - u * _ * _;
|
|
1028
|
-
var
|
|
1029
|
-
h = h * 180 / (r * (1 - u) / (_ *
|
|
1030
|
-
var
|
|
1031
|
-
return [
|
|
1032
|
-
}, v = function(
|
|
1033
|
-
var
|
|
1034
|
-
return h += (20 * Math.sin(6 *
|
|
1035
|
-
}, b = function(
|
|
1036
|
-
var
|
|
1037
|
-
return h += (20 * Math.sin(6 *
|
|
1038
|
-
}, C = function(
|
|
1039
|
-
var
|
|
1040
|
-
return !(
|
|
1026
|
+
var $ = Math.sqrt(_);
|
|
1027
|
+
h = h * 180 / (r * (1 - u) / (_ * $) * a), A = A * 180 / (r / $ * Math.cos(R) * a);
|
|
1028
|
+
var G = c + h, U = i + A;
|
|
1029
|
+
return [i * 2 - U, c * 2 - G];
|
|
1030
|
+
}, v = function(i, c) {
|
|
1031
|
+
var c = +c, i = +i, h = -100 + 2 * i + 3 * c + 0.2 * c * c + 0.1 * i * c + 0.2 * Math.sqrt(Math.abs(i));
|
|
1032
|
+
return h += (20 * Math.sin(6 * i * a) + 20 * Math.sin(2 * i * a)) * 2 / 3, h += (20 * Math.sin(c * a) + 40 * Math.sin(c / 3 * a)) * 2 / 3, h += (160 * Math.sin(c / 12 * a) + 320 * Math.sin(c * a / 30)) * 2 / 3, h;
|
|
1033
|
+
}, b = function(i, c) {
|
|
1034
|
+
var c = +c, i = +i, h = 300 + i + 2 * c + 0.1 * i * i + 0.1 * i * c + 0.1 * Math.sqrt(Math.abs(i));
|
|
1035
|
+
return h += (20 * Math.sin(6 * i * a) + 20 * Math.sin(2 * i * a)) * 2 / 3, h += (20 * Math.sin(i * a) + 40 * Math.sin(i / 3 * a)) * 2 / 3, h += (150 * Math.sin(i / 12 * a) + 300 * Math.sin(i / 30 * a)) * 2 / 3, h;
|
|
1036
|
+
}, C = function(i, c) {
|
|
1037
|
+
var c = +c, i = +i;
|
|
1038
|
+
return !(i > 73.66 && i < 135.05 && c > 3.86 && c < 53.55);
|
|
1041
1039
|
};
|
|
1042
1040
|
return {
|
|
1043
1041
|
bd09togcj02: l,
|
|
1044
1042
|
gcj02tobd09: n,
|
|
1045
1043
|
wgs84togcj02: o,
|
|
1046
|
-
gcj02towgs84:
|
|
1044
|
+
gcj02towgs84: s
|
|
1047
1045
|
};
|
|
1048
1046
|
});
|
|
1049
1047
|
})(jt);
|
|
1050
1048
|
var Wr = jt.exports;
|
|
1051
|
-
const
|
|
1049
|
+
const Lt = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: r, map: u }) => {
|
|
1052
1050
|
const l = (n, o) => {
|
|
1053
|
-
const
|
|
1054
|
-
|
|
1051
|
+
const s = document.createElement("div");
|
|
1052
|
+
s.style.cursor = "pointer";
|
|
1055
1053
|
const v = Qt(n, o);
|
|
1056
|
-
return ea(v,
|
|
1054
|
+
return ea(v, s), s;
|
|
1057
1055
|
};
|
|
1058
1056
|
e.addCustomComponent = (n) => {
|
|
1059
1057
|
!Array.isArray(n) || (n == null ? void 0 : n.length) === 0 || n.forEach((o) => {
|
|
1060
|
-
const { component:
|
|
1058
|
+
const { component: s, componentProps: v, lng: b, lat: C, markerOptions: M = {} } = o, k = typeof v == "function" ? v() : v, L = typeof s == "function" ? s() : s, c = () => l(L, k);
|
|
1061
1059
|
if (a.value === "baidu") {
|
|
1062
|
-
const
|
|
1063
|
-
point: { lng:
|
|
1060
|
+
const i = Lt.gcj02tobd09(b, C), h = new r.value.CustomOverlay(c, {
|
|
1061
|
+
point: { lng: i[0], lat: i[1] },
|
|
1064
1062
|
...M
|
|
1065
1063
|
});
|
|
1066
1064
|
u.value.addOverlay(h), h.addEventListener("click", function(A) {
|
|
@@ -1068,7 +1066,7 @@ const Et = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: r, map: u }) =>
|
|
|
1068
1066
|
});
|
|
1069
1067
|
}
|
|
1070
1068
|
if (a.value === "gaode") {
|
|
1071
|
-
const
|
|
1069
|
+
const i = l(L, k), h = new r.value.Marker({ content: i, position: [b, C], ...M });
|
|
1072
1070
|
u.value.add(h), r.value.event.addListener(h, "click", function(A) {
|
|
1073
1071
|
t("click-custom-component", o, A);
|
|
1074
1072
|
});
|
|
@@ -1078,16 +1076,16 @@ const Et = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: r, map: u }) =>
|
|
|
1078
1076
|
}, Yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1079
1077
|
__proto__: null,
|
|
1080
1078
|
default: qr
|
|
1081
|
-
}, Symbol.toStringTag, { value: "Module" })), Xr = (e, t, { type: a, MapGL: r, map: u, innerPoint: l, innerInput: n, adCode: o, addressInfo:
|
|
1079
|
+
}, Symbol.toStringTag, { value: "Module" })), Xr = (e, t, { type: a, MapGL: r, map: u, innerPoint: l, innerInput: n, adCode: o, addressInfo: s }) => {
|
|
1082
1080
|
e.getMapInfo = () => {
|
|
1083
1081
|
if (a.value === "baidu") {
|
|
1084
|
-
const v =
|
|
1082
|
+
const v = Lt.bd09togcj02(l.value[0], l.value[1]);
|
|
1085
1083
|
return {
|
|
1086
1084
|
longitude: v[0],
|
|
1087
1085
|
latitude: v[1],
|
|
1088
1086
|
address: n.value,
|
|
1089
1087
|
adCode: o.value,
|
|
1090
|
-
addressInfo:
|
|
1088
|
+
addressInfo: s.value
|
|
1091
1089
|
};
|
|
1092
1090
|
}
|
|
1093
1091
|
if (a.value === "gaode")
|
|
@@ -1096,7 +1094,7 @@ const Et = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: r, map: u }) =>
|
|
|
1096
1094
|
latitude: l.value[1],
|
|
1097
1095
|
address: n.value,
|
|
1098
1096
|
adCode: o.value,
|
|
1099
|
-
addressInfo:
|
|
1097
|
+
addressInfo: s.value
|
|
1100
1098
|
};
|
|
1101
1099
|
if (a.value === "google")
|
|
1102
1100
|
return {
|
|
@@ -1104,7 +1102,7 @@ const Et = /* @__PURE__ */ Zr(Wr), qr = (e, t, { type: a, MapGL: r, map: u }) =>
|
|
|
1104
1102
|
latitude: l.value[1],
|
|
1105
1103
|
address: n.value,
|
|
1106
1104
|
adCode: o.value,
|
|
1107
|
-
addressInfo:
|
|
1105
|
+
addressInfo: s.value
|
|
1108
1106
|
};
|
|
1109
1107
|
};
|
|
1110
1108
|
}, Qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1121,18 +1119,18 @@ function an(e) {
|
|
|
1121
1119
|
return typeof e == "symbol" || re(e) && se(e) == tn;
|
|
1122
1120
|
}
|
|
1123
1121
|
var at = ee ? ee.prototype : void 0, ot = at ? at.toString : void 0;
|
|
1124
|
-
function
|
|
1122
|
+
function Et(e) {
|
|
1125
1123
|
if (typeof e == "string")
|
|
1126
1124
|
return e;
|
|
1127
1125
|
if (ve(e))
|
|
1128
|
-
return en(e,
|
|
1126
|
+
return en(e, Et) + "";
|
|
1129
1127
|
if (an(e))
|
|
1130
1128
|
return ot ? ot.call(e) : "";
|
|
1131
1129
|
var t = e + "";
|
|
1132
1130
|
return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
|
|
1133
1131
|
}
|
|
1134
1132
|
function ye(e) {
|
|
1135
|
-
return e == null ? "" :
|
|
1133
|
+
return e == null ? "" : Et(e);
|
|
1136
1134
|
}
|
|
1137
1135
|
function on(e, t, a) {
|
|
1138
1136
|
var r = -1, u = e.length;
|
|
@@ -1152,7 +1150,7 @@ function Pt(e) {
|
|
|
1152
1150
|
function gn(e) {
|
|
1153
1151
|
return e.split("");
|
|
1154
1152
|
}
|
|
1155
|
-
var kt = "\\ud800-\\udfff", pn = "\\u0300-\\u036f", hn = "\\ufe20-\\ufe2f", yn = "\\u20d0-\\u20ff", mn = pn + hn + yn, bn = "\\ufe0e\\ufe0f", _n = "[" + kt + "]", xe = "[" + mn + "]", Ce = "\\ud83c[\\udffb-\\udfff]", wn = "(?:" + xe + "|" + Ce + ")", Rt = "[^" + kt + "]",
|
|
1153
|
+
var kt = "\\ud800-\\udfff", pn = "\\u0300-\\u036f", hn = "\\ufe20-\\ufe2f", yn = "\\u20d0-\\u20ff", mn = pn + hn + yn, bn = "\\ufe0e\\ufe0f", _n = "[" + kt + "]", xe = "[" + mn + "]", Ce = "\\ud83c[\\udffb-\\udfff]", wn = "(?:" + xe + "|" + Ce + ")", Rt = "[^" + kt + "]", Gt = "(?:\\ud83c[\\udde6-\\uddff]){2}", zt = "[\\ud800-\\udbff][\\udc00-\\udfff]", Mn = "\\u200d", Bt = wn + "?", Dt = "[" + bn + "]?", xn = "(?:" + Mn + "(?:" + [Rt, Gt, zt].join("|") + ")" + Dt + Bt + ")*", Cn = Dt + Bt + xn, An = "(?:" + [Rt + xe + "?", xe, Gt, zt, _n].join("|") + ")", Sn = RegExp(Ce + "(?=" + Ce + ")|" + An + Cn, "g");
|
|
1156
1154
|
function On(e) {
|
|
1157
1155
|
return e.match(Sn) || [];
|
|
1158
1156
|
}
|
|
@@ -1167,10 +1165,10 @@ function $n(e) {
|
|
|
1167
1165
|
};
|
|
1168
1166
|
}
|
|
1169
1167
|
var jn = $n("toUpperCase");
|
|
1170
|
-
function
|
|
1168
|
+
function Ln(e) {
|
|
1171
1169
|
return jn(ye(e).toLowerCase());
|
|
1172
1170
|
}
|
|
1173
|
-
function
|
|
1171
|
+
function En(e, t, a, r) {
|
|
1174
1172
|
for (var u = -1, l = e == null ? 0 : e.length; ++u < l; )
|
|
1175
1173
|
a = t(a, e[u], u, e);
|
|
1176
1174
|
return a;
|
|
@@ -1373,9 +1371,9 @@ var kn = {
|
|
|
1373
1371
|
œ: "oe",
|
|
1374
1372
|
ʼn: "'n",
|
|
1375
1373
|
ſ: "s"
|
|
1376
|
-
}, Rn = Pn(kn),
|
|
1374
|
+
}, Rn = Pn(kn), Gn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, zn = "\\u0300-\\u036f", Bn = "\\ufe20-\\ufe2f", Dn = "\\u20d0-\\u20ff", Nn = zn + Bn + Dn, Un = "[" + Nn + "]", Vn = RegExp(Un, "g");
|
|
1377
1375
|
function Kn(e) {
|
|
1378
|
-
return e = ye(e), e && e.replace(
|
|
1376
|
+
return e = ye(e), e && e.replace(Gn, Rn).replace(Vn, "");
|
|
1379
1377
|
}
|
|
1380
1378
|
var Fn = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
1381
1379
|
function Hn(e) {
|
|
@@ -1385,9 +1383,9 @@ var In = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
|
1385
1383
|
function Jn(e) {
|
|
1386
1384
|
return In.test(e);
|
|
1387
1385
|
}
|
|
1388
|
-
var Nt = "\\ud800-\\udfff", Zn = "\\u0300-\\u036f", Wn = "\\ufe20-\\ufe2f", qn = "\\u20d0-\\u20ff", Yn = Zn + Wn + qn, Ut = "\\u2700-\\u27bf", Vt = "a-z\\xdf-\\xf6\\xf8-\\xff", Xn = "\\xac\\xb1\\xd7\\xf7", Qn = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", el = "\\u2000-\\u206f", tl = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Kt = "A-Z\\xc0-\\xd6\\xd8-\\xde", al = "\\ufe0e\\ufe0f", Ft = Xn + Qn + el + tl, Ht = "['’]", rt = "[" + Ft + "]", ol = "[" + Yn + "]", It = "\\d+", rl = "[" + Ut + "]", Jt = "[" + Vt + "]", Zt = "[^" + Nt + Ft + It + Ut + Vt + Kt + "]", nl = "\\ud83c[\\udffb-\\udfff]", ll = "(?:" + ol + "|" + nl + ")", ul = "[^" + Nt + "]", Wt = "(?:\\ud83c[\\udde6-\\uddff]){2}", qt = "[\\ud800-\\udbff][\\udc00-\\udfff]", X = "[" + Kt + "]",
|
|
1386
|
+
var Nt = "\\ud800-\\udfff", Zn = "\\u0300-\\u036f", Wn = "\\ufe20-\\ufe2f", qn = "\\u20d0-\\u20ff", Yn = Zn + Wn + qn, Ut = "\\u2700-\\u27bf", Vt = "a-z\\xdf-\\xf6\\xf8-\\xff", Xn = "\\xac\\xb1\\xd7\\xf7", Qn = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", el = "\\u2000-\\u206f", tl = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Kt = "A-Z\\xc0-\\xd6\\xd8-\\xde", al = "\\ufe0e\\ufe0f", Ft = Xn + Qn + el + tl, Ht = "['’]", rt = "[" + Ft + "]", ol = "[" + Yn + "]", It = "\\d+", rl = "[" + Ut + "]", Jt = "[" + Vt + "]", Zt = "[^" + Nt + Ft + It + Ut + Vt + Kt + "]", nl = "\\ud83c[\\udffb-\\udfff]", ll = "(?:" + ol + "|" + nl + ")", ul = "[^" + Nt + "]", Wt = "(?:\\ud83c[\\udde6-\\uddff]){2}", qt = "[\\ud800-\\udbff][\\udc00-\\udfff]", X = "[" + Kt + "]", il = "\\u200d", nt = "(?:" + Jt + "|" + Zt + ")", cl = "(?:" + X + "|" + Zt + ")", lt = "(?:" + Ht + "(?:d|ll|m|re|s|t|ve))?", ut = "(?:" + Ht + "(?:D|LL|M|RE|S|T|VE))?", Yt = ll + "?", Xt = "[" + al + "]?", sl = "(?:" + il + "(?:" + [ul, Wt, qt].join("|") + ")" + Xt + Yt + ")*", dl = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", fl = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", vl = Xt + Yt + sl, gl = "(?:" + [rl, Wt, qt].join("|") + ")" + vl, pl = RegExp([
|
|
1389
1387
|
X + "?" + Jt + "+" + lt + "(?=" + [rt, X, "$"].join("|") + ")",
|
|
1390
|
-
|
|
1388
|
+
cl + "+" + ut + "(?=" + [rt, X + nt, "$"].join("|") + ")",
|
|
1391
1389
|
X + "?" + nt + "+" + lt,
|
|
1392
1390
|
X + "+" + ut,
|
|
1393
1391
|
fl,
|
|
@@ -1404,44 +1402,44 @@ function yl(e, t, a) {
|
|
|
1404
1402
|
var ml = "['’]", bl = RegExp(ml, "g");
|
|
1405
1403
|
function _l(e) {
|
|
1406
1404
|
return function(t) {
|
|
1407
|
-
return
|
|
1405
|
+
return En(yl(Kn(t).replace(bl, "")), e, "");
|
|
1408
1406
|
};
|
|
1409
1407
|
}
|
|
1410
1408
|
var wl = _l(function(e, t, a) {
|
|
1411
|
-
return t = t.toLowerCase(), e + (a ?
|
|
1409
|
+
return t = t.toLowerCase(), e + (a ? Ln(t) : t);
|
|
1412
1410
|
});
|
|
1413
|
-
const
|
|
1411
|
+
const it = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./get-map-info/index.ts": Qr }), Ml = Object.keys(it).reduce((e, t) => {
|
|
1414
1412
|
const a = wl(t.replace("./", "").split("/")[0]);
|
|
1415
|
-
return e[a] =
|
|
1413
|
+
return e[a] = it[t].default, e;
|
|
1416
1414
|
}, {}), xl = (e, t, a) => {
|
|
1417
1415
|
const r = S({});
|
|
1418
1416
|
return { mapElement: r, addPlugins: () => {
|
|
1419
|
-
const n = Ir({}, (e == null ? void 0 : e.options) || {}, (o,
|
|
1420
|
-
if (Array.isArray(o)) return o.concat(
|
|
1417
|
+
const n = Ir({}, (e == null ? void 0 : e.options) || {}, (o, s) => {
|
|
1418
|
+
if (Array.isArray(o)) return o.concat(s);
|
|
1421
1419
|
});
|
|
1422
1420
|
Object.values(Ml).forEach((o) => o(r.value, t, a, n.plugins || {}));
|
|
1423
1421
|
} };
|
|
1424
|
-
}, Cl = ({ MapGL: e, map: t, marker: a, mapLoading: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode:
|
|
1425
|
-
const C = S(), M = S(),
|
|
1426
|
-
let
|
|
1427
|
-
const
|
|
1422
|
+
}, Cl = ({ MapGL: e, map: t, marker: a, mapLoading: r, $autocomplete: u, searchResultList: l, innerInput: n, innerPoint: o, adCode: s, addressInfo: v }, b) => {
|
|
1423
|
+
const C = S(), M = S(), k = S();
|
|
1424
|
+
let L = null;
|
|
1425
|
+
const c = S(!1), i = S();
|
|
1428
1426
|
let h;
|
|
1429
|
-
const A = async (
|
|
1430
|
-
if (
|
|
1431
|
-
const
|
|
1432
|
-
|
|
1433
|
-
|
|
1427
|
+
const A = async (d, f, y, x) => {
|
|
1428
|
+
if (i.value = y, x && (h = x), document.getElementById(d)) return R();
|
|
1429
|
+
const m = document.createElement("script"), O = `mapLoad${(/* @__PURE__ */ new Date()).getTime()}`, N = `https://maps.googleapis.com/maps/api/js?key=${d}&loading=async&callback=${O}`;
|
|
1430
|
+
m.setAttribute("id", d), m.setAttribute("src", N), document.body.appendChild(m), window[O] = () => {
|
|
1431
|
+
R();
|
|
1434
1432
|
};
|
|
1435
|
-
},
|
|
1436
|
-
var
|
|
1437
|
-
const { Map:
|
|
1438
|
-
e.value =
|
|
1439
|
-
const { Place: f, AutocompleteSessionToken:
|
|
1440
|
-
M.value = new
|
|
1441
|
-
const { AdvancedMarkerElement:
|
|
1442
|
-
|
|
1443
|
-
const
|
|
1444
|
-
t.value = new
|
|
1433
|
+
}, R = async () => {
|
|
1434
|
+
var N, z;
|
|
1435
|
+
const { Map: d } = await google.maps.importLibrary("maps");
|
|
1436
|
+
e.value = d;
|
|
1437
|
+
const { Place: f, AutocompleteSessionToken: y, AutocompleteSuggestion: x } = await google.maps.importLibrary("places");
|
|
1438
|
+
M.value = new y(), k.value = x, C.value = f;
|
|
1439
|
+
const { AdvancedMarkerElement: m } = await google.maps.importLibrary("marker");
|
|
1440
|
+
L = m;
|
|
1441
|
+
const O = ((N = i.value) == null ? void 0 : N.mapOpt) ?? {};
|
|
1442
|
+
t.value = new d(document.getElementById("map"), {
|
|
1445
1443
|
zoom: 11,
|
|
1446
1444
|
mapId: "DEMO_MAP_ID",
|
|
1447
1445
|
fullscreenControl: !1,
|
|
@@ -1452,32 +1450,32 @@ const ct = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1452
1450
|
// 左上角地图类型
|
|
1453
1451
|
gestureHandling: "greedy",
|
|
1454
1452
|
// 谷歌地图api缩放去掉ctrl+滚轮缩放,直接鼠标缩放
|
|
1455
|
-
...
|
|
1456
|
-
}), await
|
|
1453
|
+
...O
|
|
1454
|
+
}), await $(), (z = i.value) != null && z.clickStream || _(), r.value = !1, c.value = !n.value && !o.value.length, h && h();
|
|
1457
1455
|
}, _ = () => {
|
|
1458
|
-
var
|
|
1459
|
-
(
|
|
1460
|
-
var
|
|
1461
|
-
a.value && a.value.setMap(null), o.value = [(
|
|
1462
|
-
var
|
|
1463
|
-
const
|
|
1456
|
+
var d;
|
|
1457
|
+
(d = t.value) == null || d.addListener("click", (f) => {
|
|
1458
|
+
var y, x;
|
|
1459
|
+
a.value && a.value.setMap(null), o.value = [(y = f == null ? void 0 : f.latLng) == null ? void 0 : y.lng(), (x = f == null ? void 0 : f.latLng) == null ? void 0 : x.lat()], G(o.value, !0).then(() => {
|
|
1460
|
+
var O;
|
|
1461
|
+
const m = {
|
|
1464
1462
|
lng: parseFloat(o.value[0]),
|
|
1465
1463
|
lat: parseFloat(o.value[1])
|
|
1466
1464
|
};
|
|
1467
|
-
a.value = new
|
|
1465
|
+
a.value = new L({
|
|
1468
1466
|
map: t.value,
|
|
1469
|
-
position:
|
|
1467
|
+
position: m,
|
|
1470
1468
|
title: n.value
|
|
1471
1469
|
// 鼠标移上去时显示的内容
|
|
1472
|
-
}), (
|
|
1470
|
+
}), (O = t.value) == null || O.panTo(m);
|
|
1473
1471
|
});
|
|
1474
1472
|
});
|
|
1475
|
-
},
|
|
1476
|
-
var
|
|
1477
|
-
if (!n.value && o.value.length, n.value && o.value.length > 0 ? await
|
|
1478
|
-
if (
|
|
1479
|
-
const x =
|
|
1480
|
-
(
|
|
1473
|
+
}, $ = async () => {
|
|
1474
|
+
var d;
|
|
1475
|
+
if (!n.value && o.value.length, n.value && o.value.length > 0 ? await G(o.value) : n.value ? await U(n.value) : o.value.length > 0 && await G(o.value, !0), n.value && g(n.value, (f, y) => {
|
|
1476
|
+
if (y && y.length) {
|
|
1477
|
+
const x = y.find(
|
|
1478
|
+
(m) => m.value === n.value || m.info.name === n.value
|
|
1481
1479
|
);
|
|
1482
1480
|
x ? v.value = x.info : v.value = {
|
|
1483
1481
|
district: "",
|
|
@@ -1490,47 +1488,43 @@ const ct = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1490
1488
|
lng: parseFloat(o.value[0]),
|
|
1491
1489
|
lat: parseFloat(o.value[1])
|
|
1492
1490
|
};
|
|
1493
|
-
a.value = new
|
|
1491
|
+
a.value = new L({
|
|
1494
1492
|
map: t.value,
|
|
1495
1493
|
position: f,
|
|
1496
1494
|
title: n.value
|
|
1497
1495
|
// 鼠标移上去时显示的内容
|
|
1498
|
-
}), o.value.length && ((
|
|
1496
|
+
}), o.value.length && ((d = t.value) == null || d.setCenter(f));
|
|
1499
1497
|
}
|
|
1500
|
-
},
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
name: n.value
|
|
1513
|
-
}), x(z[0])) : (N.error(k("thirdPartyMapErrorRetry")), y());
|
|
1514
|
-
});
|
|
1498
|
+
}, G = (d, f = !1) => (d.join(","), new Promise((y, x) => {
|
|
1499
|
+
new google.maps.Geocoder().geocode({
|
|
1500
|
+
location: {
|
|
1501
|
+
lng: parseFloat(d[0]),
|
|
1502
|
+
lat: parseFloat(d[1])
|
|
1503
|
+
}
|
|
1504
|
+
}, (O, N) => {
|
|
1505
|
+
N === "OK" && (O != null && O.length) ? (f && (n.value = O[0].formatted_address ?? "", v.value = {
|
|
1506
|
+
district: "",
|
|
1507
|
+
address: "",
|
|
1508
|
+
name: n.value
|
|
1509
|
+
}), y(O[0])) : (D.error(P("thirdPartyMapErrorRetry")), x());
|
|
1515
1510
|
});
|
|
1516
|
-
}, U = (
|
|
1511
|
+
})), U = (d) => new Promise((f, y) => {
|
|
1517
1512
|
new google.maps.Geocoder().geocode({
|
|
1518
1513
|
address: n.value
|
|
1519
|
-
}, (
|
|
1520
|
-
|
|
1514
|
+
}, (m, O) => {
|
|
1515
|
+
O === "OK" && (m != null && m.length) ? (o.value[0] = m[0].geometry.location.lng(), o.value[1] = m[0].geometry.location.lat(), f({ lng: o.value[0], lat: o.value[1] })) : (D.error(P("thirdPartyMapErrorRetry")), y());
|
|
1521
1516
|
});
|
|
1522
|
-
}),
|
|
1523
|
-
var
|
|
1524
|
-
|
|
1517
|
+
}), T = async () => {
|
|
1518
|
+
var d;
|
|
1519
|
+
r.value = !0, navigator.geolocation && ((d = navigator.geolocation) == null || d.getCurrentPosition((f) => {
|
|
1525
1520
|
var x;
|
|
1526
|
-
|
|
1527
|
-
const m = {
|
|
1521
|
+
const y = {
|
|
1528
1522
|
lat: f.coords.latitude,
|
|
1529
1523
|
lng: f.coords.longitude
|
|
1530
1524
|
};
|
|
1531
|
-
(x = t.value) == null || x.panTo(
|
|
1525
|
+
(x = t.value) == null || x.panTo(y), c.value = !1, r.value = !1;
|
|
1532
1526
|
}, (f) => {
|
|
1533
|
-
|
|
1527
|
+
D.error(P("获取定位失败")), r.value = !1;
|
|
1534
1528
|
}, {
|
|
1535
1529
|
// enableHighAccuracy: true,
|
|
1536
1530
|
// timeout: 5000,
|
|
@@ -1539,177 +1533,177 @@ const ct = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1539
1533
|
enableHighAccuracy: !0,
|
|
1540
1534
|
timeout: 1e4
|
|
1541
1535
|
}));
|
|
1542
|
-
}, g = async (
|
|
1543
|
-
if (u.value.activated = !0, !
|
|
1536
|
+
}, g = async (d, f) => {
|
|
1537
|
+
if (u.value.activated = !0, !d) {
|
|
1544
1538
|
l.value = [], f([]);
|
|
1545
1539
|
return;
|
|
1546
1540
|
}
|
|
1547
|
-
let
|
|
1548
|
-
input:
|
|
1541
|
+
let y = {
|
|
1542
|
+
input: d,
|
|
1549
1543
|
origin: { lng: parseFloat(o.value[0]), lat: parseFloat(o.value[1]) },
|
|
1550
1544
|
sessionToken: M.value
|
|
1551
1545
|
};
|
|
1552
|
-
const { suggestions: x } = await
|
|
1546
|
+
const { suggestions: x } = await k.value.fetchAutocompleteSuggestions(y);
|
|
1553
1547
|
if (l.value = [], !x) return f([]);
|
|
1554
|
-
let
|
|
1548
|
+
let m = [];
|
|
1555
1549
|
await Promise.all(
|
|
1556
|
-
x.map((
|
|
1550
|
+
x.map((O) => (async () => {
|
|
1557
1551
|
var J, le;
|
|
1558
|
-
let
|
|
1559
|
-
await
|
|
1552
|
+
let z = (O == null ? void 0 : O.placePrediction).toPlace();
|
|
1553
|
+
await z.fetchFields({
|
|
1560
1554
|
fields: [
|
|
1561
1555
|
"displayName",
|
|
1562
1556
|
"formattedAddress",
|
|
1563
1557
|
"location"
|
|
1564
1558
|
]
|
|
1565
1559
|
});
|
|
1566
|
-
const ne = (J =
|
|
1560
|
+
const ne = (J = z == null ? void 0 : z.location) == null ? void 0 : J.lng(), V = (le = z == null ? void 0 : z.location) == null ? void 0 : le.lat(), K = {
|
|
1567
1561
|
// value: placePrediction?.text?.toString() || '',
|
|
1568
|
-
value:
|
|
1562
|
+
value: z == null ? void 0 : z.formattedAddress,
|
|
1569
1563
|
point: { lng: ne, lat: V },
|
|
1570
1564
|
info: {
|
|
1571
|
-
name:
|
|
1565
|
+
name: z == null ? void 0 : z.displayName
|
|
1572
1566
|
}
|
|
1573
1567
|
};
|
|
1574
|
-
|
|
1568
|
+
m.push(K);
|
|
1575
1569
|
})())
|
|
1576
|
-
), l.value =
|
|
1570
|
+
), l.value = m.length > 5 ? m.slice(0, 5) : m, f(l.value, m);
|
|
1577
1571
|
};
|
|
1578
1572
|
return {
|
|
1579
1573
|
getLocationByInputSearch: g,
|
|
1580
|
-
handleSelectAddress: (
|
|
1581
|
-
n.value =
|
|
1582
|
-
var
|
|
1583
|
-
o.value = [f.lng, f.lat], a.value && a.value.setMap(null), a.value = new
|
|
1574
|
+
handleSelectAddress: (d) => {
|
|
1575
|
+
n.value = d.value, v.value = d.info, U(d.value).then((f) => {
|
|
1576
|
+
var y;
|
|
1577
|
+
o.value = [f.lng, f.lat], a.value && a.value.setMap(null), a.value = new L({
|
|
1584
1578
|
map: t.value,
|
|
1585
1579
|
position: f,
|
|
1586
1580
|
title: n.value
|
|
1587
1581
|
// 鼠标移上去时显示的内容
|
|
1588
|
-
}), (
|
|
1582
|
+
}), (y = t.value) == null || y.panTo(f), c.value = !1;
|
|
1589
1583
|
});
|
|
1590
1584
|
},
|
|
1591
1585
|
getLocationParse: async () => {
|
|
1592
|
-
var
|
|
1586
|
+
var d, f;
|
|
1593
1587
|
if (l.value.length) {
|
|
1594
|
-
if (
|
|
1595
|
-
return
|
|
1596
|
-
o.value = [l.value[0].point.lng, l.value[0].point.lat], v.value = l.value[0].info, a.value = new
|
|
1588
|
+
if (n.value = l.value[0].value, !((d = l.value[0]) != null && d.point))
|
|
1589
|
+
return D.error(P("thirdPartyMapErrorRetry"));
|
|
1590
|
+
o.value = [l.value[0].point.lng, l.value[0].point.lat], v.value = l.value[0].info, a.value = new L({
|
|
1597
1591
|
map: t.value,
|
|
1598
1592
|
position: l.value[0].point,
|
|
1599
1593
|
title: n.value
|
|
1600
1594
|
// 鼠标移上去时显示的内容
|
|
1601
|
-
}), (f = t.value) == null || f.panTo(l.value[0].point),
|
|
1595
|
+
}), (f = t.value) == null || f.panTo(l.value[0].point), c.value = !1, u.value.activated = !1;
|
|
1602
1596
|
}
|
|
1603
1597
|
},
|
|
1604
1598
|
getMapInfo: () => ({
|
|
1605
1599
|
longitude: o.value[0],
|
|
1606
1600
|
latitude: o.value[1],
|
|
1607
|
-
adCode:
|
|
1601
|
+
adCode: s.value,
|
|
1608
1602
|
address: n.value,
|
|
1609
1603
|
addressInfo: v.value
|
|
1610
1604
|
}),
|
|
1611
1605
|
loadJavascript: A,
|
|
1612
|
-
positionCityLocal:
|
|
1613
|
-
showGetLocationBtn:
|
|
1606
|
+
positionCityLocal: T,
|
|
1607
|
+
showGetLocationBtn: c
|
|
1614
1608
|
};
|
|
1615
1609
|
}, Al = (e, t) => {
|
|
1616
|
-
const a = S("gaode"), r = S(), u = S(), l = H(null), n = H(null), o = H(null),
|
|
1610
|
+
const a = S("gaode"), r = S(), u = S(), l = H(null), n = H(null), o = H(null), s = S(!0), v = S(null), b = S([]), C = Se(() => ({
|
|
1617
1611
|
width: e.width ? Q(e.width) : "100%",
|
|
1618
1612
|
height: e.height ? Q(e.height) : "100%"
|
|
1619
|
-
})), M = S(""),
|
|
1620
|
-
loadJavascript:
|
|
1613
|
+
})), M = S(""), k = S([]), L = S(""), c = S(), {
|
|
1614
|
+
loadJavascript: i,
|
|
1621
1615
|
getLocationByInputSearch: h,
|
|
1622
1616
|
handleSelectAddress: A,
|
|
1623
|
-
getLocationParse:
|
|
1617
|
+
getLocationParse: R
|
|
1624
1618
|
} = ft({
|
|
1625
1619
|
BMap: l,
|
|
1626
1620
|
map: n,
|
|
1627
1621
|
marker: o,
|
|
1628
|
-
mapLoading:
|
|
1622
|
+
mapLoading: s,
|
|
1629
1623
|
$autocomplete: v,
|
|
1630
1624
|
searchResultList: b,
|
|
1631
1625
|
innerInput: M,
|
|
1632
|
-
innerPoint:
|
|
1633
|
-
adCode:
|
|
1634
|
-
addressInfo:
|
|
1626
|
+
innerPoint: k,
|
|
1627
|
+
adCode: L,
|
|
1628
|
+
addressInfo: c
|
|
1635
1629
|
}), {
|
|
1636
1630
|
loadJavascript: _,
|
|
1637
|
-
getLocationByInputSearch:
|
|
1638
|
-
handleSelectAddress:
|
|
1631
|
+
getLocationByInputSearch: $,
|
|
1632
|
+
handleSelectAddress: G,
|
|
1639
1633
|
getLocationParse: U
|
|
1640
1634
|
} = st({
|
|
1641
1635
|
MapGL: l,
|
|
1642
1636
|
map: n,
|
|
1643
1637
|
marker: o,
|
|
1644
|
-
mapLoading:
|
|
1638
|
+
mapLoading: s,
|
|
1645
1639
|
$autocomplete: v,
|
|
1646
1640
|
searchResultList: b,
|
|
1647
1641
|
innerInput: M,
|
|
1648
|
-
innerPoint:
|
|
1649
|
-
adCode:
|
|
1650
|
-
addressInfo:
|
|
1642
|
+
innerPoint: k,
|
|
1643
|
+
adCode: L,
|
|
1644
|
+
addressInfo: c
|
|
1651
1645
|
}), {
|
|
1652
|
-
loadJavascript:
|
|
1646
|
+
loadJavascript: T,
|
|
1653
1647
|
getLocationByInputSearch: g,
|
|
1654
1648
|
handleSelectAddress: p,
|
|
1655
1649
|
getLocationParse: w,
|
|
1656
|
-
positionCityLocal:
|
|
1657
|
-
showGetLocationBtn:
|
|
1650
|
+
positionCityLocal: j,
|
|
1651
|
+
showGetLocationBtn: d
|
|
1658
1652
|
} = Cl({
|
|
1659
1653
|
MapGL: l,
|
|
1660
1654
|
map: n,
|
|
1661
1655
|
marker: o,
|
|
1662
|
-
mapLoading:
|
|
1656
|
+
mapLoading: s,
|
|
1663
1657
|
$autocomplete: v,
|
|
1664
1658
|
searchResultList: b,
|
|
1665
1659
|
innerInput: M,
|
|
1666
|
-
innerPoint:
|
|
1667
|
-
adCode:
|
|
1668
|
-
addressInfo:
|
|
1669
|
-
}), { mapElement: f, addPlugins:
|
|
1660
|
+
innerPoint: k,
|
|
1661
|
+
adCode: L,
|
|
1662
|
+
addressInfo: c
|
|
1663
|
+
}), { mapElement: f, addPlugins: y } = xl(e, t, {
|
|
1670
1664
|
type: a,
|
|
1671
1665
|
MapGL: l,
|
|
1672
1666
|
map: n,
|
|
1673
|
-
innerPoint:
|
|
1667
|
+
innerPoint: k,
|
|
1674
1668
|
innerInput: M,
|
|
1675
|
-
adCode:
|
|
1676
|
-
addressInfo:
|
|
1669
|
+
adCode: L,
|
|
1670
|
+
addressInfo: c
|
|
1677
1671
|
}), x = () => {
|
|
1678
|
-
a.value === "baidu" &&
|
|
1672
|
+
a.value === "baidu" && i(r.value, { clickStream: !e.clickStream, mapOpt: e.mapOpt }, O), a.value === "gaode" && _(
|
|
1679
1673
|
r.value,
|
|
1680
1674
|
u.value,
|
|
1681
1675
|
{ clickStream: !e.clickStream, mapOpt: e.mapOpt },
|
|
1682
|
-
|
|
1683
|
-
), a.value === "google" &&
|
|
1676
|
+
O
|
|
1677
|
+
), a.value === "google" && T(
|
|
1684
1678
|
r.value,
|
|
1685
1679
|
u.value,
|
|
1686
1680
|
{ clickStream: !e.clickStream, mapOpt: e.mapOpt },
|
|
1687
|
-
|
|
1681
|
+
O
|
|
1688
1682
|
);
|
|
1689
|
-
},
|
|
1690
|
-
const [K, J] = await
|
|
1683
|
+
}, m = async (V) => {
|
|
1684
|
+
const [K, J] = await Ge(V);
|
|
1691
1685
|
if (K) {
|
|
1692
|
-
|
|
1686
|
+
s.value = !1;
|
|
1693
1687
|
return;
|
|
1694
1688
|
}
|
|
1695
1689
|
if (!K && !J) {
|
|
1696
|
-
t("no-config-map",
|
|
1690
|
+
t("no-config-map", P("暂未配置地图")), s.value = !1;
|
|
1697
1691
|
return;
|
|
1698
1692
|
}
|
|
1699
1693
|
return J;
|
|
1700
1694
|
};
|
|
1701
1695
|
Oe(async () => {
|
|
1702
1696
|
var V, K, J, le, Ve;
|
|
1703
|
-
if (e.defaultLongitude && e.defaultLatitude && (
|
|
1697
|
+
if (e.defaultLongitude && e.defaultLatitude && (k.value = [e.defaultLongitude, e.defaultLatitude]), M.value = e.defaultAddress ?? "", e != null && e.sdkConfig && ((V = e == null ? void 0 : e.sdkConfig) != null && V.akValue))
|
|
1704
1698
|
a.value = ((K = e.sdkConfig) == null ? void 0 : K.mapType) ?? "gaode", r.value = (J = e.sdkConfig) == null ? void 0 : J.akValue, u.value = (le = e.sdkConfig) == null ? void 0 : le.secretKey;
|
|
1705
1699
|
else {
|
|
1706
|
-
const F = await
|
|
1700
|
+
const F = await m((Ve = e == null ? void 0 : e.sdkConfig) == null ? void 0 : Ve.mapType);
|
|
1707
1701
|
F && (a.value = (F == null ? void 0 : F.mapType) ?? "gaode", r.value = F == null ? void 0 : F.akVal, u.value = F == null ? void 0 : F.secretK);
|
|
1708
1702
|
}
|
|
1709
1703
|
x();
|
|
1710
1704
|
});
|
|
1711
|
-
const
|
|
1712
|
-
f.value = n.value,
|
|
1705
|
+
const O = () => {
|
|
1706
|
+
f.value = n.value, y(), a.value === "baidu" && n.value.addEventListener("tilesloaded", () => {
|
|
1713
1707
|
t("update:mapElement", f.value);
|
|
1714
1708
|
}), a.value === "gaode" && n.value.on("complete", () => {
|
|
1715
1709
|
t("update:mapElement", f.value);
|
|
@@ -1719,18 +1713,18 @@ const ct = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1719
1713
|
mapStyle: C,
|
|
1720
1714
|
innerInput: M,
|
|
1721
1715
|
getLocationByInputSearch: (V, K) => {
|
|
1722
|
-
a.value === "baidu" && h(V, K), a.value === "gaode" &&
|
|
1716
|
+
a.value === "baidu" && h(V, K), a.value === "gaode" && $(V, K), a.value === "google" && g(V, K);
|
|
1723
1717
|
},
|
|
1724
1718
|
handleSelectAddress: (V) => {
|
|
1725
|
-
a.value === "baidu" && A(V), a.value === "gaode" &&
|
|
1719
|
+
a.value === "baidu" && A(V), a.value === "gaode" && G(V), a.value === "google" && p(V);
|
|
1726
1720
|
},
|
|
1727
1721
|
getLocationParse: () => {
|
|
1728
|
-
a.value === "baidu" &&
|
|
1722
|
+
a.value === "baidu" && R(), a.value === "gaode" && U(), a.value === "google" && w();
|
|
1729
1723
|
},
|
|
1730
|
-
mapLoading:
|
|
1724
|
+
mapLoading: s,
|
|
1731
1725
|
$autocomplete: v,
|
|
1732
|
-
googlePositionCityLocal:
|
|
1733
|
-
showGetLocationBtn:
|
|
1726
|
+
googlePositionCityLocal: j,
|
|
1727
|
+
showGetLocationBtn: d
|
|
1734
1728
|
};
|
|
1735
1729
|
}, Sl = { class: "search-input" }, Ol = { class: "location-icon1" }, Tl = { id: "map" }, $l = /* @__PURE__ */ Ae({
|
|
1736
1730
|
__name: "mixMap",
|
|
@@ -1754,55 +1748,55 @@ const ct = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1754
1748
|
innerInput: l,
|
|
1755
1749
|
getLocationByInputSearch: n,
|
|
1756
1750
|
handleSelectAddress: o,
|
|
1757
|
-
getLocationParse:
|
|
1751
|
+
getLocationParse: s,
|
|
1758
1752
|
mapLoading: v,
|
|
1759
1753
|
$autocomplete: b,
|
|
1760
1754
|
googlePositionCityLocal: C,
|
|
1761
1755
|
showGetLocationBtn: M
|
|
1762
1756
|
} = Al(a, r);
|
|
1763
|
-
return (
|
|
1764
|
-
const
|
|
1757
|
+
return (k, L) => {
|
|
1758
|
+
const c = Pe, i = ke;
|
|
1765
1759
|
return Te(), $e("div", {
|
|
1766
1760
|
class: "das-map",
|
|
1767
|
-
style: je(
|
|
1761
|
+
style: je(B(u))
|
|
1768
1762
|
}, [
|
|
1769
1763
|
Z(W("div", Sl, [
|
|
1770
|
-
Z(de(
|
|
1764
|
+
Z(de(c, {
|
|
1771
1765
|
ref_key: "$autocomplete",
|
|
1772
1766
|
ref: b,
|
|
1773
|
-
modelValue:
|
|
1774
|
-
"onUpdate:modelValue":
|
|
1775
|
-
"fetch-suggestions":
|
|
1776
|
-
placeholder:
|
|
1767
|
+
modelValue: B(l),
|
|
1768
|
+
"onUpdate:modelValue": L[0] || (L[0] = (h) => ta(l) ? l.value = h : null),
|
|
1769
|
+
"fetch-suggestions": B(n),
|
|
1770
|
+
placeholder: B(P)("请输入位置"),
|
|
1777
1771
|
style: { width: "100%" },
|
|
1778
1772
|
"trigger-on-focus": !1,
|
|
1779
|
-
onSelect:
|
|
1780
|
-
onKeyup:
|
|
1773
|
+
onSelect: B(o),
|
|
1774
|
+
onKeyup: Le(B(s), ["enter", "native"]),
|
|
1781
1775
|
clearable: ""
|
|
1782
1776
|
}, null, 8, ["modelValue", "fetch-suggestions", "placeholder", "onSelect", "onKeyup"]), [
|
|
1783
|
-
[
|
|
1777
|
+
[B(Re)]
|
|
1784
1778
|
])
|
|
1785
1779
|
], 512), [
|
|
1786
1780
|
[Ke, a.showSearch]
|
|
1787
1781
|
]),
|
|
1788
1782
|
Z(W("div", Ol, [
|
|
1789
|
-
de(
|
|
1783
|
+
de(B(la), {
|
|
1790
1784
|
block: "",
|
|
1791
1785
|
size: "large",
|
|
1792
|
-
onClick:
|
|
1786
|
+
onClick: B(C)
|
|
1793
1787
|
}, {
|
|
1794
1788
|
default: aa(() => [
|
|
1795
|
-
oa(ra(
|
|
1789
|
+
oa(ra(B(P)("Please-Click-Get-Location")), 1)
|
|
1796
1790
|
]),
|
|
1797
1791
|
_: 1
|
|
1798
1792
|
}, 8, ["onClick"])
|
|
1799
1793
|
], 512), [
|
|
1800
|
-
[Ke,
|
|
1794
|
+
[Ke, B(M)]
|
|
1801
1795
|
]),
|
|
1802
1796
|
Z(W("div", Tl, null, 512), [
|
|
1803
1797
|
[
|
|
1804
|
-
|
|
1805
|
-
|
|
1798
|
+
i,
|
|
1799
|
+
B(v),
|
|
1806
1800
|
void 0,
|
|
1807
1801
|
{ lock: !0 }
|
|
1808
1802
|
]
|
|
@@ -1810,7 +1804,7 @@ const ct = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1810
1804
|
], 4);
|
|
1811
1805
|
};
|
|
1812
1806
|
}
|
|
1813
|
-
}), jl = /* @__PURE__ */
|
|
1807
|
+
}), jl = /* @__PURE__ */ ze($l, [["__scopeId", "data-v-398b4cef"]]), Ll = {
|
|
1814
1808
|
请输入位置: { "zh-CN": "请输入位置", en: "Please enter location", "zh-MO": "請輸入位置", _appCode: "framework" },
|
|
1815
1809
|
获取地图配置信息失败: {
|
|
1816
1810
|
"zh-CN": "获取地图配置信息失败",
|
|
@@ -1838,8 +1832,8 @@ const ct = /* @__PURE__ */ Object.assign({ "./add-custom-dom/index.ts": Yr, "./g
|
|
|
1838
1832
|
_appCode: "framework"
|
|
1839
1833
|
}
|
|
1840
1834
|
};
|
|
1841
|
-
na(
|
|
1842
|
-
const Kl =
|
|
1835
|
+
na(Ll);
|
|
1836
|
+
const Kl = Ee(ga), Fl = () => S(null), Hl = Ee(ma), Il = () => S(null), Jl = Ee(jl), Zl = () => S(null), Wl = { title: "Map 地图" };
|
|
1843
1837
|
export {
|
|
1844
1838
|
Hl as DasBaiduMap,
|
|
1845
1839
|
Il as DasBaiduMapRef,
|