xy-map 1.1.51 → 1.1.53
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/package.json +1 -1
- package/xy-map.common.js +25 -19
- package/xy-map.umd.js +25 -19
- package/xy-map.umd.min.js +1 -1
package/package.json
CHANGED
package/xy-map.common.js
CHANGED
|
@@ -120725,7 +120725,7 @@ const addMouseMarker = () => {
|
|
|
120725
120725
|
* 移除定位点
|
|
120726
120726
|
*/
|
|
120727
120727
|
const removeMarker = () => {
|
|
120728
|
-
mouseMarker
|
|
120728
|
+
mouseMarker && mouseMarker.remove();
|
|
120729
120729
|
mouseMarker = null;
|
|
120730
120730
|
};
|
|
120731
120731
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/jsonFile.vue?vue&type=template&id=5a5f8c5d&scoped=true&
|
|
@@ -121358,8 +121358,8 @@ var draw_component = normalizeComponent(
|
|
|
121358
121358
|
)
|
|
121359
121359
|
|
|
121360
121360
|
/* harmony default export */ var package_draw = (draw_component.exports);
|
|
121361
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/point.vue?vue&type=template&id=
|
|
121362
|
-
var
|
|
121361
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/point.vue?vue&type=template&id=289ceaca&
|
|
121362
|
+
var pointvue_type_template_id_289ceaca_render = function render() {
|
|
121363
121363
|
var _vm = this,
|
|
121364
121364
|
_c = _vm._self._c;
|
|
121365
121365
|
return _c('div', {
|
|
@@ -121378,7 +121378,7 @@ var pointvue_type_template_id_2fa30aa6_render = function render() {
|
|
|
121378
121378
|
"list": ['point'],
|
|
121379
121379
|
"showMoveInput": false,
|
|
121380
121380
|
"showDeleteBtn": false,
|
|
121381
|
-
"
|
|
121381
|
+
"isAdsorb": _vm.isAdsorb
|
|
121382
121382
|
},
|
|
121383
121383
|
on: {
|
|
121384
121384
|
"update": _vm.drawUpdate,
|
|
@@ -121414,7 +121414,7 @@ var pointvue_type_template_id_2fa30aa6_render = function render() {
|
|
|
121414
121414
|
staticClass: "margin-top font-12"
|
|
121415
121415
|
}, [_vm._v(" 地址:" + _vm._s(_vm.address.formattedAddress) + " ")]) : _vm._e()])])], 1);
|
|
121416
121416
|
};
|
|
121417
|
-
var
|
|
121417
|
+
var pointvue_type_template_id_289ceaca_staticRenderFns = [];
|
|
121418
121418
|
|
|
121419
121419
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/point.vue?vue&type=script&lang=js&
|
|
121420
121420
|
|
|
@@ -121455,7 +121455,8 @@ var pointvue_type_template_id_2fa30aa6_staticRenderFns = [];
|
|
|
121455
121455
|
return {
|
|
121456
121456
|
geoJson: '',
|
|
121457
121457
|
position: '',
|
|
121458
|
-
address: ''
|
|
121458
|
+
address: '',
|
|
121459
|
+
lastPosition: ''
|
|
121459
121460
|
};
|
|
121460
121461
|
},
|
|
121461
121462
|
watch: {
|
|
@@ -121522,9 +121523,11 @@ var pointvue_type_template_id_2fa30aa6_staticRenderFns = [];
|
|
|
121522
121523
|
this.address = data;
|
|
121523
121524
|
});
|
|
121524
121525
|
});
|
|
121526
|
+
this.lastPosition = data.lastPosition;
|
|
121525
121527
|
} else {
|
|
121526
121528
|
this.position = '';
|
|
121527
121529
|
this.address = '';
|
|
121530
|
+
this.lastPosition = '';
|
|
121528
121531
|
}
|
|
121529
121532
|
},
|
|
121530
121533
|
save() {
|
|
@@ -121533,7 +121536,8 @@ var pointvue_type_template_id_2fa30aa6_staticRenderFns = [];
|
|
|
121533
121536
|
position: this.position,
|
|
121534
121537
|
lng: this.position[0],
|
|
121535
121538
|
lat: this.position[1],
|
|
121536
|
-
address: this.address
|
|
121539
|
+
address: this.address,
|
|
121540
|
+
lastPosition: this.lastPosition //吸附后的信息
|
|
121537
121541
|
};
|
|
121538
121542
|
// console.log(data)
|
|
121539
121543
|
this.$emit('save', data);
|
|
@@ -121557,8 +121561,8 @@ var pointvue_type_template_id_2fa30aa6_staticRenderFns = [];
|
|
|
121557
121561
|
;
|
|
121558
121562
|
var point_component = normalizeComponent(
|
|
121559
121563
|
draw_pointvue_type_script_lang_js_,
|
|
121560
|
-
|
|
121561
|
-
|
|
121564
|
+
pointvue_type_template_id_289ceaca_render,
|
|
121565
|
+
pointvue_type_template_id_289ceaca_staticRenderFns,
|
|
121562
121566
|
false,
|
|
121563
121567
|
null,
|
|
121564
121568
|
null,
|
|
@@ -121567,8 +121571,8 @@ var point_component = normalizeComponent(
|
|
|
121567
121571
|
)
|
|
121568
121572
|
|
|
121569
121573
|
/* harmony default export */ var point = (point_component.exports);
|
|
121570
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/line.vue?vue&type=template&id=
|
|
121571
|
-
var
|
|
121574
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/line.vue?vue&type=template&id=9381e4bc&
|
|
121575
|
+
var linevue_type_template_id_9381e4bc_render = function render() {
|
|
121572
121576
|
var _vm = this,
|
|
121573
121577
|
_c = _vm._self._c;
|
|
121574
121578
|
return _c('div', {
|
|
@@ -121623,7 +121627,7 @@ var linevue_type_template_id_3a6a9292_render = function render() {
|
|
|
121623
121627
|
}
|
|
121624
121628
|
}, [_vm._v("保存")]), _vm._t("default")], 2)])], 1);
|
|
121625
121629
|
};
|
|
121626
|
-
var
|
|
121630
|
+
var linevue_type_template_id_9381e4bc_staticRenderFns = [];
|
|
121627
121631
|
|
|
121628
121632
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/line.vue?vue&type=script&lang=js&
|
|
121629
121633
|
|
|
@@ -121689,6 +121693,7 @@ var linevue_type_template_id_3a6a9292_staticRenderFns = [];
|
|
|
121689
121693
|
package_map.initMap(config).then(map => {
|
|
121690
121694
|
this.$refs.draw.initDraw(map);
|
|
121691
121695
|
this.draw();
|
|
121696
|
+
this.$emit('map-load');
|
|
121692
121697
|
});
|
|
121693
121698
|
},
|
|
121694
121699
|
draw() {
|
|
@@ -121769,8 +121774,8 @@ var linevue_type_template_id_3a6a9292_staticRenderFns = [];
|
|
|
121769
121774
|
;
|
|
121770
121775
|
var line_component = normalizeComponent(
|
|
121771
121776
|
draw_linevue_type_script_lang_js_,
|
|
121772
|
-
|
|
121773
|
-
|
|
121777
|
+
linevue_type_template_id_9381e4bc_render,
|
|
121778
|
+
linevue_type_template_id_9381e4bc_staticRenderFns,
|
|
121774
121779
|
false,
|
|
121775
121780
|
null,
|
|
121776
121781
|
null,
|
|
@@ -121779,8 +121784,8 @@ var line_component = normalizeComponent(
|
|
|
121779
121784
|
)
|
|
121780
121785
|
|
|
121781
121786
|
/* harmony default export */ var draw_line = (line_component.exports);
|
|
121782
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/polygon.vue?vue&type=template&id=
|
|
121783
|
-
var
|
|
121787
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/polygon.vue?vue&type=template&id=7fe5b58b&
|
|
121788
|
+
var polygonvue_type_template_id_7fe5b58b_render = function render() {
|
|
121784
121789
|
var _vm = this,
|
|
121785
121790
|
_c = _vm._self._c;
|
|
121786
121791
|
return _c('div', {
|
|
@@ -121835,7 +121840,7 @@ var polygonvue_type_template_id_75043640_render = function render() {
|
|
|
121835
121840
|
}
|
|
121836
121841
|
}, [_vm._v("保存")]), _vm._t("default")], 2)])], 1);
|
|
121837
121842
|
};
|
|
121838
|
-
var
|
|
121843
|
+
var polygonvue_type_template_id_7fe5b58b_staticRenderFns = [];
|
|
121839
121844
|
|
|
121840
121845
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/polygon.vue?vue&type=script&lang=js&
|
|
121841
121846
|
|
|
@@ -121901,6 +121906,7 @@ var polygonvue_type_template_id_75043640_staticRenderFns = [];
|
|
|
121901
121906
|
package_map.initMap(config).then(map => {
|
|
121902
121907
|
this.$refs.draw.initDraw(map);
|
|
121903
121908
|
this.draw();
|
|
121909
|
+
this.$emit('map-load');
|
|
121904
121910
|
});
|
|
121905
121911
|
},
|
|
121906
121912
|
draw() {
|
|
@@ -121980,8 +121986,8 @@ var polygonvue_type_template_id_75043640_staticRenderFns = [];
|
|
|
121980
121986
|
;
|
|
121981
121987
|
var polygon_component = normalizeComponent(
|
|
121982
121988
|
draw_polygonvue_type_script_lang_js_,
|
|
121983
|
-
|
|
121984
|
-
|
|
121989
|
+
polygonvue_type_template_id_7fe5b58b_render,
|
|
121990
|
+
polygonvue_type_template_id_7fe5b58b_staticRenderFns,
|
|
121985
121991
|
false,
|
|
121986
121992
|
null,
|
|
121987
121993
|
null,
|
package/xy-map.umd.js
CHANGED
|
@@ -120743,7 +120743,7 @@ const addMouseMarker = () => {
|
|
|
120743
120743
|
* 移除定位点
|
|
120744
120744
|
*/
|
|
120745
120745
|
const removeMarker = () => {
|
|
120746
|
-
mouseMarker
|
|
120746
|
+
mouseMarker && mouseMarker.remove();
|
|
120747
120747
|
mouseMarker = null;
|
|
120748
120748
|
};
|
|
120749
120749
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/jsonFile.vue?vue&type=template&id=5a5f8c5d&scoped=true&
|
|
@@ -121376,8 +121376,8 @@ var draw_component = normalizeComponent(
|
|
|
121376
121376
|
)
|
|
121377
121377
|
|
|
121378
121378
|
/* harmony default export */ var package_draw = (draw_component.exports);
|
|
121379
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/point.vue?vue&type=template&id=
|
|
121380
|
-
var
|
|
121379
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/point.vue?vue&type=template&id=289ceaca&
|
|
121380
|
+
var pointvue_type_template_id_289ceaca_render = function render() {
|
|
121381
121381
|
var _vm = this,
|
|
121382
121382
|
_c = _vm._self._c;
|
|
121383
121383
|
return _c('div', {
|
|
@@ -121396,7 +121396,7 @@ var pointvue_type_template_id_2fa30aa6_render = function render() {
|
|
|
121396
121396
|
"list": ['point'],
|
|
121397
121397
|
"showMoveInput": false,
|
|
121398
121398
|
"showDeleteBtn": false,
|
|
121399
|
-
"
|
|
121399
|
+
"isAdsorb": _vm.isAdsorb
|
|
121400
121400
|
},
|
|
121401
121401
|
on: {
|
|
121402
121402
|
"update": _vm.drawUpdate,
|
|
@@ -121432,7 +121432,7 @@ var pointvue_type_template_id_2fa30aa6_render = function render() {
|
|
|
121432
121432
|
staticClass: "margin-top font-12"
|
|
121433
121433
|
}, [_vm._v(" 地址:" + _vm._s(_vm.address.formattedAddress) + " ")]) : _vm._e()])])], 1);
|
|
121434
121434
|
};
|
|
121435
|
-
var
|
|
121435
|
+
var pointvue_type_template_id_289ceaca_staticRenderFns = [];
|
|
121436
121436
|
|
|
121437
121437
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/point.vue?vue&type=script&lang=js&
|
|
121438
121438
|
|
|
@@ -121473,7 +121473,8 @@ var pointvue_type_template_id_2fa30aa6_staticRenderFns = [];
|
|
|
121473
121473
|
return {
|
|
121474
121474
|
geoJson: '',
|
|
121475
121475
|
position: '',
|
|
121476
|
-
address: ''
|
|
121476
|
+
address: '',
|
|
121477
|
+
lastPosition: ''
|
|
121477
121478
|
};
|
|
121478
121479
|
},
|
|
121479
121480
|
watch: {
|
|
@@ -121540,9 +121541,11 @@ var pointvue_type_template_id_2fa30aa6_staticRenderFns = [];
|
|
|
121540
121541
|
this.address = data;
|
|
121541
121542
|
});
|
|
121542
121543
|
});
|
|
121544
|
+
this.lastPosition = data.lastPosition;
|
|
121543
121545
|
} else {
|
|
121544
121546
|
this.position = '';
|
|
121545
121547
|
this.address = '';
|
|
121548
|
+
this.lastPosition = '';
|
|
121546
121549
|
}
|
|
121547
121550
|
},
|
|
121548
121551
|
save() {
|
|
@@ -121551,7 +121554,8 @@ var pointvue_type_template_id_2fa30aa6_staticRenderFns = [];
|
|
|
121551
121554
|
position: this.position,
|
|
121552
121555
|
lng: this.position[0],
|
|
121553
121556
|
lat: this.position[1],
|
|
121554
|
-
address: this.address
|
|
121557
|
+
address: this.address,
|
|
121558
|
+
lastPosition: this.lastPosition //吸附后的信息
|
|
121555
121559
|
};
|
|
121556
121560
|
// console.log(data)
|
|
121557
121561
|
this.$emit('save', data);
|
|
@@ -121575,8 +121579,8 @@ var pointvue_type_template_id_2fa30aa6_staticRenderFns = [];
|
|
|
121575
121579
|
;
|
|
121576
121580
|
var point_component = normalizeComponent(
|
|
121577
121581
|
draw_pointvue_type_script_lang_js_,
|
|
121578
|
-
|
|
121579
|
-
|
|
121582
|
+
pointvue_type_template_id_289ceaca_render,
|
|
121583
|
+
pointvue_type_template_id_289ceaca_staticRenderFns,
|
|
121580
121584
|
false,
|
|
121581
121585
|
null,
|
|
121582
121586
|
null,
|
|
@@ -121585,8 +121589,8 @@ var point_component = normalizeComponent(
|
|
|
121585
121589
|
)
|
|
121586
121590
|
|
|
121587
121591
|
/* harmony default export */ var point = (point_component.exports);
|
|
121588
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/line.vue?vue&type=template&id=
|
|
121589
|
-
var
|
|
121592
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/line.vue?vue&type=template&id=9381e4bc&
|
|
121593
|
+
var linevue_type_template_id_9381e4bc_render = function render() {
|
|
121590
121594
|
var _vm = this,
|
|
121591
121595
|
_c = _vm._self._c;
|
|
121592
121596
|
return _c('div', {
|
|
@@ -121641,7 +121645,7 @@ var linevue_type_template_id_3a6a9292_render = function render() {
|
|
|
121641
121645
|
}
|
|
121642
121646
|
}, [_vm._v("保存")]), _vm._t("default")], 2)])], 1);
|
|
121643
121647
|
};
|
|
121644
|
-
var
|
|
121648
|
+
var linevue_type_template_id_9381e4bc_staticRenderFns = [];
|
|
121645
121649
|
|
|
121646
121650
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/line.vue?vue&type=script&lang=js&
|
|
121647
121651
|
|
|
@@ -121707,6 +121711,7 @@ var linevue_type_template_id_3a6a9292_staticRenderFns = [];
|
|
|
121707
121711
|
package_map.initMap(config).then(map => {
|
|
121708
121712
|
this.$refs.draw.initDraw(map);
|
|
121709
121713
|
this.draw();
|
|
121714
|
+
this.$emit('map-load');
|
|
121710
121715
|
});
|
|
121711
121716
|
},
|
|
121712
121717
|
draw() {
|
|
@@ -121787,8 +121792,8 @@ var linevue_type_template_id_3a6a9292_staticRenderFns = [];
|
|
|
121787
121792
|
;
|
|
121788
121793
|
var line_component = normalizeComponent(
|
|
121789
121794
|
draw_linevue_type_script_lang_js_,
|
|
121790
|
-
|
|
121791
|
-
|
|
121795
|
+
linevue_type_template_id_9381e4bc_render,
|
|
121796
|
+
linevue_type_template_id_9381e4bc_staticRenderFns,
|
|
121792
121797
|
false,
|
|
121793
121798
|
null,
|
|
121794
121799
|
null,
|
|
@@ -121797,8 +121802,8 @@ var line_component = normalizeComponent(
|
|
|
121797
121802
|
)
|
|
121798
121803
|
|
|
121799
121804
|
/* harmony default export */ var draw_line = (line_component.exports);
|
|
121800
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/polygon.vue?vue&type=template&id=
|
|
121801
|
-
var
|
|
121805
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/polygon.vue?vue&type=template&id=7fe5b58b&
|
|
121806
|
+
var polygonvue_type_template_id_7fe5b58b_render = function render() {
|
|
121802
121807
|
var _vm = this,
|
|
121803
121808
|
_c = _vm._self._c;
|
|
121804
121809
|
return _c('div', {
|
|
@@ -121853,7 +121858,7 @@ var polygonvue_type_template_id_75043640_render = function render() {
|
|
|
121853
121858
|
}
|
|
121854
121859
|
}, [_vm._v("保存")]), _vm._t("default")], 2)])], 1);
|
|
121855
121860
|
};
|
|
121856
|
-
var
|
|
121861
|
+
var polygonvue_type_template_id_7fe5b58b_staticRenderFns = [];
|
|
121857
121862
|
|
|
121858
121863
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/polygon.vue?vue&type=script&lang=js&
|
|
121859
121864
|
|
|
@@ -121919,6 +121924,7 @@ var polygonvue_type_template_id_75043640_staticRenderFns = [];
|
|
|
121919
121924
|
package_map.initMap(config).then(map => {
|
|
121920
121925
|
this.$refs.draw.initDraw(map);
|
|
121921
121926
|
this.draw();
|
|
121927
|
+
this.$emit('map-load');
|
|
121922
121928
|
});
|
|
121923
121929
|
},
|
|
121924
121930
|
draw() {
|
|
@@ -121998,8 +122004,8 @@ var polygonvue_type_template_id_75043640_staticRenderFns = [];
|
|
|
121998
122004
|
;
|
|
121999
122005
|
var polygon_component = normalizeComponent(
|
|
122000
122006
|
draw_polygonvue_type_script_lang_js_,
|
|
122001
|
-
|
|
122002
|
-
|
|
122007
|
+
polygonvue_type_template_id_7fe5b58b_render,
|
|
122008
|
+
polygonvue_type_template_id_7fe5b58b_staticRenderFns,
|
|
122003
122009
|
false,
|
|
122004
122010
|
null,
|
|
122005
122011
|
null,
|
package/xy-map.umd.min.js
CHANGED
|
@@ -91,4 +91,4 @@ object-assign
|
|
|
91
91
|
*
|
|
92
92
|
* SPDX-License-Identifier: Apache-2.0
|
|
93
93
|
*/
|
|
94
|
-
var F8=null;try{F8=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(Wtt){}function R8(t,e,n){this.low=0|t,this.high=0|e,this.unsigned=!!n}function D8(t){return!0===(t&&t["__isLong__"])}function O8(t){var e=Math.clz32(t&-t);return t?31-e:e}R8.prototype.__isLong__,Object.defineProperty(R8.prototype,"__isLong__",{value:!0}),R8.isLong=D8;var U8={},N8={};function k8(t,e){var n,i,r;return e?(t>>>=0,(r=0<=t&&t<256)&&(i=N8[t],i)?i:(n=Q8(t,0,!0),r&&(N8[t]=n),n)):(t|=0,(r=-128<=t&&t<128)&&(i=U8[t],i)?i:(n=Q8(t,t<0?-1:0,!1),r&&(U8[t]=n),n))}function z8(t,e){if(isNaN(t))return e?Y8:J8;if(e){if(t<0)return Y8;if(t>=X8)return i9}else{if(t<=-K8)return r9;if(t+1>=K8)return n9}return t<0?z8(-t,e).neg():Q8(t%W8|0,t/W8|0,e)}function Q8(t,e,n){return new R8(t,e,n)}R8.fromInt=k8,R8.fromNumber=z8,R8.fromBits=Q8;var G8=Math.pow;function H8(t,e,n){if(0===t.length)throw Error("empty string");if("number"===typeof e?(n=e,e=!1):e=!!e,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e?Y8:J8;if(n=n||10,n<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return H8(t.substring(1),e,n).neg();for(var r=z8(G8(n,8)),o=J8,s=0;s<t.length;s+=8){var a=Math.min(8,t.length-s),l=parseInt(t.substring(s,s+a),n);if(a<8){var c=z8(G8(n,a));o=o.mul(c).add(z8(l))}else o=o.mul(r),o=o.add(z8(l))}return o.unsigned=e,o}function V8(t,e){return"number"===typeof t?z8(t,e):"string"===typeof t?H8(t,e):Q8(t.low,t.high,"boolean"===typeof e?e:t.unsigned)}R8.fromString=H8,R8.fromValue=V8;var j8=65536,Z8=1<<24,W8=j8*j8,X8=W8*W8,K8=X8/2,q8=k8(Z8),J8=k8(0);R8.ZERO=J8;var Y8=k8(0,!0);R8.UZERO=Y8;var $8=k8(1);R8.ONE=$8;var t9=k8(1,!0);R8.UONE=t9;var e9=k8(-1);R8.NEG_ONE=e9;var n9=Q8(-1,2147483647,!1);R8.MAX_VALUE=n9;var i9=Q8(-1,-1,!0);R8.MAX_UNSIGNED_VALUE=i9;var r9=Q8(0,-2147483648,!1);R8.MIN_VALUE=r9;var o9=R8.prototype;o9.toInt=function(){return this.unsigned?this.low>>>0:this.low},o9.toNumber=function(){return this.unsigned?(this.high>>>0)*W8+(this.low>>>0):this.high*W8+(this.low>>>0)},o9.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(r9)){var e=z8(t),n=this.div(e),i=n.mul(e).sub(this);return n.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}var r=z8(G8(t,6),this.unsigned),o=this,s="";while(1){var a=o.div(r),l=o.sub(a.mul(r)).toInt()>>>0,c=l.toString(t);if(o=a,o.isZero())return c+s;while(c.length<6)c="0"+c;s=""+c+s}},o9.getHighBits=function(){return this.high},o9.getHighBitsUnsigned=function(){return this.high>>>0},o9.getLowBits=function(){return this.low},o9.getLowBitsUnsigned=function(){return this.low>>>0},o9.getNumBitsAbs=function(){if(this.isNegative())return this.eq(r9)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0;e--)if(0!=(t&1<<e))break;return 0!=this.high?e+33:e+1},o9.isZero=function(){return 0===this.high&&0===this.low},o9.eqz=o9.isZero,o9.isNegative=function(){return!this.unsigned&&this.high<0},o9.isPositive=function(){return this.unsigned||this.high>=0},o9.isOdd=function(){return 1===(1&this.low)},o9.isEven=function(){return 0===(1&this.low)},o9.equals=function(t){return D8(t)||(t=V8(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&(this.high===t.high&&this.low===t.low)},o9.eq=o9.equals,o9.notEquals=function(t){return!this.eq(t)},o9.neq=o9.notEquals,o9.ne=o9.notEquals,o9.lessThan=function(t){return this.comp(t)<0},o9.lt=o9.lessThan,o9.lessThanOrEqual=function(t){return this.comp(t)<=0},o9.lte=o9.lessThanOrEqual,o9.le=o9.lessThanOrEqual,o9.greaterThan=function(t){return this.comp(t)>0},o9.gt=o9.greaterThan,o9.greaterThanOrEqual=function(t){return this.comp(t)>=0},o9.gte=o9.greaterThanOrEqual,o9.ge=o9.greaterThanOrEqual,o9.compare=function(t){if(D8(t)||(t=V8(t)),this.eq(t))return 0;var e=this.isNegative(),n=t.isNegative();return e&&!n?-1:!e&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},o9.comp=o9.compare,o9.negate=function(){return!this.unsigned&&this.eq(r9)?r9:this.not().add($8)},o9.neg=o9.negate,o9.add=function(t){D8(t)||(t=V8(t));var e=this.high>>>16,n=65535&this.high,i=this.low>>>16,r=65535&this.low,o=t.high>>>16,s=65535&t.high,a=t.low>>>16,l=65535&t.low,c=0,u=0,h=0,A=0;return A+=r+l,h+=A>>>16,A&=65535,h+=i+a,u+=h>>>16,h&=65535,u+=n+s,c+=u>>>16,u&=65535,c+=e+o,c&=65535,Q8(h<<16|A,c<<16|u,this.unsigned)},o9.subtract=function(t){return D8(t)||(t=V8(t)),this.add(t.neg())},o9.sub=o9.subtract,o9.multiply=function(t){if(this.isZero())return this;if(D8(t)||(t=V8(t)),F8){var e=F8["mul"](this.low,this.high,t.low,t.high);return Q8(e,F8["get_high"](),this.unsigned)}if(t.isZero())return this.unsigned?Y8:J8;if(this.eq(r9))return t.isOdd()?r9:J8;if(t.eq(r9))return this.isOdd()?r9:J8;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(q8)&&t.lt(q8))return z8(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,r=this.low>>>16,o=65535&this.low,s=t.high>>>16,a=65535&t.high,l=t.low>>>16,c=65535&t.low,u=0,h=0,A=0,d=0;return d+=o*c,A+=d>>>16,d&=65535,A+=r*c,h+=A>>>16,A&=65535,A+=o*l,h+=A>>>16,A&=65535,h+=i*c,u+=h>>>16,h&=65535,h+=r*l,u+=h>>>16,h&=65535,h+=o*a,u+=h>>>16,h&=65535,u+=n*c+i*l+r*a+o*s,u&=65535,Q8(A<<16|d,u<<16|h,this.unsigned)},o9.mul=o9.multiply,o9.divide=function(t){if(D8(t)||(t=V8(t)),t.isZero())throw Error("division by zero");if(F8){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var e=(this.unsigned?F8["div_u"]:F8["div_s"])(this.low,this.high,t.low,t.high);return Q8(e,F8["get_high"](),this.unsigned)}if(this.isZero())return this.unsigned?Y8:J8;var n,i,r;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Y8;if(t.gt(this.shru(1)))return t9;r=Y8}else{if(this.eq(r9)){if(t.eq($8)||t.eq(e9))return r9;if(t.eq(r9))return $8;var o=this.shr(1);return n=o.div(t).shl(1),n.eq(J8)?t.isNegative()?$8:e9:(i=this.sub(t.mul(n)),r=n.add(i.div(t)),r)}if(t.eq(r9))return this.unsigned?Y8:J8;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=J8}i=this;while(i.gte(t)){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));var s=Math.ceil(Math.log(n)/Math.LN2),a=s<=48?1:G8(2,s-48),l=z8(n),c=l.mul(t);while(c.isNegative()||c.gt(i))n-=a,l=z8(n,this.unsigned),c=l.mul(t);l.isZero()&&(l=$8),r=r.add(l),i=i.sub(c)}return r},o9.div=o9.divide,o9.modulo=function(t){if(D8(t)||(t=V8(t)),F8){var e=(this.unsigned?F8["rem_u"]:F8["rem_s"])(this.low,this.high,t.low,t.high);return Q8(e,F8["get_high"](),this.unsigned)}return this.sub(this.div(t).mul(t))},o9.mod=o9.modulo,o9.rem=o9.modulo,o9.not=function(){return Q8(~this.low,~this.high,this.unsigned)},o9.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},o9.clz=o9.countLeadingZeros,o9.countTrailingZeros=function(){return this.low?O8(this.low):O8(this.high)+32},o9.ctz=o9.countTrailingZeros,o9.and=function(t){return D8(t)||(t=V8(t)),Q8(this.low&t.low,this.high&t.high,this.unsigned)},o9.or=function(t){return D8(t)||(t=V8(t)),Q8(this.low|t.low,this.high|t.high,this.unsigned)},o9.xor=function(t){return D8(t)||(t=V8(t)),Q8(this.low^t.low,this.high^t.high,this.unsigned)},o9.shiftLeft=function(t){return D8(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?Q8(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Q8(0,this.low<<t-32,this.unsigned)},o9.shl=o9.shiftLeft,o9.shiftRight=function(t){return D8(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?Q8(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Q8(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},o9.shr=o9.shiftRight,o9.shiftRightUnsigned=function(t){return D8(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?Q8(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Q8(32===t?this.high:this.high>>>t-32,0,this.unsigned)},o9.shru=o9.shiftRightUnsigned,o9.shr_u=o9.shiftRightUnsigned,o9.rotateLeft=function(t){var e;return D8(t)&&(t=t.toInt()),0===(t&=63)?this:32===t?Q8(this.high,this.low,this.unsigned):t<32?(e=32-t,Q8(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned)):(t-=32,e=32-t,Q8(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned))},o9.rotl=o9.rotateLeft,o9.rotateRight=function(t){var e;return D8(t)&&(t=t.toInt()),0===(t&=63)?this:32===t?Q8(this.high,this.low,this.unsigned):t<32?(e=32-t,Q8(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned)):(t-=32,e=32-t,Q8(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned))},o9.rotr=o9.rotateRight,o9.toSigned=function(){return this.unsigned?Q8(this.low,this.high,!1):this},o9.toUnsigned=function(){return this.unsigned?this:Q8(this.low,this.high,!0)},o9.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},o9.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},o9.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},R8.fromBytes=function(t,e,n){return n?R8.fromBytesLE(t,e):R8.fromBytesBE(t,e)},R8.fromBytesLE=function(t,e){return new R8(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},R8.fromBytesBE=function(t,e){return new R8(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)};var s9=R8;const a9=16;function l9(t){"X"===t&&(t="");const e=t.padEnd(a9,"0");return s9.fromString(e,!0,16)}function c9(t){if(t.isZero())return"X";let e=t.countTrailingZeros();const n=e%4;e=(e-n)/4;const i=e;e*=4;const r=t.shiftRightUnsigned(e),o=r.toString(16).replace(/0+$/,""),s=Array(17-i-o.length).join("0");return s+o}function u9(t,e){const n=h9(t).shiftRightUnsigned(2),i=t.add(s9.fromNumber(2*e+1-4).multiply(n));return i}function h9(t){return t.and(t.not().add(1))}const A9=3,d9=30,p9=2*d9+1,f9=180/Math.PI;function g9(t){if(0===t.length)throw new Error("Invalid Hilbert quad key ".concat(t));const e=t.split("/"),n=parseInt(e[0],10),i=e[1],r=i.length;let o=0;const s=[0,0];for(let a=r-1;a>=0;a--){o=r-a;const t=i[a];let e=0,n=0;"1"===t?n=1:"2"===t?(e=1,n=1):"3"===t&&(e=1);const l=Math.pow(2,o-1);w9(l,s,e,n),s[0]+=l*e,s[1]+=l*n}if(n%2===1){const t=s[0];s[0]=s[1],s[1]=t}return{face:n,ij:s,level:o}}function m9(t){if(t.isZero())return"";let e=t.toString(2);while(e.length<A9+p9)e="0"+e;const n=e.lastIndexOf("1"),i=e.substring(0,3),r=e.substring(3,n),o=r.length/2,s=s9.fromString(i,!0,2).toString(10);let a="";if(0!==o){a=s9.fromString(r,!0,2).toString(4);while(a.length<o)a="0"+a}return"".concat(s,"/").concat(a)}function _9(t,e,n){const i=1<<e;return[(t[0]+n[0])/i,(t[1]+n[1])/i]}function y9(t){return t>=.5?1/3*(4*t*t-1):1/3*(1-4*(1-t)*(1-t))}function v9(t){return[y9(t[0]),y9(t[1])]}function x9(t,e){let[n,i]=e;switch(t){case 0:return[1,n,i];case 1:return[-n,1,i];case 2:return[-n,-i,1];case 3:return[-1,-i,-n];case 4:return[i,-1,-n];case 5:return[i,n,-1];default:throw new Error("Invalid face")}}function b9(t){let[e,n,i]=t;const r=Math.atan2(i,Math.sqrt(e*e+n*n)),o=Math.atan2(n,e);return[o*f9,r*f9]}function w9(t,e,n,i){if(0===i){1===n&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);const i=e[0];e[0]=e[1],e[1]=i}}function E9(t){const e=_9(t.ij,t.level,[.5,.5]),n=v9(e),i=x9(t.face,n);return b9(i)}function C9(t){const e=B9(t),n=g9(e);return n}function B9(t){if(t.indexOf("/")>0)return t;const e=l9(t);return m9(e)}const S9=100;function M9(t){const{face:e,ij:n,level:i}=t,r=[[0,0],[0,1],[1,1],[1,0],[0,0]],o=Math.max(1,Math.ceil(S9*Math.pow(2,-i))),s=new Float64Array(4*o*2+2);let a=0,l=0;for(let c=0;c<4;c++){const t=r[c].slice(0),u=r[c+1],h=(u[0]-t[0])/o,A=(u[1]-t[1])/o;for(let r=0;r<o;r++){t[0]+=h,t[1]+=A;const r=_9(n,i,t),o=v9(r),c=x9(e,o),u=b9(c);Math.abs(u[1])>89.999&&(u[0]=l);const d=u[0]-l;u[0]+=d>180?-360:d<-180?360:0,s[a++]=u[0],s[a++]=u[1],l=u[0]}}return s[a++]=s[0],s[a++]=s[1],s}function T9(t){let e;if(2===t.face||5===t.face){let n=null,i=0;for(let e=0;e<4;e++){const r="".concat(t.face,"/").concat(e),o=C9(r),s=M9(o);"undefined"!==typeof n&&null!==n||(n=new Float64Array(4*s.length)),n.set(s,i),i+=s.length}e=I9(n)}else{const n=M9(t);e=I9(n)}return e}function I9(t){if(t.length%2!==0)throw new Error("Invalid corners");const e=[],n=[];for(let i=0;i<t.length;i+=2)e.push(t[i]),n.push(t[i+1]);return e.sort(((t,e)=>t-e)),n.sort(((t,e)=>t-e)),{west:e[0],east:e[e.length-1],north:n[n.length-1],south:n[0]}}function L9(t,e){const n=(null===e||void 0===e?void 0:e.minimumHeight)||0,i=(null===e||void 0===e?void 0:e.maximumHeight)||0,r=C9(t),o=T9(r),s=o.west,a=o.south,l=o.east,c=o.north,u=[];return u.push(new IO.Z(s,c,n)),u.push(new IO.Z(l,c,n)),u.push(new IO.Z(l,a,n)),u.push(new IO.Z(s,a,n)),u.push(new IO.Z(s,c,i)),u.push(new IO.Z(l,c,i)),u.push(new IO.Z(l,a,i)),u.push(new IO.Z(s,a,i)),u}function P9(t){const e=C9(t);return E9(e)}function F9(t){const e=t.token,n={minimumHeight:t.minimumHeight,maximumHeight:t.maximumHeight},i=L9(e,n),r=P9(e),o=r[0],s=r[1],a=X3.WGS84.cartographicToCartesian([o,s,n.maximumHeight]),l=new IO.Z(a[0],a[1],a[2]);i.push(l);const c=W4(i),u=[...c.center,...c.halfAxes];return u}const R9=4,D9=8,O9={QUADTREE:R9,OCTREE:D9};function U9(t,e,n){if(null!==t&&void 0!==t&&t.box){const i=l9(t.s2VolumeInfo.token),r=u9(i,e),o=c9(r),s={...t.s2VolumeInfo};switch(s.token=o,n){case"OCTREE":const e=t.s2VolumeInfo,n=e.maximumHeight-e.minimumHeight,i=n/2,r=e.minimumHeight+n/2;e.minimumHeight=r-i,e.maximumHeight=r+i;break;default:break}const a=F9(s),l={box:a,s2VolumeInfo:s};return l}}async function N9(t){const{options:e,parentData:n={mortonIndex:0,x:0,y:0,z:0},childIndex:i=0,globalData:r={level:0,mortonIndex:0,x:0,y:0,z:0},s2VolumeBox:o}=t;let{subtree:s,level:a=0}=t;const{subdivisionScheme:l,subtreeLevels:c,maximumLevel:u,contentUrlTemplate:h,subtreesUriTemplate:A,basePath:d}=e,p={children:[],lodMetricValue:0,contentUrl:""},f=O9[l],g=1&i,m=i>>1&1,_=i>>2&1,y=(f**a-1)/(f-1);let v=G9(n.mortonIndex,i),x=y+v,b=G9(n.x,g),w=G9(n.y,m),E=G9(n.z,_),C=!1;a+1>c&&(C=k9(s.childSubtreeAvailability,v));const B=G9(r.x,b),S=G9(r.y,w),M=G9(r.z,E),T=a+r.level;if(C){const t="".concat(d,"/").concat(A),e=H9(t,T,B,S,M),n=await CO(e,P8);s=n,r.mortonIndex=v,r.x=b,r.y=w,r.z=E,r.level=a,v=0,x=0,b=0,w=0,E=0,a=0}const I=k9(s.tileAvailability,x);if(!I||a>u)return p;const L=k9(s.contentAvailability,x);L&&(p.contentUrl=H9(h,T,B,S,M));const P=a+1,F={mortonIndex:v,x:b,y:w,z:E};for(let R=0;R<f;R++){const t=U9(o,R,l),n=await N9({subtree:s,options:e,parentData:F,childIndex:R,level:P,globalData:r,s2VolumeBox:t});if(n.contentUrl||n.children.length){const t=T+1,i={childTileX:b,childTileY:w,childTileZ:E},r=z9(n,t,i,e,o);p.children.push(r)}}return p}function k9(t,e){return"constant"in t?Boolean(t.constant):!!t.explicitBitstream&&j9(e,t.explicitBitstream)}function z9(t,e,n,i,r){const{basePath:o,refine:s,getRefine:a,lodMetricType:l,getTileType:c,rootLodMetricValue:u,rootBoundingVolume:h}=i,A=t.contentUrl&&t.contentUrl.replace("".concat(o,"/"),""),d=u/2**e,p=null!==r&&void 0!==r&&r.box?{box:r.box}:h,f=Q9(e,p,n);return{children:t.children,contentUrl:t.contentUrl,content:{uri:A},id:t.contentUrl,refine:a(s),type:c(t),lodMetricType:l,lodMetricValue:d,geometricError:d,transform:t.transform,boundingVolume:f}}function Q9(t,e,n){if(e.region){const{childTileX:i,childTileY:r,childTileZ:o}=n,[s,a,l,c,u,h]=e.region,A=2**t,d=(l-s)/A,p=(c-a)/A,f=(h-u)/A,[g,m]=[s+d*i,s+d*(i+1)],[_,y]=[a+p*r,a+p*(r+1)],[v,x]=[u+f*o,u+f*(o+1)];return{region:[g,_,m,y,v,x]}}if(e.box)return e;throw new Error("Unsupported bounding volume type ".concat(e))}function G9(t,e){return parseInt(t.toString(2)+e.toString(2),2)}function H9(t,e,n,i,r){const o=V9({level:e,x:n,y:i,z:r});return t.replace(/{level}|{x}|{y}|{z}/gi,(t=>o[t]))}function V9(t){const e={};for(const n in t)e["{".concat(n,"}")]=t[n];return e}function j9(t,e){const n=Math.floor(t/8),i=t%8,r=e[n]>>i&1;return 1===r}function Z9(t){if(!t.contentUrl)return A5.EMPTY;const e=t.contentUrl.split("?")[0],n=e.split(".").pop();switch(n){case"pnts":return A5.POINTCLOUD;case"i3dm":case"b3dm":case"glb":case"gltf":return A5.SCENEGRAPH;default:return n}}function W9(t){switch(t){case"REPLACE":case"replace":return h5.REPLACE;case"ADD":case"add":return h5.ADD;default:return t}}function X9(t,e){const n=/^[a-z][0-9a-z+.-]*:/i;if(n.test(e)){const n=new URL(t,"".concat(e,"/"));return decodeURI(n.toString())}return t.startsWith("/")?t:"".concat(e,"/").concat(t)}function K9(t,e){if(!t)return null;if(t.content){const n=t.content.uri||t.content.url;t.contentUrl=X9(n,e.basePath)}return t.id=t.contentUrl,t.lodMetricType=p5.GEOMETRIC_ERROR,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform,t.type=Z9(t),t.refine=W9(t.refine),t}async function q9(t,e){const n=t.basePath;let i;const r=$9(null===t||void 0===t?void 0:t.root);i=r&&t.root?await J9(t.root,t,r,e):K9(t.root,t);const o=[];o.push(i);while(o.length>0){const i=o.pop()||{},r=i.children||[];for(let s of r){const i=$9(s);i?s=await J9(s,t,i,e):K9(s,{basePath:n}),o.push(s)}}return i}async function J9(t,e,n,i){var r,o;const s=e.basePath,{subdivisionScheme:a,maximumLevel:l,subtreeLevels:c,subtrees:{uri:u}}=n,h=H9(u,0,0,0,0),A=X9(h,s),d=await CO(A,P8,i),p=X9(t.content.uri,s),f=null===e||void 0===e||null===(r=e.root)||void 0===r?void 0:r.refine,g=t.geometricError,m=null===(o=t.boundingVolume.extensions)||void 0===o?void 0:o["3DTILES_bounding_volume_S2"];if(m){const e=F9(m),n={box:e,s2VolumeInfo:m};t.boundingVolume=n}const _=t.boundingVolume,y={contentUrlTemplate:p,subtreesUriTemplate:u,subdivisionScheme:a,subtreeLevels:c,maximumLevel:l,refine:f,basePath:s,lodMetricType:p5.GEOMETRIC_ERROR,rootLodMetricValue:g,rootBoundingVolume:_,getTileType:Z9,getRefine:W9};return await Y9(t,d,y)}async function Y9(t,e,n){if(!t)return null;t.lodMetricType=p5.GEOMETRIC_ERROR,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform;const{children:i,contentUrl:r}=await N9({subtree:e,options:n,s2VolumeBox:t});return r&&(t.contentUrl=r,t.content={uri:r.replace("".concat(n.basePath,"/"),"")}),t.refine=W9(t.refine),t.type=Z9(t),t.children=i,t.id=t.contentUrl,t}function $9(t){var e;return(null===t||void 0===t||null===(e=t.extensions)||void 0===e?void 0:e["3DTILES_implicit_tiling"])||(null===t||void 0===t?void 0:t.implicitTiling)}const t7={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:h6,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:r7,options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};function e7(t){return tO(t.url)}async function n7(t,e,n){const i={content:{featureIds:null}},r=0;return await C8(t,r,e,n,i.content),i.content}async function i7(t,e,n){var i;const r=JSON.parse((new TextDecoder).decode(t));return r.loader=e.loader||t7,r.url=n.url,r.queryString=n.queryString,r.basePath=e7(r),r.root=await q9(r,e),r.type=d5.TILES3D,r.lodMetricType=p5.GEOMETRIC_ERROR,r.lodMetricValue=(null===(i=r.root)||void 0===i?void 0:i.lodMetricValue)||0,r}async function r7(t,e,n){const i=e["3d-tiles"]||{};let r;return r="auto"===i.isTileset?n.url&&-1!==n.url.indexOf(".json"):i.isTileset,t=r?await i7(t,e,n):await n7(t,e,n),t}const o7=[0],s7={getPointColor:{type:"accessor",value:[0,0,0,255]},pointSize:1,data:"",loader:t7,onTilesetLoad:{type:"function",value:t=>{}},onTileLoad:{type:"function",value:t=>{}},onTileUnload:{type:"function",value:t=>{}},onTileError:{type:"function",value:(t,e,n)=>{}},_getMeshColor:{type:"function",value:t=>[255,255,255]}};class a7 extends fJ{constructor(...t){super(...t),(0,OP.Z)(this,"state",void 0)}initializeState(){"onTileLoadFail"in this.props&&bF.removed("onTileLoadFail","onTileError")(),this.state={layerMap:{},tileset3d:null,activeViewports:{},lastUpdatedViewports:null}}get isLoaded(){const{tileset3d:t}=this.state;return null!==t&&t.isLoaded()}shouldUpdateState({changeFlags:t}){return t.somethingChanged}updateState({props:t,oldProps:e,changeFlags:n}){if(t.data&&t.data!==e.data&&this._loadTileset(t.data),n.viewportChanged){const{activeViewports:t}=this.state,e=Object.keys(t).length;e&&(this._updateTileset(t),this.state.lastUpdatedViewports=t,this.state.activeViewports={})}if(n.propsChanged){const{layerMap:t}=this.state;for(const e in t)t[e].needsUpdate=!0}}activateViewport(t){const{activeViewports:e,lastUpdatedViewports:n}=this.state;this.internalState.viewport=t,e[t.id]=t;const i=null===n||void 0===n?void 0:n[t.id];i&&t.equals(i)||(this.setChangeFlags({viewportChanged:!0}),this.setNeedsUpdate())}getPickingInfo({info:t,sourceLayer:e}){const n=e&&e.props.tile;return t.picked&&(t.object=n),t.sourceTile=n,t}filterSubLayer({layer:t,viewport:e}){const{tile:n}=t.props,{id:i}=e;return n.selected&&n.viewportIds.includes(i)}_updateAutoHighlight(t){const e=t.sourceTile,n=this.state.layerMap[null===e||void 0===e?void 0:e.id];n&&n.layer&&n.layer.updateAutoHighlight(t)}async _loadTileset(t){const{loadOptions:e={}}=this.props;let n=this.props.loader||this.props.loaders;Array.isArray(n)&&(n=n[0]);const i={loadOptions:{...e}};if(n.preload){const r=await n.preload(t,e);r.headers&&(i.loadOptions.fetch={...i.loadOptions.fetch,headers:r.headers}),Object.assign(i,r)}const r=await CO(t,n,i.loadOptions),o=new u6(r,{onTileLoad:this._onTileLoad.bind(this),onTileUnload:this._onTileUnload.bind(this),onTileError:this.props.onTileError,...i});this.setState({tileset3d:o,layerMap:{}}),this._updateTileset(this.state.activeViewports),this.props.onTilesetLoad(o)}_onTileLoad(t){const{lastUpdatedViewports:e}=this.state;this.props.onTileLoad(t),this._updateTileset(e),this.setNeedsUpdate()}_onTileUnload(t){delete this.state.layerMap[t.id],this.props.onTileUnload(t)}_updateTileset(t){if(!t)return;const{tileset3d:e}=this.state,{timeline:n}=this.context,i=Object.keys(t).length;n&&i&&e&&e.selectTiles(Object.values(t)).then((t=>{const e=this.state.frameNumber!==t;e&&this.setState({frameNumber:t})}))}_getSubLayer(t,e){if(!t.content)return null;switch(t.type){case A5.POINTCLOUD:return this._makePointCloudLayer(t,e);case A5.SCENEGRAPH:return this._make3DModelLayer(t);case A5.MESH:return this._makeSimpleMeshLayer(t,e);default:throw new Error("Tile3DLayer: Failed to render layer of type ".concat(t.content.type))}}_makePointCloudLayer(t,e){const{attributes:n,pointCount:i,constantRGBA:r,cartographicOrigin:o,modelMatrix:s}=t.content,{positions:a,normals:l,colors:c}=n;if(!a)return null;const u=e&&e.props.data||{header:{vertexCount:i},attributes:{POSITION:a,NORMAL:l,COLOR_0:c}},{pointSize:h,getPointColor:A}=this.props,d=this.getSubLayerClass("pointcloud",HJ);return new d({pointSize:h},this.getSubLayerProps({id:"pointcloud"}),{id:"".concat(this.id,"-pointcloud-").concat(t.id),tile:t,data:u,coordinateSystem:SU.METER_OFFSETS,coordinateOrigin:o,modelMatrix:s,getColor:r||A,_offset:0})}_make3DModelLayer(t){const{gltf:e,instances:n,cartographicOrigin:i,modelMatrix:r}=t.content,o=this.getSubLayerClass("scenegraph",s3);return new o({_lighting:"pbr"},this.getSubLayerProps({id:"scenegraph"}),{id:"".concat(this.id,"-scenegraph-").concat(t.id),tile:t,data:n||o7,scenegraph:e,coordinateSystem:SU.METER_OFFSETS,coordinateOrigin:i,modelMatrix:r,getTransformMatrix:t=>t.modelMatrix,getPosition:[0,0,0],_offset:0})}_makeSimpleMeshLayer(t,e){const n=t.content,{attributes:i,indices:r,modelMatrix:o,cartographicOrigin:s,coordinateSystem:a=SU.METER_OFFSETS,material:l,featureIds:c}=n,{_getMeshColor:u}=this.props,h=e&&e.props.mesh||new AX({drawMode:4,attributes:l7(i),indices:r}),A=this.getSubLayerClass("mesh",_3);return new A(this.getSubLayerProps({id:"mesh"}),{id:"".concat(this.id,"-mesh-").concat(t.id),tile:t,mesh:h,data:o7,getColor:u(t),pbrMaterial:l,modelMatrix:o,coordinateOrigin:s,coordinateSystem:a,featureIds:c,_offset:0})}renderLayers(){const{tileset3d:t,layerMap:e}=this.state;return t?t.tiles.map((t=>{const n=e[t.id]=e[t.id]||{tile:t};let{layer:i}=n;return t.selected&&(i?n.needsUpdate&&(i=this._getSubLayer(t,i),n.needsUpdate=!1):i=this._getSubLayer(t)),n.layer=i,i})).filter(Boolean):null}}function l7(t){const e={};return e.positions={...t.positions,value:new Float32Array(t.positions.value)},t.normals&&(e.normals=t.normals),t.texCoords&&(e.texCoords=t.texCoords),t.colors&&(e.colors=t.colors),t.uvRegions&&(e.uvRegions=t.uvRegions),e}(0,OP.Z)(a7,"defaultProps",s7),(0,OP.Z)(a7,"layerName","Tile3DLayer");const c7=i(3190),u7=(t,e="")=>new Promise((n=>{const{map:i}=ym;let r=new uX({id:t.id,type:a7,data:t.url,loader:t7,pickable:!0,onTilesetLoad:e=>{e.setProps({maximumScreenSpaceError:1});const{cartographicCenter:i,zoom:r}=e;let o=t.translation||{x:0,y:0,z:0},s=(new c7.Matrix4).makeTranslation(o.x,o.y,o.z);e.modelMatrix=s;let a=t.centerOffset||{x:0,y:0};ym.flyTo({center:[i[0]+a.x,i[1]+a.y],zoom:r+4,pitch:72,bearing:15});const l=[i[0]+a.x,i[1]+a.y];n({center:l})},onClick:(t,e)=>{console.log("onClick",t,e)},onTileError:t=>{console.log(t)}});rm(t.id)&&am(t.id),i.addLayer(r,e)}));class h7 extends Vb{constructor(t,e={}){super(t),this.isWater=!0;const n=this,i=void 0!==e.textureWidth?e.textureWidth:512,r=void 0!==e.textureHeight?e.textureHeight:512,o=void 0!==e.clipBias?e.clipBias:0,s=void 0!==e.alpha?e.alpha:1,a=void 0!==e.time?e.time:0,l=void 0!==e.waterNormals?e.waterNormals:null,c=void 0!==e.sunDirection?e.sunDirection:new Jv(.70707,.70707,0),u=new kv(void 0!==e.sunColor?e.sunColor:16777215),h=new kv(void 0!==e.waterColor?e.waterColor:8355711),A=void 0!==e.eye?e.eye:new Jv(0,0,0),d=void 0!==e.distortionScale?e.distortionScale:20,p=void 0!==e.side?e.side:qm,f=void 0!==e.fog&&e.fog,g=new hw,m=new Jv,_=new Jv,y=new Jv,v=new Sx,x=new Jv(0,0,-1),b=new Zv,w=new Jv,E=new Jv,C=new Zv,B=new Sx,S=new nw,M=new Wv(i,r),T={uniforms:Jb.merge([JC.fog,JC.lights,{normalSampler:{value:null},mirrorSampler:{value:null},alpha:{value:1},time:{value:0},size:{value:1},distortionScale:{value:20},textureMatrix:{value:new Sx},sunColor:{value:new kv(8355711)},sunDirection:{value:new Jv(.70707,.70707,0)},eye:{value:new Jv},waterColor:{value:new kv(5592405)}}]),vertexShader:"\n\t\t\t\tuniform mat4 textureMatrix;\n\t\t\t\tuniform float time;\n\n\t\t\t\tvarying vec4 mirrorCoord;\n\t\t\t\tvarying vec4 worldPosition;\n\n\t\t\t\t#include <common>\n\t\t\t\t#include <fog_pars_vertex>\n\t\t\t\t#include <shadowmap_pars_vertex>\n\t\t\t\t#include <logdepthbuf_pars_vertex>\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tmirrorCoord = modelMatrix * vec4( position, 1.0 );\n\t\t\t\t\tworldPosition = mirrorCoord.xyzw;\n\t\t\t\t\tmirrorCoord = textureMatrix * mirrorCoord;\n\t\t\t\t\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t\tgl_Position = projectionMatrix * mvPosition;\n\n\t\t\t\t#include <beginnormal_vertex>\n\t\t\t\t#include <defaultnormal_vertex>\n\t\t\t\t#include <logdepthbuf_vertex>\n\t\t\t\t#include <fog_vertex>\n\t\t\t\t#include <shadowmap_vertex>\n\t\t\t}",fragmentShader:"\n\t\t\t\tuniform sampler2D mirrorSampler;\n\t\t\t\tuniform float alpha;\n\t\t\t\tuniform float time;\n\t\t\t\tuniform float size;\n\t\t\t\tuniform float distortionScale;\n\t\t\t\tuniform sampler2D normalSampler;\n\t\t\t\tuniform vec3 sunColor;\n\t\t\t\tuniform vec3 sunDirection;\n\t\t\t\tuniform vec3 eye;\n\t\t\t\tuniform vec3 waterColor;\n\n\t\t\t\tvarying vec4 mirrorCoord;\n\t\t\t\tvarying vec4 worldPosition;\n\n\t\t\t\tvec4 getNoise( vec2 uv ) {\n\t\t\t\t\tvec2 uv0 = ( uv / 103.0 ) + vec2(time / 17.0, time / 29.0);\n\t\t\t\t\tvec2 uv1 = uv / 107.0-vec2( time / -19.0, time / 31.0 );\n\t\t\t\t\tvec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( time / 101.0, time / 97.0 );\n\t\t\t\t\tvec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( time / 109.0, time / -113.0 );\n\t\t\t\t\tvec4 noise = texture2D( normalSampler, uv0 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv1 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv2 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv3 );\n\t\t\t\t\treturn noise * 0.5 - 1.0;\n\t\t\t\t}\n\n\t\t\t\tvoid sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) {\n\t\t\t\t\tvec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) );\n\t\t\t\t\tfloat direction = max( 0.0, dot( eyeDirection, reflection ) );\n\t\t\t\t\tspecularColor += pow( direction, shiny ) * sunColor * spec;\n\t\t\t\t\tdiffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * sunColor * diffuse;\n\t\t\t\t}\n\n\t\t\t\t#include <common>\n\t\t\t\t#include <packing>\n\t\t\t\t#include <bsdfs>\n\t\t\t\t#include <fog_pars_fragment>\n\t\t\t\t#include <logdepthbuf_pars_fragment>\n\t\t\t\t#include <lights_pars_begin>\n\t\t\t\t#include <shadowmap_pars_fragment>\n\t\t\t\t#include <shadowmask_pars_fragment>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#include <logdepthbuf_fragment>\n\t\t\t\t\tvec4 noise = getNoise( worldPosition.xz * size );\n\t\t\t\t\tvec3 surfaceNormal = normalize( noise.xzy * vec3( 1.5, 1.0, 1.5 ) );\n\n\t\t\t\t\tvec3 diffuseLight = vec3(0.0);\n\t\t\t\t\tvec3 specularLight = vec3(0.0);\n\n\t\t\t\t\tvec3 worldToEye = eye-worldPosition.xyz;\n\t\t\t\t\tvec3 eyeDirection = normalize( worldToEye );\n\t\t\t\t\tsunLight( surfaceNormal, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );\n\n\t\t\t\t\tfloat distance = length(worldToEye);\n\n\t\t\t\t\tvec2 distortion = surfaceNormal.xz * ( 0.001 + 1.0 / distance ) * distortionScale;\n\t\t\t\t\tvec3 reflectionSample = vec3( texture2D( mirrorSampler, mirrorCoord.xy / mirrorCoord.w + distortion ) );\n\n\t\t\t\t\tfloat theta = max( dot( eyeDirection, surfaceNormal ), 0.0 );\n\t\t\t\t\tfloat rf0 = 0.3;\n\t\t\t\t\tfloat reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 );\n\t\t\t\t\tvec3 scatter = max( 0.0, dot( surfaceNormal, eyeDirection ) ) * waterColor;\n\t\t\t\t\tvec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), ( vec3( 0.1 ) + reflectionSample * 0.9 + reflectionSample * specularLight ), reflectance);\n\t\t\t\t\tvec3 outgoingLight = albedo;\n\t\t\t\t\tgl_FragColor = vec4( outgoingLight, alpha );\n\n\t\t\t\t\t#include <tonemapping_fragment>\n\t\t\t\t\t#include <fog_fragment>\n\t\t\t\t}"},I=new tw({fragmentShader:T.fragmentShader,vertexShader:T.vertexShader,uniforms:Jb.clone(T.uniforms),lights:!0,side:p,fog:f});I.uniforms["mirrorSampler"].value=M.texture,I.uniforms["textureMatrix"].value=B,I.uniforms["alpha"].value=s,I.uniforms["time"].value=a,I.uniforms["normalSampler"].value=l,I.uniforms["sunColor"].value=u,I.uniforms["waterColor"].value=h,I.uniforms["sunDirection"].value=c,I.uniforms["distortionScale"].value=d,I.uniforms["eye"].value=A,n.material=I,n.onBeforeRender=function(t,e,i){if(_.setFromMatrixPosition(n.matrixWorld),y.setFromMatrixPosition(i.matrixWorld),v.extractRotation(n.matrixWorld),m.set(0,0,1),m.applyMatrix4(v),w.subVectors(_,y),w.dot(m)>0)return;w.reflect(m).negate(),w.add(_),v.extractRotation(i.matrixWorld),x.set(0,0,-1),x.applyMatrix4(v),x.add(y),E.subVectors(_,x),E.reflect(m).negate(),E.add(_),S.position.copy(w),S.up.set(0,1,0),S.up.applyMatrix4(v),S.up.reflect(m),S.lookAt(E),S.far=i.far,S.updateMatrixWorld(),S.projectionMatrix.copy(i.projectionMatrix),B.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),B.multiply(S.projectionMatrix),B.multiply(S.matrixWorldInverse),g.setFromNormalAndCoplanarPoint(m,_),g.applyMatrix4(S.matrixWorldInverse),b.set(g.normal.x,g.normal.y,g.normal.z,g.constant);const r=S.projectionMatrix;C.x=(Math.sign(b.x)+r.elements[8])/r.elements[0],C.y=(Math.sign(b.y)+r.elements[9])/r.elements[5],C.z=-1,C.w=(1+r.elements[10])/r.elements[14],b.multiplyScalar(2/b.dot(C)),r.elements[2]=b.x,r.elements[6]=b.y,r.elements[10]=b.z+1-o,r.elements[14]=b.w,A.setFromMatrixPosition(i.matrixWorld);const s=t.getRenderTarget(),a=t.xr.enabled,l=t.shadowMap.autoUpdate;n.visible=!1,t.xr.enabled=!1,t.shadowMap.autoUpdate=!1,t.setRenderTarget(M),t.state.buffers.depth.setMask(!0),!1===t.autoClear&&t.clear(),t.render(e,S),n.visible=!0,t.xr.enabled=a,t.shadowMap.autoUpdate=l,t.setRenderTarget(s);const c=i.viewport;void 0!==c&&t.state.viewport(c)}}}const A7={id:"water",position:[103.353557,23.362395],hight:0,size:[4e3,4e3],edit:!1},d7=(t,e="")=>new Promise((n=>{let{map:i}=ym,r=Object.assign({},A7,t),o="",s="",a="",l="",c="",u="",h="";function A(){const t=r.position,e=r.elevation,n=[Math.PI/2,0,0],A=eg().MercatorCoordinate.fromLngLat(t,e),d={translateX:A.x,translateY:A.y,translateZ:A.z,rotateX:n[0],rotateY:n[1],rotateZ:n[2],scale:A.meterInMercatorCoordinateUnits()};return c={id:r.id,type:"custom",renderingMode:"3d",onAdd:(t,e)=>{const n=t.getCanvas();o=new nw(50,n.clientWidth/n.clientHeight,1,5e3),s=new jM,a=new DM,a.name="water",s.add(a);let i=p(A,r);const c=new Ab({color:r.color||7706588,opacity:.5,side:Ym,transparent:!0}),d=new Ab;d.wireframe=!0,h=new Vb(i,c),u=new h7(i,{textureWidth:64,textureHeight:64,waterNormals:(new RI).load("/img/waternormals.jpg",(t=>{t.wrapS=t.wrapT=V_})),alpha:.3,side:Ym,sunColor:16777215,waterColor:16777215,distortionScale:3.7,fog:void 0!==s.fog}),u.material.transparent=!0,s.position.y=r.hight,a.add(u),a.add(h),a.rotation.x=-Math.PI/2,l=new HM({canvas:t.getCanvas(),context:e,logarithmicDepthBuffer:!0,antialias:!0}),l.autoClear=!1,l.physicallyCorrectLights=!0,l.setSize(n.clientWidth,n.clientHeight),window.addEventListener("resize",(()=>{l.setSize(n.clientWidth,n.clientHeight),o.aspect=n.clientWidth/n.clientHeight,o.updateProjectionMatrix()}))},render:(t,e)=>{const n=(new Sx).makeRotationAxis(new Jv(1,0,0),d.rotateX),r=(new Sx).makeRotationAxis(new Jv(0,1,0),d.rotateY),a=(new Sx).makeRotationAxis(new Jv(0,0,1),d.rotateZ),c=(new Sx).fromArray(e),h=(new Sx).makeTranslation(d.translateX,d.translateY,d.translateZ).scale(new Jv(d.scale,-d.scale,d.scale)).multiply(n).multiply(r).multiply(a);o.projectionMatrix.elements=e,o.projectionMatrix=c.multiply(h),l.resetState(),l.render(s,o),i.triggerRepaint(),u.material.uniforms["time"].value+=1/60}},c;function p(t,e){if(e.data){var n=[];e.data.features.forEach((e=>{e.geometry.coordinates.forEach((e=>{e.forEach((e=>{let i=eg().MercatorCoordinate.fromLngLat(e,0),r=i.meterInMercatorCoordinateUnits();n.push(new Cv((i.x-t.x)/r,-1*(i.y-t.y)/r))}))}))}));const i=new MT(n),r=f(i);return r}return new mw(e.size[0],e.size[1])}function f(t){const e=new uI(t,{depth:-200,steps:1,bevelEnabled:!1,bevelThickness:0,bevelSize:0,bebelSegments:0,curveSegments:0});return e}}rm(r.id)&&am(r.id),A(),i.addLayer(c,e),n(a)}));i(8499);const p7=(t,e,n,i)=>{const r=e.properties;if(!Array.isArray(t))return console.error("hover-html:入参异常!"),console.log(r),void console.log(t);if(0===t.length)return void console.error("hover-html:入参数组为空!");let o="",s=[];n&&(o+=n),t.forEach((t=>{let e=t.label||"",n=r[t.key];n=n||0===n?n:"-",t.dicData&&t.dicData.length>0&&(n=t.dicData.find((e=>e.value==r[t.key])).label||"-"),t.suffixText&&(n+=t.suffixText),s.push(`<p class="hover-item ${t.customItemClass||""}">\n <span class="label ${t.labelValueClass||""}">${e}:</span>\n <span class="value ${t.customValueClass||""}">${n}</span>\n </p>`)})),s.map((t=>o+=t)),i&&(o+=i),ym.addPopup([e.properties.lgtd,e.properties.lttd],`<div class="xy-hover-html line-height-2">${o}</div>`)};function f7(t,e=!0){return new Promise((n=>{e&&(t=zg(t)),$f.get(`https://restapi.amap.com/v3/geocode/regeo?key=39d46e3fcb4c9740d08e8ecb1f15ff8c&location=${t[0]},${t[1]}&extensions=all`).then((({data:t})=>{if("1"===t.status){let e={formattedAddress:t.regeocode.formatted_address,...t.regeocode.addressComponent};n(e)}}))}))}function g7(){return new Promise((t=>{new AMap.plugin("AMap.Geolocation",(()=>{const e=new AMap.Geolocation({enableHighAccuracy:!0,timeout:1e4,buttonOffset:new AMap.Pixel(10,20),zoomToAccuracy:!0,buttonPosition:"RB"});function n(e){const n={lng:e.position.lng,lat:e.position.lat,formattedAddress:e.formattedAddress,...e.addressComponent};t(n)}function i(t){}e.getCurrentPosition(((t,e)=>{"complete"===t?n(e):i(e)}))}))}))}var m7=function(){var t=this,e=t._self._c;return e("div",{ref:"dom"},[t._t("default")],2)},_7=[],y7={props:{position:{type:Array,default:()=>[]},drag:{type:Boolean,default:!1}},data(){return{}},mounted(){this.createdMarker()},methods:{createdMarker(){let{map:t}=ym,e=this.$refs.dom;const n=new(eg().Marker)(e,{draggable:this.drag}).setLngLat(this.position).addTo(t);this.drag&&n.on("dragend",(()=>{const t=n.getLngLat();this.$emit("dragEnd",t)}))}}},v7=y7;function x7(t,e,n,i,r,o,s,a){var l,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}var b7=x7(v7,m7,_7,!1,null,"35de8978",null),w7=b7.exports,E7=function(){var t=this,e=t._self._c;return e("canvas",{staticClass:"snow",attrs:{id:t.id}},[t._v("不支持canvas")])},C7=[],B7={props:{id:{type:String,default:"rain"},angle:{type:Number,default:-5},status:{type:String,default:"default"},len:{type:Number,default:70},lineWidth:{type:Number,default:1.5},isRain:{type:Boolean,default:!0}},data(){return{timer:"",ctx:null,count:500}},destroyed(){window.clearInterval(this.timer)},mounted(){this.start()},watch:{status(){window.clearInterval(this.timer),this.start()}},methods:{start(){this.$nextTick((()=>{const t=document.getElementById(this.id),e=t.clientWidth,n=t.clientHeight;"small"===this.status&&(this.count=100),"default"===this.status&&(this.count=300),"large"===this.status&&(this.count=1e3),t.width=e,t.height=n,this.ctx=t.getContext("2d"),this.timer=setInterval((()=>{this.isRain?(this.clearCanvas(),this.draws()):this.clearCanvas()}),50)}))},draws(){const t=this,e=document.getElementById(this.id),n=e.clientWidth,i=e.clientHeight;for(let o=1;o<=this.count;o++)r(Math.random()*n,Math.random()*i);function r(e,n){let i=t.ctx,r=i.createLinearGradient(e,n,e+t.angle,5*(n+t.len));r.addColorStop(0,"rgba(255,255,255,0.1)"),r.addColorStop(.5,"rgba(105,105,105,0.3)"),r.addColorStop(1,"rgba(255,255,255,0.5)"),i.strokeStyle=r,i.beginPath(),i.moveTo(e,n),i.lineTo(e+t.angle,n+t.len),i.lineWidth=t.lineWidth,i.stroke(),i.closePath()}},clearCanvas(){const t=document.getElementById(this.id),e=t.clientWidth,n=t.clientHeight;this.ctx.clearRect(0,0,e,n)}}},S7=B7,M7=(i(6872),x7(S7,E7,C7,!1,null,"20664206",null)),T7=M7.exports,I7=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mapLoad flex flex-col flex-align-center",class:{loadOver:!t.show}},[e("img",{staticStyle:{"margin-top":"10%"},attrs:{src:"/img/loading.gif",width:"400"}}),e("div",{staticClass:"text-center",staticStyle:{width:"400px","margin-top":"-90px"}},[e("div",{staticClass:"mb-20"},[t._v("正在努力加载中..."+t._s(t.progress.toFixed(0))+"%")]),e("div",{staticClass:"progress-wrap"},[e("div",{staticClass:"progress-inner"},[e("div",{staticClass:"progress-nums",style:`width: ${t.progress}%`})])])])])},L7=[],P7={props:{loading:{type:Boolean,default:!0},loadTime:{type:Number,default:5e3}},data(){return{progress:0,timer:"",show:!0}},watch:{loading:{handler(t){t||(this.show=!1,this.progress=100,window.clearInterval(this.timer))},immediate:!0}},destroyed(){window.clearInterval(this.timer)},created(){this.timer=setInterval((()=>{this.progress+=3,this.progress>=99&&window.clearInterval(this.timer)}),this.loadTime/30)}},F7=P7,R7=(i(4337),x7(F7,I7,L7,!1,null,"fa3ebcb8",null)),D7=R7.exports,O7=function(){var t=this,e=t._self._c;return e("span",[t.isSlot?e("span",{attrs:{title:t.isFullScreen?"退出全屏":"进入全屏"},on:{click:t.handleFullScreen}},[t._t("default")],2):e("span",{attrs:{title:t.isFullScreen?"退出全屏":"进入全屏"},on:{click:t.handleFullScreen}},[e("i",{staticClass:"el-icon-full-screen mr-5"}),t._v(" "+t._s(t.isFullScreen?"退出全屏":"全屏")+" ")])])},U7=[],N7={props:{isSlot:{type:Boolean,default:!1},dom:{type:String,default:""}},data(){return{isFullScreen:!1}},watch:{isFullScreen(t){this.$emit("change",t)}},methods:{handleFullScreen(){const t=this.dom?document.getElementById(this.dom):document.documentElement;this.isFUllScreenEnabled()?this.hasFullScreenElement()?this.exitFullScreen():this.setFullScreen(t):console.log("此浏览器不支持全屏"),this.listenfullscreen((()=>{this.isFullScreen=this.hasFullScreenElement()}))},isFUllScreenEnabled(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled},hasFullScreenElement(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},setFullScreen(t){t.requestFullscreen&&t.requestFullscreen(),t.webkitRequestFullscreen&&t.webkitRequestFullscreen(),t.mozRequestFullScreen&&t.mozRequestFullScreen(),t.msRequestFullscreen&&t.msRequestFullscreen()},exitFullScreen(){document.exitFullscreen&&document.exitFullscreen(),document.webkitExitFullscreen&&document.webkitExitFullscreen(),document.mozCancelFullScreen&&document.mozCancelFullScreen(),document.msExitFullscreen&&document.msExitFullscreen()},listenfullscreen(t){function e(){t()}document.addEventListener("fullscreenchange",(function(){e()})),document.addEventListener("mozfullscreenchange",(function(){e()})),document.addEventListener("webkitfullscreenchange",(function(){e()})),document.addEventListener("msfullscreenchange",(function(){e()}))}}},k7=N7,z7=(i(3081),x7(k7,O7,U7,!1,null,"0169c56a",null)),Q7=z7.exports,G7=function(){var t=this,e=t._self._c;return e("div",[e("el-radio-group",{attrs:{size:"small"},model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},[e("el-radio-button",{attrs:{label:1}},[t._v("卫星图")]),e("el-radio-button",{attrs:{label:2}},[t._v("矢量图")])],1)],1)},H7=[],V7={props:{type:{type:Number,default:1}},data(){return{radio:1,default:""}},watch:{radio(t){1===t?ym.checkStyle(this.default).then((()=>{this.$emit("checkStyle",t)})):ym.checkStyle("mapbox://styles/mapbox/streets-v11").then((()=>{this.$emit("checkStyle",t)}))}},mounted(){this.radio=this.type,setTimeout((()=>{this.default=ym.map.getStyle()}),1e3)}},j7=V7,Z7=x7(j7,G7,H7,!1,null,"1a040aed",null),W7=Z7.exports,X7=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"tools"},[e("div",{staticClass:"tools-bar flex flex-align-center"},[e("div",{class:{"main-color":"move"===t.type},attrs:{title:"移动"},on:{click:function(e){return t.startDraw("move")}}},[e("i",{staticClass:"el-icon-rank mr-5"}),t._v("移动 ")]),t._l(t.action,(function(n){return e("div",{key:n.type,staticClass:"ml-20",class:{"main-color":n.type===t.type},attrs:{title:n.name,label:n.type},on:{click:function(e){return t.startDraw(n.type)}}},[e("i",{staticClass:"mr-5",class:n.icon}),t._v(t._s(n.name)+" ")])})),t.showDeleteBtn?e("div",{staticClass:"ml-20",attrs:{title:"删除"},on:{click:t.drawDelete}},[e("i",{staticClass:"el-icon-close mr-5"}),t._v("删除 ")]):t._e(),t.showClearBtn?e("div",{staticClass:"ml-20",attrs:{title:"清空"},on:{click:t.clear}},[e("i",{staticClass:"el-icon-delete mr-5"}),t._v("清空")]):t._e(),t.showFullBtn?e("map-full-screen",{staticClass:"ml-20",attrs:{dom:t.fullDom}}):t._e(),e("div",{staticClass:"ml-20 red"},[t._v("* 点击图形编辑")]),t.showMapStyle?e("map-style",{staticClass:"margin-left",on:{checkStyle:t.checkStyle}}):t._e()],2),t.showMoveInput?e("div",{staticClass:"margin-top flex"},[e("div",{staticClass:"flex flex-align-center"},[e("span",{staticClass:"flex-child-noshrink"},[t._v("经度:")]),e("el-input",{attrs:{size:"small",placeholder:"请输入纬度"},model:{value:t.lng,callback:function(e){t.lng=e},expression:"lng"}})],1),e("div",{staticClass:"flex flex-align-center margin-left"},[e("span",{staticClass:"flex-child-noshrink"},[t._v("纬度:")]),e("el-input",{attrs:{size:"small",placeholder:"请输入经度"},model:{value:t.lat,callback:function(e){t.lat=e},expression:"lat"}})],1),e("div",{staticClass:"margin-left"},[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.search}},[t._v("搜索")])],1)]):t._e(),t.uploadShp||t.uploadJson?e("div",{staticClass:"mt-15"},[t.uploadShp?e("shp-file",{attrs:{requireDbf:t.requireDbf},on:{upload:t.getUpload}}):t._e(),t.uploadJson?e("json-file",{attrs:{requireDbf:t.requireDbf},on:{upload:t.getUpload}}):t._e()],1):t._e(),t._t("tools")],2),e("div",{staticClass:"right-fixed"},[t._t("right-fixed")],2)])},K7=[];i(3024);let q7=null,J7={coordinates:[],isAdsorb:!1,properties:{}},Y7={layerId:null,boundP:20},$7=null,ttt=null;const ett=(t={},e=ym.map)=>{$7=e,Y7=Object.assign(Y7,t),Y7.layerId&&(q7||rtt(),$7.on("mousemove",(t=>{if(q7){let e=t.lngLat;J7=ntt([e.lng,e.lat]),q7.setLngLat(J7.coordinates)}})))},ntt=t=>{let e=!1,n=null;if(rm(Y7.layerId)){const r=S(t);var i=$7.project(t);const o=[[i.x-Y7.boundP,i.y-Y7.boundP],[i.x+Y7.boundP,i.y+Y7.boundP]],s=$7.queryRenderedFeatures(o,{layers:[Y7.layerId]});let a,l=1/0;if(s.forEach((t=>{const e=L(t.geometry.coordinates),i=Bi(r,e,{units:"meters"});i<l&&(l=i,a=e,n=t.properties)})),a){const n=_i(a,r);t=n.geometry.coordinates,e=!0}}return{coordinates:t,isAdsorb:e,properties:n}},itt=(t=ttt,e)=>(ttt=t,J7.isAdsorb&&ttt&&e&&(ttt.delete(e.id),e.geometry.coordinates=J7.coordinates,setTimeout((()=>{ttt.add(e)}),300),ttt.changeMode("simple_select",{features:[e]})),ott(),$7.off("mousemove"),J7),rtt=()=>{const t=document.createElement("div");t.className="marker",t.style.backgroundImage="url(/img/marker2.png)",t.style.width="10px",t.style.height="10px",t.style.backgroundSize="100%",q7=new(eg().Marker)(t).setLngLat([0,0]).addTo($7)},ott=()=>{q7?.remove(),q7=null};var stt=function(){var t=this,e=t._self._c;return e("el-button",{staticClass:"upload",attrs:{size:"small",type:"warning"}},[t._v(" JSON上传 "),e("input",{staticClass:"file",attrs:{type:"file",accept:".json"},on:{input:t.getFile}})])},att=[],ltt={data(){return{}},methods:{getFile(t){const e=t.target.files?t.target.files[0]:"";if(e){let n=new FileReader;n.readAsText(e,"UTF-8"),n.onload=e=>{let n=e.target.result;if(n){n=JSON.parse(n),n.features||(n=kg(n));const e=ft(n);if(e.length>0&&e[0]>180)return this.$message.error("不属于WGS84坐标系,请使用其他工具进行数据转换");this.$emit("upload",n),t.target.value=""}}}}}},ctt=ltt,utt=(i(1602),x7(ctt,stt,att,!1,null,"5a5f8c5d",null)),htt=utt.exports,Att=function(){var t=this,e=t._self._c;return e("el-button",{staticClass:"upload",attrs:{size:"small",type:"warning"}},[t._v(" SHP上传 "),e("input",{staticClass:"file",attrs:{type:"file",accept:t.requireDbf?".shp,.dbf":".shp",multiple:t.requireDbf},on:{input:t.getFile}})])},dtt=[];const ptt=i(2388);var ftt={props:{requireDbf:{type:Boolean,default:!0,required:!1}},methods:{readFileAsArrayBuffer(t){return new Promise(((e,n)=>{const i=new FileReader;i.onload=t=>e(t.target.result),i.onerror=n,i.readAsArrayBuffer(t)}))},validateAndProcessGeoJSON(t){if(t.features||(t=kg(t)),!t.features||0==t.features.length)return this.$message.error("当前导入SHP没有数据!"),!1;const e=ft(t);return e.length>0&&e[0]>180?(this.$message.error("不属于WGS84坐标系,请使用其他工具进行数据转换"),!1):(this.$emit("upload",t),!0)},getFile(t){const e=Array.from(t.target.files||[]);if(0===e.length)return;t.target.value="";const n=e.find((t=>t.name.toLowerCase().endsWith(".shp"))),i=e.find((t=>t.name.toLowerCase().endsWith(".dbf")));return n?this.requireDbf&&!i?this.$message.error("请同时上传.dbf文件以获取属性数据"):void(i?this.readWithDbf(n,i):this.readShpOnly(n)):this.$message.error("请上传.shp文件")},readWithDbf(t,e){Promise.all([this.readFileAsArrayBuffer(t),this.readFileAsArrayBuffer(e)]).then((([t,e])=>{ptt.open(t,e,{encoding:"gb2312"}).then((t=>{const e=[],n=()=>t.read().then((t=>{if(!t.done)return e.push(t.value),n();{const t={type:"FeatureCollection",features:e};this.validateAndProcessGeoJSON(t)}}));return n()})).catch((t=>{console.error("读取文件错误:",t),this.$message.error("读取文件失败,请检查文件格式是否正确")}))}))},readShpOnly(t){this.readFileAsArrayBuffer(t).then((t=>{ptt.read(t).then((t=>{this.validateAndProcessGeoJSON(t)})).catch((t=>{console.error("读取文件错误:",t),this.$message.error("读取文件失败,请检查文件格式是否正确")}))}))}}},gtt=ftt,mtt=(i(4965),x7(gtt,Att,dtt,!1,null,"6e60926f",null)),_tt=mtt.exports,ytt={components:{mapFullScreen:Q7,mapStyle:W7,jsonFile:htt,shpFile:_tt},props:{fullDom:{type:String,default:"fullScreen"},list:{type:Array,default:()=>[]},single:{type:Boolean,default:!0},showFullBtn:{type:Boolean,default:!0},showDeleteBtn:{type:Boolean,default:!0},showClearBtn:{type:Boolean,default:!0},showMoveInput:{type:Boolean,default:!0},showMapStyle:{type:Boolean,default:!1},showMarker:{type:Boolean,default:!0},uploadJson:{type:Boolean,default:!1},uploadShp:{type:Boolean,default:!1},requireDbf:{type:Boolean,default:!1},isAdsorb:{type:Boolean,default:!1},adsorbParams:{type:Object,default:()=>{}}},data(){return{type:"move",isEdit:!1,draw:"",activeFeatures:"",lng:"",lat:"",geoJson:"",selectPoint:[]}},computed:{action(){let t=[{id:"point",type:"draw_point",name:"绘制点",icon:"el-icon-coordinate"},{id:"line",type:"draw_line_string",name:"绘制线",icon:"el-icon-arrow-up"},{id:"polygon",type:"draw_polygon",name:"绘制面",icon:"el-icon-house"}],e=this.list.length>0?t.filter((t=>this.list.includes(t.id))):t;return e}},mounted(){},methods:{initDraw(t,e){this.map=t;const n=this.draw=new(xm())(Object.assign({},{displayControlsDefault:!1,controls:{}},e));t.addControl(n),t.on("draw.create",this.drawEnd),t.on("draw.update",this.drawUpdate),t.on("draw.selectionchange",this.select),document.onkeydown=t=>{if(0===this.selectPoint.length||0===this.activeFeatures.length)return;const e=this.activeFeatures[0].geometry.type,n=t.keyCode||t.which||t.charCode;46==n&&(console.log("删除锚点",this.selectPoint,this.activeFeatures[0].geometry.coordinates),this.selectPoint.forEach((t=>{if("Polygon"===e){if(3==this.activeFeatures[0].geometry.coordinates[0].length)return void this.$message.warning("面图层至少绘制3个点,无法删除!");this.activeFeatures[0].geometry.coordinates[0].forEach(((e,n)=>{JSON.stringify(e)===JSON.stringify(t.geometry.coordinates)&&(console.log(e,n),this.activeFeatures[0].geometry.coordinates[0].splice(n,1))}))}else if("LineString"===e){if(2==this.activeFeatures[0].geometry.coordinates.length)return void this.$message.warning("线图层至少绘制2个点,无法删除!");this.activeFeatures[0].geometry.coordinates.forEach(((e,n)=>{JSON.stringify(e)===JSON.stringify(t.geometry.coordinates)&&this.activeFeatures[0].geometry.coordinates.splice(n,1)}))}})),this.updateGeometry(this.activeFeatures[0]),this.$emit("deletePoint",{selectPoint:[...this.selectPoint],data:this.getDraw()}),this.selectPoint=[])}},updateGeometry(t){const e=t.geometry;this.draw.delete(t.id),this.draw.add(e),this.drawUpdate()},getDraw(){const t=this.draw.getAll();return t},startDraw(t){this.type=t,"move"!==t&&(this.single&&this.clear(),console.log("开始绘制"),this.draw.changeMode(t),this.isAdsorb&&ett(this.adsorbParams,this.map),this.$emit("start"))},drawEnd(t){const e=this.getDraw();if(console.log("绘制结束",e),this.type="move",this.geoJson=e,this.isAdsorb){let n=t.features[0];e.lastPosition=itt(this.draw,n)}this.$emit("end",e)},drawUpdate(t){const e=this.getDraw();console.log("修改结束",e),this.geoJson=e,this.$emit("update",e)},drawEdit(t){this.geoJson=t,t.features.forEach((t=>{this.draw.add(t.geometry)}))},drawDelete(){this.activeFeatures&&this.activeFeatures.length>0?this.activeFeatures.forEach((t=>{this.draw.delete(t.id);const e=this.getDraw();e.features&&e.features.length>0?this.$emit("delete",e):this.$emit("clear"),console.log("删除选中对象",this.activeFeatures[0]),this.activeFeatures=[]})):this.$message.warning("未选择删除的对象")},clear(){this.draw&&(this.draw.deleteAll(),this.$emit("clear")),rm("search-marker")&&cm("search-marker",!1)},select(t){t.points&&t.points.length>0&&(console.log("选中锚点",t.points),this.selectPoint=t.points,this.$emit("selectpoint",t)),this.activeFeatures=t.features,console.log("选中对象",this.activeFeatures),this.$emit("select",t.features)},search(){if(!this.lng||!this.lat)return this.$message.error("请输入正确的经纬度信息");this.map.easeTo({center:[this.lng,this.lat]}),this.showMarker&&this.addMarker()},getCenter(){const{lng:t,lat:e}=this.map.getCenter();this.lng=t,this.lat=e},checkStyle(t){this.geoJson&&(this.clear(),this.drawEdit(this.geoJson),this.$emit("checkStyle",t))},addMarker(){const t=[{id:1,name:"当前位置",lnglat:[this.lng,this.lat]}],e=Ug(t,"Point","lnglat");Rm({id:"search-marker",data:e}),rm("search-marker")&&cm("search-marker",!0)},getUpload(t){this.$emit("getUpload",t)}}},vtt=ytt,xtt=(i(9474),x7(vtt,X7,K7,!1,null,"32331762",null)),btt=xtt.exports,wtt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"full-height relative overflow",attrs:{id:"fullScreen"}},[e("div",{staticClass:"full-height",attrs:{id:"map"}}),e("draw-tools",t._b({ref:"draw",attrs:{list:["point"],showMoveInput:!1,showDeleteBtn:!1,"is-adsorb":t.isAdsorb},on:{update:t.drawUpdate,end:t.drawUpdate,delete:t.drawUpdate,clear:t.clear}},"draw-tools",t.$attrs,!1),[e("div",{staticClass:"mt-15",attrs:{slot:"tools"},slot:"tools"},[e("div",{staticClass:"flex"},[e("el-input",{staticClass:"full-width margin-right",attrs:{value:t.position.toString(),size:"small",placeholder:"点击地图获取坐标",readonly:""}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.save}},[t._v("保存")])],1),t.address&&t.address.formattedAddress?e("div",{staticClass:"margin-top font-12"},[t._v(" 地址:"+t._s(t.address.formattedAddress)+" ")]):t._e()])])],1)},Ett=[],Ctt={components:{drawTools:btt},props:{config:{type:Object,default:()=>{}},geoData:{type:[Object,String],default:""},lng:{type:[Number,String],default:""},lat:{type:[Number,String],default:""},zoom:{type:Number,default:14},isAdsorb:{type:Boolean,default:!1}},data(){return{geoJson:"",position:"",address:""}},watch:{lng(){this.draw()},geoData(){this.draw()}},mounted(){this.init()},methods:{init(){let t=Object.assign({},{accessToken:"pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg",zoom:this.zoom,center:[102.83643451528434,24.81972792178513],is3d:!1},this.config);ym.initMap(t).then((t=>{this.$refs.draw.initDraw(t),this.draw(),this.$emit("map-load")}))},draw(){this.lng&&this.lat?this.geoJson={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[1*this.lng,1*this.lat]},properties:{}}]}:this.geoJson=this.geoData,this.drawUpdate(this.geoJson),this.geoJson&&this.$refs.draw.drawEdit(this.geoJson)},drawUpdate(t){if(!t)return;const e=t.features;this.geoJson=t,e.length>0?(this.position=e[0].geometry.coordinates,this.position=this.position.map((t=>Number(t).toFixed(6))),this.$nextTick((()=>{ym.easeTo(this.position),f7(this.position).then((t=>{this.address=t}))}))):(this.position="",this.address="")},save(){let t={geoJson:this.geoJson,position:this.position,lng:this.position[0],lat:this.position[1],address:this.address};this.$emit("save",t)},clear(){this.geoJson="",this.position="",this.address=""}}},Btt=Ctt,Stt=x7(Btt,wtt,Ett,!1,null,null,null),Mtt=Stt.exports,Ttt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"full-height relative overflow",attrs:{id:"fullScreen"}},[e("div",{staticClass:"full-height",attrs:{id:"map"}}),e("draw-tools",t._b({ref:"draw",attrs:{list:["line"],single:t.single,showMoveInput:!1},on:{update:t.drawUpdate,end:t.drawUpdate,delete:t.drawUpdate,clear:t.clear,getUpload:t.getUpload}},"draw-tools",t.$attrs,!1),[e("div",{staticClass:"mt-15 flex flex-wrap",attrs:{slot:"tools"},slot:"tools"},[e("el-input",{staticClass:"flex-child-grow",staticStyle:{width:"300px","margin-right":"10px"},attrs:{value:t.position.toString(),size:"small",placeholder:"点击地图获取坐标",readonly:t.readonly}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.save}},[t._v("保存")]),t._t("default")],2)])],1)},Itt=[],Ltt={components:{drawTools:btt},props:{config:{type:Object,default:()=>{}},readonly:{type:Boolean,default:!1},autoZoom:{type:Boolean,default:!1},single:{type:Boolean,default:!1},geoData:{type:[Object,String],default:""},pointList:{type:[Array,String],default:""}},data(){return{geoJson:"",position:""}},watch:{pointList(){this.draw()},geoData(){this.draw()}},mounted(){this.init()},methods:{init(){let t=Object.assign({},{accessToken:"pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg",center:[102.83643451528434,24.81972792178513],is3d:!1},this.config);ym.initMap(t).then((t=>{this.$refs.draw.initDraw(t),this.draw()}))},draw(){if(this.pointList&&this.pointList.length>0){let t=this.pointList.map((t=>({type:"Feature",geometry:{type:"LineString",coordinates:t},properties:{}})));this.geoJson={type:"FeatureCollection",features:t}}else this.geoJson=this.geoData;this.drawUpdate(this.geoJson,!0),this.edit()},edit(){this.geoJson&&this.$refs.draw.drawEdit(this.geoJson)},drawUpdate(t,e=!1){t&&(this.geoJson=t,this.position=t.features.map((t=>t.geometry.coordinates.flat(1/0))),this.position=Jg(2,...this.position),this.position.forEach((t=>{t[0]=Number(t[0]).toFixed(6),t[1]=Number(t[1]).toFixed(6)})),(this.autoZoom||e)&&this.$nextTick((()=>{ym.fitJsonBounds(t,{padding:100})})))},save(){let t={geoJson:this.geoJson,position:this.position};console.log(t),this.$emit("save",t)},clear(){this.geoJson="",this.position=""},getUpload(t){console.log(t),this.$refs.draw.clear(),this.drawUpdate(t,!0),this.edit()}}},Ptt=Ltt,Ftt=x7(Ptt,Ttt,Itt,!1,null,null,null),Rtt=Ftt.exports,Dtt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"full-height relative overflow",attrs:{id:"fullScreen"}},[e("div",{staticClass:"full-height",attrs:{id:"map"}}),e("draw-tools",t._b({ref:"draw",attrs:{list:["polygon"],single:t.single,showMoveInput:!1},on:{update:t.drawUpdate,end:t.drawUpdate,delete:t.drawUpdate,clear:t.clear,getUpload:t.getUpload}},"draw-tools",t.$attrs,!1),[e("div",{staticClass:"mt-15 flex flex-wrap",attrs:{slot:"tools"},slot:"tools"},[e("el-input",{staticClass:"flex-child-grow",staticStyle:{width:"300px","margin-right":"10px"},attrs:{value:t.position.toString(),size:"small",placeholder:"点击地图获取坐标",readonly:t.readonly}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.save}},[t._v("保存")]),t._t("default")],2)])],1)},Ott=[],Utt={components:{drawTools:btt},props:{config:{type:Object,default:()=>{}},single:{type:Boolean,default:!1},autoZoom:{type:Boolean,default:!1},readonly:{type:Boolean,default:!0},geoData:{type:[Object,String],default:""},pointList:{type:[Array,String],default:""}},data(){return{geoJson:"",position:""}},watch:{pointList(){this.draw()},geoData(){this.draw()}},mounted(){this.init()},methods:{init(){let t=Object.assign({},{accessToken:"pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg",center:[102.83643451528434,24.81972792178513],is3d:!1},this.config);ym.initMap(t).then((t=>{this.$refs.draw.initDraw(t),this.draw()}))},draw(){if(this.pointList&&this.pointList.length>0){let t=this.pointList.map((t=>({type:"Feature",geometry:{type:"Polygon",coordinates:[t]},properties:{}})));this.geoJson={type:"FeatureCollection",features:t}}else this.geoJson=this.geoData;this.drawUpdate(this.geoJson,!0),this.edit()},edit(){this.geoJson&&this.$refs.draw.drawEdit(this.geoJson)},drawUpdate(t,e=!1){t&&(this.geoJson=t,this.position=t.features.map((t=>t.geometry.coordinates.flat(1/0))),this.position=Jg(2,...this.position),this.position.forEach((t=>{t[0]=Number(t[0]).toFixed(6),t[1]=Number(t[1]).toFixed(6)})),(this.autoZoom||e)&&this.$nextTick((()=>{ym.fitJsonBounds(t,{padding:100})})))},save(){let t={geoJson:this.geoJson,position:this.position};console.log(t),this.$emit("save",t)},clear(){this.geoJson="",this.position=""},getUpload(t){console.log(t),this.$refs.draw.clear(),this.drawUpdate(t,!0),this.edit()}}},Ntt=Utt,ktt=x7(Ntt,Dtt,Ott,!1,null,null,null),ztt=ktt.exports;const Qtt={showLayerText:um,setSource:im,hasSource:om,showLayer:cm,hasLayer:rm,removeLayer:am,removeSource:sm,setLayout:hm,setPaint:Am,setFilter:dm,setHigh:pm,getLayerAll:lm},Gtt={addLayerText:bm,addLayerLine:Sm,addLayerLineAnimation:Mm,addLayerPoint:Lm,addDiyPoint:Fm,addFlashPoint:Pm,addLayerImagePoint:Rm,addLayerPolygon:Um,addLayerCircle:km,addCircleAnimate:Gm,addLayerModel:FP,addLayerPipe:DP,addLayerWater:d7,load3DTiles:u7},Htt={toGeoJson:Ug,pointToGeoJson:Ng,loadImage:Vg,ranging:jg,drawArea:Zg,spArray:Jg,clearDraw:Wg,distance:Xg,lineCenter:Kg,polygonCenter:qg,GeoAddress:f7,Geolocation:g7,getElevation:Yg,geometryCollectionToFeatureCollection:kg},Vtt={mapHover:Em,mapClick:wm,changeMapCursor:Cm,mapHoverHtml:p7};var jtt=_["default"]}(),r}()}));
|
|
94
|
+
var F8=null;try{F8=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(Wtt){}function R8(t,e,n){this.low=0|t,this.high=0|e,this.unsigned=!!n}function D8(t){return!0===(t&&t["__isLong__"])}function O8(t){var e=Math.clz32(t&-t);return t?31-e:e}R8.prototype.__isLong__,Object.defineProperty(R8.prototype,"__isLong__",{value:!0}),R8.isLong=D8;var U8={},N8={};function k8(t,e){var n,i,r;return e?(t>>>=0,(r=0<=t&&t<256)&&(i=N8[t],i)?i:(n=Q8(t,0,!0),r&&(N8[t]=n),n)):(t|=0,(r=-128<=t&&t<128)&&(i=U8[t],i)?i:(n=Q8(t,t<0?-1:0,!1),r&&(U8[t]=n),n))}function z8(t,e){if(isNaN(t))return e?Y8:J8;if(e){if(t<0)return Y8;if(t>=X8)return i9}else{if(t<=-K8)return r9;if(t+1>=K8)return n9}return t<0?z8(-t,e).neg():Q8(t%W8|0,t/W8|0,e)}function Q8(t,e,n){return new R8(t,e,n)}R8.fromInt=k8,R8.fromNumber=z8,R8.fromBits=Q8;var G8=Math.pow;function H8(t,e,n){if(0===t.length)throw Error("empty string");if("number"===typeof e?(n=e,e=!1):e=!!e,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e?Y8:J8;if(n=n||10,n<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return H8(t.substring(1),e,n).neg();for(var r=z8(G8(n,8)),o=J8,s=0;s<t.length;s+=8){var a=Math.min(8,t.length-s),l=parseInt(t.substring(s,s+a),n);if(a<8){var c=z8(G8(n,a));o=o.mul(c).add(z8(l))}else o=o.mul(r),o=o.add(z8(l))}return o.unsigned=e,o}function V8(t,e){return"number"===typeof t?z8(t,e):"string"===typeof t?H8(t,e):Q8(t.low,t.high,"boolean"===typeof e?e:t.unsigned)}R8.fromString=H8,R8.fromValue=V8;var j8=65536,Z8=1<<24,W8=j8*j8,X8=W8*W8,K8=X8/2,q8=k8(Z8),J8=k8(0);R8.ZERO=J8;var Y8=k8(0,!0);R8.UZERO=Y8;var $8=k8(1);R8.ONE=$8;var t9=k8(1,!0);R8.UONE=t9;var e9=k8(-1);R8.NEG_ONE=e9;var n9=Q8(-1,2147483647,!1);R8.MAX_VALUE=n9;var i9=Q8(-1,-1,!0);R8.MAX_UNSIGNED_VALUE=i9;var r9=Q8(0,-2147483648,!1);R8.MIN_VALUE=r9;var o9=R8.prototype;o9.toInt=function(){return this.unsigned?this.low>>>0:this.low},o9.toNumber=function(){return this.unsigned?(this.high>>>0)*W8+(this.low>>>0):this.high*W8+(this.low>>>0)},o9.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(r9)){var e=z8(t),n=this.div(e),i=n.mul(e).sub(this);return n.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}var r=z8(G8(t,6),this.unsigned),o=this,s="";while(1){var a=o.div(r),l=o.sub(a.mul(r)).toInt()>>>0,c=l.toString(t);if(o=a,o.isZero())return c+s;while(c.length<6)c="0"+c;s=""+c+s}},o9.getHighBits=function(){return this.high},o9.getHighBitsUnsigned=function(){return this.high>>>0},o9.getLowBits=function(){return this.low},o9.getLowBitsUnsigned=function(){return this.low>>>0},o9.getNumBitsAbs=function(){if(this.isNegative())return this.eq(r9)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0;e--)if(0!=(t&1<<e))break;return 0!=this.high?e+33:e+1},o9.isZero=function(){return 0===this.high&&0===this.low},o9.eqz=o9.isZero,o9.isNegative=function(){return!this.unsigned&&this.high<0},o9.isPositive=function(){return this.unsigned||this.high>=0},o9.isOdd=function(){return 1===(1&this.low)},o9.isEven=function(){return 0===(1&this.low)},o9.equals=function(t){return D8(t)||(t=V8(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&(this.high===t.high&&this.low===t.low)},o9.eq=o9.equals,o9.notEquals=function(t){return!this.eq(t)},o9.neq=o9.notEquals,o9.ne=o9.notEquals,o9.lessThan=function(t){return this.comp(t)<0},o9.lt=o9.lessThan,o9.lessThanOrEqual=function(t){return this.comp(t)<=0},o9.lte=o9.lessThanOrEqual,o9.le=o9.lessThanOrEqual,o9.greaterThan=function(t){return this.comp(t)>0},o9.gt=o9.greaterThan,o9.greaterThanOrEqual=function(t){return this.comp(t)>=0},o9.gte=o9.greaterThanOrEqual,o9.ge=o9.greaterThanOrEqual,o9.compare=function(t){if(D8(t)||(t=V8(t)),this.eq(t))return 0;var e=this.isNegative(),n=t.isNegative();return e&&!n?-1:!e&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},o9.comp=o9.compare,o9.negate=function(){return!this.unsigned&&this.eq(r9)?r9:this.not().add($8)},o9.neg=o9.negate,o9.add=function(t){D8(t)||(t=V8(t));var e=this.high>>>16,n=65535&this.high,i=this.low>>>16,r=65535&this.low,o=t.high>>>16,s=65535&t.high,a=t.low>>>16,l=65535&t.low,c=0,u=0,h=0,A=0;return A+=r+l,h+=A>>>16,A&=65535,h+=i+a,u+=h>>>16,h&=65535,u+=n+s,c+=u>>>16,u&=65535,c+=e+o,c&=65535,Q8(h<<16|A,c<<16|u,this.unsigned)},o9.subtract=function(t){return D8(t)||(t=V8(t)),this.add(t.neg())},o9.sub=o9.subtract,o9.multiply=function(t){if(this.isZero())return this;if(D8(t)||(t=V8(t)),F8){var e=F8["mul"](this.low,this.high,t.low,t.high);return Q8(e,F8["get_high"](),this.unsigned)}if(t.isZero())return this.unsigned?Y8:J8;if(this.eq(r9))return t.isOdd()?r9:J8;if(t.eq(r9))return this.isOdd()?r9:J8;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(q8)&&t.lt(q8))return z8(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,r=this.low>>>16,o=65535&this.low,s=t.high>>>16,a=65535&t.high,l=t.low>>>16,c=65535&t.low,u=0,h=0,A=0,d=0;return d+=o*c,A+=d>>>16,d&=65535,A+=r*c,h+=A>>>16,A&=65535,A+=o*l,h+=A>>>16,A&=65535,h+=i*c,u+=h>>>16,h&=65535,h+=r*l,u+=h>>>16,h&=65535,h+=o*a,u+=h>>>16,h&=65535,u+=n*c+i*l+r*a+o*s,u&=65535,Q8(A<<16|d,u<<16|h,this.unsigned)},o9.mul=o9.multiply,o9.divide=function(t){if(D8(t)||(t=V8(t)),t.isZero())throw Error("division by zero");if(F8){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var e=(this.unsigned?F8["div_u"]:F8["div_s"])(this.low,this.high,t.low,t.high);return Q8(e,F8["get_high"](),this.unsigned)}if(this.isZero())return this.unsigned?Y8:J8;var n,i,r;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Y8;if(t.gt(this.shru(1)))return t9;r=Y8}else{if(this.eq(r9)){if(t.eq($8)||t.eq(e9))return r9;if(t.eq(r9))return $8;var o=this.shr(1);return n=o.div(t).shl(1),n.eq(J8)?t.isNegative()?$8:e9:(i=this.sub(t.mul(n)),r=n.add(i.div(t)),r)}if(t.eq(r9))return this.unsigned?Y8:J8;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=J8}i=this;while(i.gte(t)){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));var s=Math.ceil(Math.log(n)/Math.LN2),a=s<=48?1:G8(2,s-48),l=z8(n),c=l.mul(t);while(c.isNegative()||c.gt(i))n-=a,l=z8(n,this.unsigned),c=l.mul(t);l.isZero()&&(l=$8),r=r.add(l),i=i.sub(c)}return r},o9.div=o9.divide,o9.modulo=function(t){if(D8(t)||(t=V8(t)),F8){var e=(this.unsigned?F8["rem_u"]:F8["rem_s"])(this.low,this.high,t.low,t.high);return Q8(e,F8["get_high"](),this.unsigned)}return this.sub(this.div(t).mul(t))},o9.mod=o9.modulo,o9.rem=o9.modulo,o9.not=function(){return Q8(~this.low,~this.high,this.unsigned)},o9.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},o9.clz=o9.countLeadingZeros,o9.countTrailingZeros=function(){return this.low?O8(this.low):O8(this.high)+32},o9.ctz=o9.countTrailingZeros,o9.and=function(t){return D8(t)||(t=V8(t)),Q8(this.low&t.low,this.high&t.high,this.unsigned)},o9.or=function(t){return D8(t)||(t=V8(t)),Q8(this.low|t.low,this.high|t.high,this.unsigned)},o9.xor=function(t){return D8(t)||(t=V8(t)),Q8(this.low^t.low,this.high^t.high,this.unsigned)},o9.shiftLeft=function(t){return D8(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?Q8(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Q8(0,this.low<<t-32,this.unsigned)},o9.shl=o9.shiftLeft,o9.shiftRight=function(t){return D8(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?Q8(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Q8(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},o9.shr=o9.shiftRight,o9.shiftRightUnsigned=function(t){return D8(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?Q8(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):Q8(32===t?this.high:this.high>>>t-32,0,this.unsigned)},o9.shru=o9.shiftRightUnsigned,o9.shr_u=o9.shiftRightUnsigned,o9.rotateLeft=function(t){var e;return D8(t)&&(t=t.toInt()),0===(t&=63)?this:32===t?Q8(this.high,this.low,this.unsigned):t<32?(e=32-t,Q8(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned)):(t-=32,e=32-t,Q8(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned))},o9.rotl=o9.rotateLeft,o9.rotateRight=function(t){var e;return D8(t)&&(t=t.toInt()),0===(t&=63)?this:32===t?Q8(this.high,this.low,this.unsigned):t<32?(e=32-t,Q8(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned)):(t-=32,e=32-t,Q8(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned))},o9.rotr=o9.rotateRight,o9.toSigned=function(){return this.unsigned?Q8(this.low,this.high,!1):this},o9.toUnsigned=function(){return this.unsigned?this:Q8(this.low,this.high,!0)},o9.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},o9.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},o9.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},R8.fromBytes=function(t,e,n){return n?R8.fromBytesLE(t,e):R8.fromBytesBE(t,e)},R8.fromBytesLE=function(t,e){return new R8(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},R8.fromBytesBE=function(t,e){return new R8(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)};var s9=R8;const a9=16;function l9(t){"X"===t&&(t="");const e=t.padEnd(a9,"0");return s9.fromString(e,!0,16)}function c9(t){if(t.isZero())return"X";let e=t.countTrailingZeros();const n=e%4;e=(e-n)/4;const i=e;e*=4;const r=t.shiftRightUnsigned(e),o=r.toString(16).replace(/0+$/,""),s=Array(17-i-o.length).join("0");return s+o}function u9(t,e){const n=h9(t).shiftRightUnsigned(2),i=t.add(s9.fromNumber(2*e+1-4).multiply(n));return i}function h9(t){return t.and(t.not().add(1))}const A9=3,d9=30,p9=2*d9+1,f9=180/Math.PI;function g9(t){if(0===t.length)throw new Error("Invalid Hilbert quad key ".concat(t));const e=t.split("/"),n=parseInt(e[0],10),i=e[1],r=i.length;let o=0;const s=[0,0];for(let a=r-1;a>=0;a--){o=r-a;const t=i[a];let e=0,n=0;"1"===t?n=1:"2"===t?(e=1,n=1):"3"===t&&(e=1);const l=Math.pow(2,o-1);w9(l,s,e,n),s[0]+=l*e,s[1]+=l*n}if(n%2===1){const t=s[0];s[0]=s[1],s[1]=t}return{face:n,ij:s,level:o}}function m9(t){if(t.isZero())return"";let e=t.toString(2);while(e.length<A9+p9)e="0"+e;const n=e.lastIndexOf("1"),i=e.substring(0,3),r=e.substring(3,n),o=r.length/2,s=s9.fromString(i,!0,2).toString(10);let a="";if(0!==o){a=s9.fromString(r,!0,2).toString(4);while(a.length<o)a="0"+a}return"".concat(s,"/").concat(a)}function _9(t,e,n){const i=1<<e;return[(t[0]+n[0])/i,(t[1]+n[1])/i]}function y9(t){return t>=.5?1/3*(4*t*t-1):1/3*(1-4*(1-t)*(1-t))}function v9(t){return[y9(t[0]),y9(t[1])]}function x9(t,e){let[n,i]=e;switch(t){case 0:return[1,n,i];case 1:return[-n,1,i];case 2:return[-n,-i,1];case 3:return[-1,-i,-n];case 4:return[i,-1,-n];case 5:return[i,n,-1];default:throw new Error("Invalid face")}}function b9(t){let[e,n,i]=t;const r=Math.atan2(i,Math.sqrt(e*e+n*n)),o=Math.atan2(n,e);return[o*f9,r*f9]}function w9(t,e,n,i){if(0===i){1===n&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);const i=e[0];e[0]=e[1],e[1]=i}}function E9(t){const e=_9(t.ij,t.level,[.5,.5]),n=v9(e),i=x9(t.face,n);return b9(i)}function C9(t){const e=B9(t),n=g9(e);return n}function B9(t){if(t.indexOf("/")>0)return t;const e=l9(t);return m9(e)}const S9=100;function M9(t){const{face:e,ij:n,level:i}=t,r=[[0,0],[0,1],[1,1],[1,0],[0,0]],o=Math.max(1,Math.ceil(S9*Math.pow(2,-i))),s=new Float64Array(4*o*2+2);let a=0,l=0;for(let c=0;c<4;c++){const t=r[c].slice(0),u=r[c+1],h=(u[0]-t[0])/o,A=(u[1]-t[1])/o;for(let r=0;r<o;r++){t[0]+=h,t[1]+=A;const r=_9(n,i,t),o=v9(r),c=x9(e,o),u=b9(c);Math.abs(u[1])>89.999&&(u[0]=l);const d=u[0]-l;u[0]+=d>180?-360:d<-180?360:0,s[a++]=u[0],s[a++]=u[1],l=u[0]}}return s[a++]=s[0],s[a++]=s[1],s}function T9(t){let e;if(2===t.face||5===t.face){let n=null,i=0;for(let e=0;e<4;e++){const r="".concat(t.face,"/").concat(e),o=C9(r),s=M9(o);"undefined"!==typeof n&&null!==n||(n=new Float64Array(4*s.length)),n.set(s,i),i+=s.length}e=I9(n)}else{const n=M9(t);e=I9(n)}return e}function I9(t){if(t.length%2!==0)throw new Error("Invalid corners");const e=[],n=[];for(let i=0;i<t.length;i+=2)e.push(t[i]),n.push(t[i+1]);return e.sort(((t,e)=>t-e)),n.sort(((t,e)=>t-e)),{west:e[0],east:e[e.length-1],north:n[n.length-1],south:n[0]}}function L9(t,e){const n=(null===e||void 0===e?void 0:e.minimumHeight)||0,i=(null===e||void 0===e?void 0:e.maximumHeight)||0,r=C9(t),o=T9(r),s=o.west,a=o.south,l=o.east,c=o.north,u=[];return u.push(new IO.Z(s,c,n)),u.push(new IO.Z(l,c,n)),u.push(new IO.Z(l,a,n)),u.push(new IO.Z(s,a,n)),u.push(new IO.Z(s,c,i)),u.push(new IO.Z(l,c,i)),u.push(new IO.Z(l,a,i)),u.push(new IO.Z(s,a,i)),u}function P9(t){const e=C9(t);return E9(e)}function F9(t){const e=t.token,n={minimumHeight:t.minimumHeight,maximumHeight:t.maximumHeight},i=L9(e,n),r=P9(e),o=r[0],s=r[1],a=X3.WGS84.cartographicToCartesian([o,s,n.maximumHeight]),l=new IO.Z(a[0],a[1],a[2]);i.push(l);const c=W4(i),u=[...c.center,...c.halfAxes];return u}const R9=4,D9=8,O9={QUADTREE:R9,OCTREE:D9};function U9(t,e,n){if(null!==t&&void 0!==t&&t.box){const i=l9(t.s2VolumeInfo.token),r=u9(i,e),o=c9(r),s={...t.s2VolumeInfo};switch(s.token=o,n){case"OCTREE":const e=t.s2VolumeInfo,n=e.maximumHeight-e.minimumHeight,i=n/2,r=e.minimumHeight+n/2;e.minimumHeight=r-i,e.maximumHeight=r+i;break;default:break}const a=F9(s),l={box:a,s2VolumeInfo:s};return l}}async function N9(t){const{options:e,parentData:n={mortonIndex:0,x:0,y:0,z:0},childIndex:i=0,globalData:r={level:0,mortonIndex:0,x:0,y:0,z:0},s2VolumeBox:o}=t;let{subtree:s,level:a=0}=t;const{subdivisionScheme:l,subtreeLevels:c,maximumLevel:u,contentUrlTemplate:h,subtreesUriTemplate:A,basePath:d}=e,p={children:[],lodMetricValue:0,contentUrl:""},f=O9[l],g=1&i,m=i>>1&1,_=i>>2&1,y=(f**a-1)/(f-1);let v=G9(n.mortonIndex,i),x=y+v,b=G9(n.x,g),w=G9(n.y,m),E=G9(n.z,_),C=!1;a+1>c&&(C=k9(s.childSubtreeAvailability,v));const B=G9(r.x,b),S=G9(r.y,w),M=G9(r.z,E),T=a+r.level;if(C){const t="".concat(d,"/").concat(A),e=H9(t,T,B,S,M),n=await CO(e,P8);s=n,r.mortonIndex=v,r.x=b,r.y=w,r.z=E,r.level=a,v=0,x=0,b=0,w=0,E=0,a=0}const I=k9(s.tileAvailability,x);if(!I||a>u)return p;const L=k9(s.contentAvailability,x);L&&(p.contentUrl=H9(h,T,B,S,M));const P=a+1,F={mortonIndex:v,x:b,y:w,z:E};for(let R=0;R<f;R++){const t=U9(o,R,l),n=await N9({subtree:s,options:e,parentData:F,childIndex:R,level:P,globalData:r,s2VolumeBox:t});if(n.contentUrl||n.children.length){const t=T+1,i={childTileX:b,childTileY:w,childTileZ:E},r=z9(n,t,i,e,o);p.children.push(r)}}return p}function k9(t,e){return"constant"in t?Boolean(t.constant):!!t.explicitBitstream&&j9(e,t.explicitBitstream)}function z9(t,e,n,i,r){const{basePath:o,refine:s,getRefine:a,lodMetricType:l,getTileType:c,rootLodMetricValue:u,rootBoundingVolume:h}=i,A=t.contentUrl&&t.contentUrl.replace("".concat(o,"/"),""),d=u/2**e,p=null!==r&&void 0!==r&&r.box?{box:r.box}:h,f=Q9(e,p,n);return{children:t.children,contentUrl:t.contentUrl,content:{uri:A},id:t.contentUrl,refine:a(s),type:c(t),lodMetricType:l,lodMetricValue:d,geometricError:d,transform:t.transform,boundingVolume:f}}function Q9(t,e,n){if(e.region){const{childTileX:i,childTileY:r,childTileZ:o}=n,[s,a,l,c,u,h]=e.region,A=2**t,d=(l-s)/A,p=(c-a)/A,f=(h-u)/A,[g,m]=[s+d*i,s+d*(i+1)],[_,y]=[a+p*r,a+p*(r+1)],[v,x]=[u+f*o,u+f*(o+1)];return{region:[g,_,m,y,v,x]}}if(e.box)return e;throw new Error("Unsupported bounding volume type ".concat(e))}function G9(t,e){return parseInt(t.toString(2)+e.toString(2),2)}function H9(t,e,n,i,r){const o=V9({level:e,x:n,y:i,z:r});return t.replace(/{level}|{x}|{y}|{z}/gi,(t=>o[t]))}function V9(t){const e={};for(const n in t)e["{".concat(n,"}")]=t[n];return e}function j9(t,e){const n=Math.floor(t/8),i=t%8,r=e[n]>>i&1;return 1===r}function Z9(t){if(!t.contentUrl)return A5.EMPTY;const e=t.contentUrl.split("?")[0],n=e.split(".").pop();switch(n){case"pnts":return A5.POINTCLOUD;case"i3dm":case"b3dm":case"glb":case"gltf":return A5.SCENEGRAPH;default:return n}}function W9(t){switch(t){case"REPLACE":case"replace":return h5.REPLACE;case"ADD":case"add":return h5.ADD;default:return t}}function X9(t,e){const n=/^[a-z][0-9a-z+.-]*:/i;if(n.test(e)){const n=new URL(t,"".concat(e,"/"));return decodeURI(n.toString())}return t.startsWith("/")?t:"".concat(e,"/").concat(t)}function K9(t,e){if(!t)return null;if(t.content){const n=t.content.uri||t.content.url;t.contentUrl=X9(n,e.basePath)}return t.id=t.contentUrl,t.lodMetricType=p5.GEOMETRIC_ERROR,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform,t.type=Z9(t),t.refine=W9(t.refine),t}async function q9(t,e){const n=t.basePath;let i;const r=$9(null===t||void 0===t?void 0:t.root);i=r&&t.root?await J9(t.root,t,r,e):K9(t.root,t);const o=[];o.push(i);while(o.length>0){const i=o.pop()||{},r=i.children||[];for(let s of r){const i=$9(s);i?s=await J9(s,t,i,e):K9(s,{basePath:n}),o.push(s)}}return i}async function J9(t,e,n,i){var r,o;const s=e.basePath,{subdivisionScheme:a,maximumLevel:l,subtreeLevels:c,subtrees:{uri:u}}=n,h=H9(u,0,0,0,0),A=X9(h,s),d=await CO(A,P8,i),p=X9(t.content.uri,s),f=null===e||void 0===e||null===(r=e.root)||void 0===r?void 0:r.refine,g=t.geometricError,m=null===(o=t.boundingVolume.extensions)||void 0===o?void 0:o["3DTILES_bounding_volume_S2"];if(m){const e=F9(m),n={box:e,s2VolumeInfo:m};t.boundingVolume=n}const _=t.boundingVolume,y={contentUrlTemplate:p,subtreesUriTemplate:u,subdivisionScheme:a,subtreeLevels:c,maximumLevel:l,refine:f,basePath:s,lodMetricType:p5.GEOMETRIC_ERROR,rootLodMetricValue:g,rootBoundingVolume:_,getTileType:Z9,getRefine:W9};return await Y9(t,d,y)}async function Y9(t,e,n){if(!t)return null;t.lodMetricType=p5.GEOMETRIC_ERROR,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform;const{children:i,contentUrl:r}=await N9({subtree:e,options:n,s2VolumeBox:t});return r&&(t.contentUrl=r,t.content={uri:r.replace("".concat(n.basePath,"/"),"")}),t.refine=W9(t.refine),t.type=Z9(t),t.children=i,t.id=t.contentUrl,t}function $9(t){var e;return(null===t||void 0===t||null===(e=t.extensions)||void 0===e?void 0:e["3DTILES_implicit_tiling"])||(null===t||void 0===t?void 0:t.implicitTiling)}const t7={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:h6,extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:r7,options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};function e7(t){return tO(t.url)}async function n7(t,e,n){const i={content:{featureIds:null}},r=0;return await C8(t,r,e,n,i.content),i.content}async function i7(t,e,n){var i;const r=JSON.parse((new TextDecoder).decode(t));return r.loader=e.loader||t7,r.url=n.url,r.queryString=n.queryString,r.basePath=e7(r),r.root=await q9(r,e),r.type=d5.TILES3D,r.lodMetricType=p5.GEOMETRIC_ERROR,r.lodMetricValue=(null===(i=r.root)||void 0===i?void 0:i.lodMetricValue)||0,r}async function r7(t,e,n){const i=e["3d-tiles"]||{};let r;return r="auto"===i.isTileset?n.url&&-1!==n.url.indexOf(".json"):i.isTileset,t=r?await i7(t,e,n):await n7(t,e,n),t}const o7=[0],s7={getPointColor:{type:"accessor",value:[0,0,0,255]},pointSize:1,data:"",loader:t7,onTilesetLoad:{type:"function",value:t=>{}},onTileLoad:{type:"function",value:t=>{}},onTileUnload:{type:"function",value:t=>{}},onTileError:{type:"function",value:(t,e,n)=>{}},_getMeshColor:{type:"function",value:t=>[255,255,255]}};class a7 extends fJ{constructor(...t){super(...t),(0,OP.Z)(this,"state",void 0)}initializeState(){"onTileLoadFail"in this.props&&bF.removed("onTileLoadFail","onTileError")(),this.state={layerMap:{},tileset3d:null,activeViewports:{},lastUpdatedViewports:null}}get isLoaded(){const{tileset3d:t}=this.state;return null!==t&&t.isLoaded()}shouldUpdateState({changeFlags:t}){return t.somethingChanged}updateState({props:t,oldProps:e,changeFlags:n}){if(t.data&&t.data!==e.data&&this._loadTileset(t.data),n.viewportChanged){const{activeViewports:t}=this.state,e=Object.keys(t).length;e&&(this._updateTileset(t),this.state.lastUpdatedViewports=t,this.state.activeViewports={})}if(n.propsChanged){const{layerMap:t}=this.state;for(const e in t)t[e].needsUpdate=!0}}activateViewport(t){const{activeViewports:e,lastUpdatedViewports:n}=this.state;this.internalState.viewport=t,e[t.id]=t;const i=null===n||void 0===n?void 0:n[t.id];i&&t.equals(i)||(this.setChangeFlags({viewportChanged:!0}),this.setNeedsUpdate())}getPickingInfo({info:t,sourceLayer:e}){const n=e&&e.props.tile;return t.picked&&(t.object=n),t.sourceTile=n,t}filterSubLayer({layer:t,viewport:e}){const{tile:n}=t.props,{id:i}=e;return n.selected&&n.viewportIds.includes(i)}_updateAutoHighlight(t){const e=t.sourceTile,n=this.state.layerMap[null===e||void 0===e?void 0:e.id];n&&n.layer&&n.layer.updateAutoHighlight(t)}async _loadTileset(t){const{loadOptions:e={}}=this.props;let n=this.props.loader||this.props.loaders;Array.isArray(n)&&(n=n[0]);const i={loadOptions:{...e}};if(n.preload){const r=await n.preload(t,e);r.headers&&(i.loadOptions.fetch={...i.loadOptions.fetch,headers:r.headers}),Object.assign(i,r)}const r=await CO(t,n,i.loadOptions),o=new u6(r,{onTileLoad:this._onTileLoad.bind(this),onTileUnload:this._onTileUnload.bind(this),onTileError:this.props.onTileError,...i});this.setState({tileset3d:o,layerMap:{}}),this._updateTileset(this.state.activeViewports),this.props.onTilesetLoad(o)}_onTileLoad(t){const{lastUpdatedViewports:e}=this.state;this.props.onTileLoad(t),this._updateTileset(e),this.setNeedsUpdate()}_onTileUnload(t){delete this.state.layerMap[t.id],this.props.onTileUnload(t)}_updateTileset(t){if(!t)return;const{tileset3d:e}=this.state,{timeline:n}=this.context,i=Object.keys(t).length;n&&i&&e&&e.selectTiles(Object.values(t)).then((t=>{const e=this.state.frameNumber!==t;e&&this.setState({frameNumber:t})}))}_getSubLayer(t,e){if(!t.content)return null;switch(t.type){case A5.POINTCLOUD:return this._makePointCloudLayer(t,e);case A5.SCENEGRAPH:return this._make3DModelLayer(t);case A5.MESH:return this._makeSimpleMeshLayer(t,e);default:throw new Error("Tile3DLayer: Failed to render layer of type ".concat(t.content.type))}}_makePointCloudLayer(t,e){const{attributes:n,pointCount:i,constantRGBA:r,cartographicOrigin:o,modelMatrix:s}=t.content,{positions:a,normals:l,colors:c}=n;if(!a)return null;const u=e&&e.props.data||{header:{vertexCount:i},attributes:{POSITION:a,NORMAL:l,COLOR_0:c}},{pointSize:h,getPointColor:A}=this.props,d=this.getSubLayerClass("pointcloud",HJ);return new d({pointSize:h},this.getSubLayerProps({id:"pointcloud"}),{id:"".concat(this.id,"-pointcloud-").concat(t.id),tile:t,data:u,coordinateSystem:SU.METER_OFFSETS,coordinateOrigin:o,modelMatrix:s,getColor:r||A,_offset:0})}_make3DModelLayer(t){const{gltf:e,instances:n,cartographicOrigin:i,modelMatrix:r}=t.content,o=this.getSubLayerClass("scenegraph",s3);return new o({_lighting:"pbr"},this.getSubLayerProps({id:"scenegraph"}),{id:"".concat(this.id,"-scenegraph-").concat(t.id),tile:t,data:n||o7,scenegraph:e,coordinateSystem:SU.METER_OFFSETS,coordinateOrigin:i,modelMatrix:r,getTransformMatrix:t=>t.modelMatrix,getPosition:[0,0,0],_offset:0})}_makeSimpleMeshLayer(t,e){const n=t.content,{attributes:i,indices:r,modelMatrix:o,cartographicOrigin:s,coordinateSystem:a=SU.METER_OFFSETS,material:l,featureIds:c}=n,{_getMeshColor:u}=this.props,h=e&&e.props.mesh||new AX({drawMode:4,attributes:l7(i),indices:r}),A=this.getSubLayerClass("mesh",_3);return new A(this.getSubLayerProps({id:"mesh"}),{id:"".concat(this.id,"-mesh-").concat(t.id),tile:t,mesh:h,data:o7,getColor:u(t),pbrMaterial:l,modelMatrix:o,coordinateOrigin:s,coordinateSystem:a,featureIds:c,_offset:0})}renderLayers(){const{tileset3d:t,layerMap:e}=this.state;return t?t.tiles.map((t=>{const n=e[t.id]=e[t.id]||{tile:t};let{layer:i}=n;return t.selected&&(i?n.needsUpdate&&(i=this._getSubLayer(t,i),n.needsUpdate=!1):i=this._getSubLayer(t)),n.layer=i,i})).filter(Boolean):null}}function l7(t){const e={};return e.positions={...t.positions,value:new Float32Array(t.positions.value)},t.normals&&(e.normals=t.normals),t.texCoords&&(e.texCoords=t.texCoords),t.colors&&(e.colors=t.colors),t.uvRegions&&(e.uvRegions=t.uvRegions),e}(0,OP.Z)(a7,"defaultProps",s7),(0,OP.Z)(a7,"layerName","Tile3DLayer");const c7=i(3190),u7=(t,e="")=>new Promise((n=>{const{map:i}=ym;let r=new uX({id:t.id,type:a7,data:t.url,loader:t7,pickable:!0,onTilesetLoad:e=>{e.setProps({maximumScreenSpaceError:1});const{cartographicCenter:i,zoom:r}=e;let o=t.translation||{x:0,y:0,z:0},s=(new c7.Matrix4).makeTranslation(o.x,o.y,o.z);e.modelMatrix=s;let a=t.centerOffset||{x:0,y:0};ym.flyTo({center:[i[0]+a.x,i[1]+a.y],zoom:r+4,pitch:72,bearing:15});const l=[i[0]+a.x,i[1]+a.y];n({center:l})},onClick:(t,e)=>{console.log("onClick",t,e)},onTileError:t=>{console.log(t)}});rm(t.id)&&am(t.id),i.addLayer(r,e)}));class h7 extends Vb{constructor(t,e={}){super(t),this.isWater=!0;const n=this,i=void 0!==e.textureWidth?e.textureWidth:512,r=void 0!==e.textureHeight?e.textureHeight:512,o=void 0!==e.clipBias?e.clipBias:0,s=void 0!==e.alpha?e.alpha:1,a=void 0!==e.time?e.time:0,l=void 0!==e.waterNormals?e.waterNormals:null,c=void 0!==e.sunDirection?e.sunDirection:new Jv(.70707,.70707,0),u=new kv(void 0!==e.sunColor?e.sunColor:16777215),h=new kv(void 0!==e.waterColor?e.waterColor:8355711),A=void 0!==e.eye?e.eye:new Jv(0,0,0),d=void 0!==e.distortionScale?e.distortionScale:20,p=void 0!==e.side?e.side:qm,f=void 0!==e.fog&&e.fog,g=new hw,m=new Jv,_=new Jv,y=new Jv,v=new Sx,x=new Jv(0,0,-1),b=new Zv,w=new Jv,E=new Jv,C=new Zv,B=new Sx,S=new nw,M=new Wv(i,r),T={uniforms:Jb.merge([JC.fog,JC.lights,{normalSampler:{value:null},mirrorSampler:{value:null},alpha:{value:1},time:{value:0},size:{value:1},distortionScale:{value:20},textureMatrix:{value:new Sx},sunColor:{value:new kv(8355711)},sunDirection:{value:new Jv(.70707,.70707,0)},eye:{value:new Jv},waterColor:{value:new kv(5592405)}}]),vertexShader:"\n\t\t\t\tuniform mat4 textureMatrix;\n\t\t\t\tuniform float time;\n\n\t\t\t\tvarying vec4 mirrorCoord;\n\t\t\t\tvarying vec4 worldPosition;\n\n\t\t\t\t#include <common>\n\t\t\t\t#include <fog_pars_vertex>\n\t\t\t\t#include <shadowmap_pars_vertex>\n\t\t\t\t#include <logdepthbuf_pars_vertex>\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tmirrorCoord = modelMatrix * vec4( position, 1.0 );\n\t\t\t\t\tworldPosition = mirrorCoord.xyzw;\n\t\t\t\t\tmirrorCoord = textureMatrix * mirrorCoord;\n\t\t\t\t\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t\tgl_Position = projectionMatrix * mvPosition;\n\n\t\t\t\t#include <beginnormal_vertex>\n\t\t\t\t#include <defaultnormal_vertex>\n\t\t\t\t#include <logdepthbuf_vertex>\n\t\t\t\t#include <fog_vertex>\n\t\t\t\t#include <shadowmap_vertex>\n\t\t\t}",fragmentShader:"\n\t\t\t\tuniform sampler2D mirrorSampler;\n\t\t\t\tuniform float alpha;\n\t\t\t\tuniform float time;\n\t\t\t\tuniform float size;\n\t\t\t\tuniform float distortionScale;\n\t\t\t\tuniform sampler2D normalSampler;\n\t\t\t\tuniform vec3 sunColor;\n\t\t\t\tuniform vec3 sunDirection;\n\t\t\t\tuniform vec3 eye;\n\t\t\t\tuniform vec3 waterColor;\n\n\t\t\t\tvarying vec4 mirrorCoord;\n\t\t\t\tvarying vec4 worldPosition;\n\n\t\t\t\tvec4 getNoise( vec2 uv ) {\n\t\t\t\t\tvec2 uv0 = ( uv / 103.0 ) + vec2(time / 17.0, time / 29.0);\n\t\t\t\t\tvec2 uv1 = uv / 107.0-vec2( time / -19.0, time / 31.0 );\n\t\t\t\t\tvec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( time / 101.0, time / 97.0 );\n\t\t\t\t\tvec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( time / 109.0, time / -113.0 );\n\t\t\t\t\tvec4 noise = texture2D( normalSampler, uv0 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv1 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv2 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv3 );\n\t\t\t\t\treturn noise * 0.5 - 1.0;\n\t\t\t\t}\n\n\t\t\t\tvoid sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) {\n\t\t\t\t\tvec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) );\n\t\t\t\t\tfloat direction = max( 0.0, dot( eyeDirection, reflection ) );\n\t\t\t\t\tspecularColor += pow( direction, shiny ) * sunColor * spec;\n\t\t\t\t\tdiffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * sunColor * diffuse;\n\t\t\t\t}\n\n\t\t\t\t#include <common>\n\t\t\t\t#include <packing>\n\t\t\t\t#include <bsdfs>\n\t\t\t\t#include <fog_pars_fragment>\n\t\t\t\t#include <logdepthbuf_pars_fragment>\n\t\t\t\t#include <lights_pars_begin>\n\t\t\t\t#include <shadowmap_pars_fragment>\n\t\t\t\t#include <shadowmask_pars_fragment>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#include <logdepthbuf_fragment>\n\t\t\t\t\tvec4 noise = getNoise( worldPosition.xz * size );\n\t\t\t\t\tvec3 surfaceNormal = normalize( noise.xzy * vec3( 1.5, 1.0, 1.5 ) );\n\n\t\t\t\t\tvec3 diffuseLight = vec3(0.0);\n\t\t\t\t\tvec3 specularLight = vec3(0.0);\n\n\t\t\t\t\tvec3 worldToEye = eye-worldPosition.xyz;\n\t\t\t\t\tvec3 eyeDirection = normalize( worldToEye );\n\t\t\t\t\tsunLight( surfaceNormal, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );\n\n\t\t\t\t\tfloat distance = length(worldToEye);\n\n\t\t\t\t\tvec2 distortion = surfaceNormal.xz * ( 0.001 + 1.0 / distance ) * distortionScale;\n\t\t\t\t\tvec3 reflectionSample = vec3( texture2D( mirrorSampler, mirrorCoord.xy / mirrorCoord.w + distortion ) );\n\n\t\t\t\t\tfloat theta = max( dot( eyeDirection, surfaceNormal ), 0.0 );\n\t\t\t\t\tfloat rf0 = 0.3;\n\t\t\t\t\tfloat reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 );\n\t\t\t\t\tvec3 scatter = max( 0.0, dot( surfaceNormal, eyeDirection ) ) * waterColor;\n\t\t\t\t\tvec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), ( vec3( 0.1 ) + reflectionSample * 0.9 + reflectionSample * specularLight ), reflectance);\n\t\t\t\t\tvec3 outgoingLight = albedo;\n\t\t\t\t\tgl_FragColor = vec4( outgoingLight, alpha );\n\n\t\t\t\t\t#include <tonemapping_fragment>\n\t\t\t\t\t#include <fog_fragment>\n\t\t\t\t}"},I=new tw({fragmentShader:T.fragmentShader,vertexShader:T.vertexShader,uniforms:Jb.clone(T.uniforms),lights:!0,side:p,fog:f});I.uniforms["mirrorSampler"].value=M.texture,I.uniforms["textureMatrix"].value=B,I.uniforms["alpha"].value=s,I.uniforms["time"].value=a,I.uniforms["normalSampler"].value=l,I.uniforms["sunColor"].value=u,I.uniforms["waterColor"].value=h,I.uniforms["sunDirection"].value=c,I.uniforms["distortionScale"].value=d,I.uniforms["eye"].value=A,n.material=I,n.onBeforeRender=function(t,e,i){if(_.setFromMatrixPosition(n.matrixWorld),y.setFromMatrixPosition(i.matrixWorld),v.extractRotation(n.matrixWorld),m.set(0,0,1),m.applyMatrix4(v),w.subVectors(_,y),w.dot(m)>0)return;w.reflect(m).negate(),w.add(_),v.extractRotation(i.matrixWorld),x.set(0,0,-1),x.applyMatrix4(v),x.add(y),E.subVectors(_,x),E.reflect(m).negate(),E.add(_),S.position.copy(w),S.up.set(0,1,0),S.up.applyMatrix4(v),S.up.reflect(m),S.lookAt(E),S.far=i.far,S.updateMatrixWorld(),S.projectionMatrix.copy(i.projectionMatrix),B.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),B.multiply(S.projectionMatrix),B.multiply(S.matrixWorldInverse),g.setFromNormalAndCoplanarPoint(m,_),g.applyMatrix4(S.matrixWorldInverse),b.set(g.normal.x,g.normal.y,g.normal.z,g.constant);const r=S.projectionMatrix;C.x=(Math.sign(b.x)+r.elements[8])/r.elements[0],C.y=(Math.sign(b.y)+r.elements[9])/r.elements[5],C.z=-1,C.w=(1+r.elements[10])/r.elements[14],b.multiplyScalar(2/b.dot(C)),r.elements[2]=b.x,r.elements[6]=b.y,r.elements[10]=b.z+1-o,r.elements[14]=b.w,A.setFromMatrixPosition(i.matrixWorld);const s=t.getRenderTarget(),a=t.xr.enabled,l=t.shadowMap.autoUpdate;n.visible=!1,t.xr.enabled=!1,t.shadowMap.autoUpdate=!1,t.setRenderTarget(M),t.state.buffers.depth.setMask(!0),!1===t.autoClear&&t.clear(),t.render(e,S),n.visible=!0,t.xr.enabled=a,t.shadowMap.autoUpdate=l,t.setRenderTarget(s);const c=i.viewport;void 0!==c&&t.state.viewport(c)}}}const A7={id:"water",position:[103.353557,23.362395],hight:0,size:[4e3,4e3],edit:!1},d7=(t,e="")=>new Promise((n=>{let{map:i}=ym,r=Object.assign({},A7,t),o="",s="",a="",l="",c="",u="",h="";function A(){const t=r.position,e=r.elevation,n=[Math.PI/2,0,0],A=eg().MercatorCoordinate.fromLngLat(t,e),d={translateX:A.x,translateY:A.y,translateZ:A.z,rotateX:n[0],rotateY:n[1],rotateZ:n[2],scale:A.meterInMercatorCoordinateUnits()};return c={id:r.id,type:"custom",renderingMode:"3d",onAdd:(t,e)=>{const n=t.getCanvas();o=new nw(50,n.clientWidth/n.clientHeight,1,5e3),s=new jM,a=new DM,a.name="water",s.add(a);let i=p(A,r);const c=new Ab({color:r.color||7706588,opacity:.5,side:Ym,transparent:!0}),d=new Ab;d.wireframe=!0,h=new Vb(i,c),u=new h7(i,{textureWidth:64,textureHeight:64,waterNormals:(new RI).load("/img/waternormals.jpg",(t=>{t.wrapS=t.wrapT=V_})),alpha:.3,side:Ym,sunColor:16777215,waterColor:16777215,distortionScale:3.7,fog:void 0!==s.fog}),u.material.transparent=!0,s.position.y=r.hight,a.add(u),a.add(h),a.rotation.x=-Math.PI/2,l=new HM({canvas:t.getCanvas(),context:e,logarithmicDepthBuffer:!0,antialias:!0}),l.autoClear=!1,l.physicallyCorrectLights=!0,l.setSize(n.clientWidth,n.clientHeight),window.addEventListener("resize",(()=>{l.setSize(n.clientWidth,n.clientHeight),o.aspect=n.clientWidth/n.clientHeight,o.updateProjectionMatrix()}))},render:(t,e)=>{const n=(new Sx).makeRotationAxis(new Jv(1,0,0),d.rotateX),r=(new Sx).makeRotationAxis(new Jv(0,1,0),d.rotateY),a=(new Sx).makeRotationAxis(new Jv(0,0,1),d.rotateZ),c=(new Sx).fromArray(e),h=(new Sx).makeTranslation(d.translateX,d.translateY,d.translateZ).scale(new Jv(d.scale,-d.scale,d.scale)).multiply(n).multiply(r).multiply(a);o.projectionMatrix.elements=e,o.projectionMatrix=c.multiply(h),l.resetState(),l.render(s,o),i.triggerRepaint(),u.material.uniforms["time"].value+=1/60}},c;function p(t,e){if(e.data){var n=[];e.data.features.forEach((e=>{e.geometry.coordinates.forEach((e=>{e.forEach((e=>{let i=eg().MercatorCoordinate.fromLngLat(e,0),r=i.meterInMercatorCoordinateUnits();n.push(new Cv((i.x-t.x)/r,-1*(i.y-t.y)/r))}))}))}));const i=new MT(n),r=f(i);return r}return new mw(e.size[0],e.size[1])}function f(t){const e=new uI(t,{depth:-200,steps:1,bevelEnabled:!1,bevelThickness:0,bevelSize:0,bebelSegments:0,curveSegments:0});return e}}rm(r.id)&&am(r.id),A(),i.addLayer(c,e),n(a)}));i(8499);const p7=(t,e,n,i)=>{const r=e.properties;if(!Array.isArray(t))return console.error("hover-html:入参异常!"),console.log(r),void console.log(t);if(0===t.length)return void console.error("hover-html:入参数组为空!");let o="",s=[];n&&(o+=n),t.forEach((t=>{let e=t.label||"",n=r[t.key];n=n||0===n?n:"-",t.dicData&&t.dicData.length>0&&(n=t.dicData.find((e=>e.value==r[t.key])).label||"-"),t.suffixText&&(n+=t.suffixText),s.push(`<p class="hover-item ${t.customItemClass||""}">\n <span class="label ${t.labelValueClass||""}">${e}:</span>\n <span class="value ${t.customValueClass||""}">${n}</span>\n </p>`)})),s.map((t=>o+=t)),i&&(o+=i),ym.addPopup([e.properties.lgtd,e.properties.lttd],`<div class="xy-hover-html line-height-2">${o}</div>`)};function f7(t,e=!0){return new Promise((n=>{e&&(t=zg(t)),$f.get(`https://restapi.amap.com/v3/geocode/regeo?key=39d46e3fcb4c9740d08e8ecb1f15ff8c&location=${t[0]},${t[1]}&extensions=all`).then((({data:t})=>{if("1"===t.status){let e={formattedAddress:t.regeocode.formatted_address,...t.regeocode.addressComponent};n(e)}}))}))}function g7(){return new Promise((t=>{new AMap.plugin("AMap.Geolocation",(()=>{const e=new AMap.Geolocation({enableHighAccuracy:!0,timeout:1e4,buttonOffset:new AMap.Pixel(10,20),zoomToAccuracy:!0,buttonPosition:"RB"});function n(e){const n={lng:e.position.lng,lat:e.position.lat,formattedAddress:e.formattedAddress,...e.addressComponent};t(n)}function i(t){}e.getCurrentPosition(((t,e)=>{"complete"===t?n(e):i(e)}))}))}))}var m7=function(){var t=this,e=t._self._c;return e("div",{ref:"dom"},[t._t("default")],2)},_7=[],y7={props:{position:{type:Array,default:()=>[]},drag:{type:Boolean,default:!1}},data(){return{}},mounted(){this.createdMarker()},methods:{createdMarker(){let{map:t}=ym,e=this.$refs.dom;const n=new(eg().Marker)(e,{draggable:this.drag}).setLngLat(this.position).addTo(t);this.drag&&n.on("dragend",(()=>{const t=n.getLngLat();this.$emit("dragEnd",t)}))}}},v7=y7;function x7(t,e,n,i,r,o,s,a){var l,c="function"===typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}var b7=x7(v7,m7,_7,!1,null,"35de8978",null),w7=b7.exports,E7=function(){var t=this,e=t._self._c;return e("canvas",{staticClass:"snow",attrs:{id:t.id}},[t._v("不支持canvas")])},C7=[],B7={props:{id:{type:String,default:"rain"},angle:{type:Number,default:-5},status:{type:String,default:"default"},len:{type:Number,default:70},lineWidth:{type:Number,default:1.5},isRain:{type:Boolean,default:!0}},data(){return{timer:"",ctx:null,count:500}},destroyed(){window.clearInterval(this.timer)},mounted(){this.start()},watch:{status(){window.clearInterval(this.timer),this.start()}},methods:{start(){this.$nextTick((()=>{const t=document.getElementById(this.id),e=t.clientWidth,n=t.clientHeight;"small"===this.status&&(this.count=100),"default"===this.status&&(this.count=300),"large"===this.status&&(this.count=1e3),t.width=e,t.height=n,this.ctx=t.getContext("2d"),this.timer=setInterval((()=>{this.isRain?(this.clearCanvas(),this.draws()):this.clearCanvas()}),50)}))},draws(){const t=this,e=document.getElementById(this.id),n=e.clientWidth,i=e.clientHeight;for(let o=1;o<=this.count;o++)r(Math.random()*n,Math.random()*i);function r(e,n){let i=t.ctx,r=i.createLinearGradient(e,n,e+t.angle,5*(n+t.len));r.addColorStop(0,"rgba(255,255,255,0.1)"),r.addColorStop(.5,"rgba(105,105,105,0.3)"),r.addColorStop(1,"rgba(255,255,255,0.5)"),i.strokeStyle=r,i.beginPath(),i.moveTo(e,n),i.lineTo(e+t.angle,n+t.len),i.lineWidth=t.lineWidth,i.stroke(),i.closePath()}},clearCanvas(){const t=document.getElementById(this.id),e=t.clientWidth,n=t.clientHeight;this.ctx.clearRect(0,0,e,n)}}},S7=B7,M7=(i(6872),x7(S7,E7,C7,!1,null,"20664206",null)),T7=M7.exports,I7=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mapLoad flex flex-col flex-align-center",class:{loadOver:!t.show}},[e("img",{staticStyle:{"margin-top":"10%"},attrs:{src:"/img/loading.gif",width:"400"}}),e("div",{staticClass:"text-center",staticStyle:{width:"400px","margin-top":"-90px"}},[e("div",{staticClass:"mb-20"},[t._v("正在努力加载中..."+t._s(t.progress.toFixed(0))+"%")]),e("div",{staticClass:"progress-wrap"},[e("div",{staticClass:"progress-inner"},[e("div",{staticClass:"progress-nums",style:`width: ${t.progress}%`})])])])])},L7=[],P7={props:{loading:{type:Boolean,default:!0},loadTime:{type:Number,default:5e3}},data(){return{progress:0,timer:"",show:!0}},watch:{loading:{handler(t){t||(this.show=!1,this.progress=100,window.clearInterval(this.timer))},immediate:!0}},destroyed(){window.clearInterval(this.timer)},created(){this.timer=setInterval((()=>{this.progress+=3,this.progress>=99&&window.clearInterval(this.timer)}),this.loadTime/30)}},F7=P7,R7=(i(4337),x7(F7,I7,L7,!1,null,"fa3ebcb8",null)),D7=R7.exports,O7=function(){var t=this,e=t._self._c;return e("span",[t.isSlot?e("span",{attrs:{title:t.isFullScreen?"退出全屏":"进入全屏"},on:{click:t.handleFullScreen}},[t._t("default")],2):e("span",{attrs:{title:t.isFullScreen?"退出全屏":"进入全屏"},on:{click:t.handleFullScreen}},[e("i",{staticClass:"el-icon-full-screen mr-5"}),t._v(" "+t._s(t.isFullScreen?"退出全屏":"全屏")+" ")])])},U7=[],N7={props:{isSlot:{type:Boolean,default:!1},dom:{type:String,default:""}},data(){return{isFullScreen:!1}},watch:{isFullScreen(t){this.$emit("change",t)}},methods:{handleFullScreen(){const t=this.dom?document.getElementById(this.dom):document.documentElement;this.isFUllScreenEnabled()?this.hasFullScreenElement()?this.exitFullScreen():this.setFullScreen(t):console.log("此浏览器不支持全屏"),this.listenfullscreen((()=>{this.isFullScreen=this.hasFullScreenElement()}))},isFUllScreenEnabled(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled},hasFullScreenElement(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},setFullScreen(t){t.requestFullscreen&&t.requestFullscreen(),t.webkitRequestFullscreen&&t.webkitRequestFullscreen(),t.mozRequestFullScreen&&t.mozRequestFullScreen(),t.msRequestFullscreen&&t.msRequestFullscreen()},exitFullScreen(){document.exitFullscreen&&document.exitFullscreen(),document.webkitExitFullscreen&&document.webkitExitFullscreen(),document.mozCancelFullScreen&&document.mozCancelFullScreen(),document.msExitFullscreen&&document.msExitFullscreen()},listenfullscreen(t){function e(){t()}document.addEventListener("fullscreenchange",(function(){e()})),document.addEventListener("mozfullscreenchange",(function(){e()})),document.addEventListener("webkitfullscreenchange",(function(){e()})),document.addEventListener("msfullscreenchange",(function(){e()}))}}},k7=N7,z7=(i(3081),x7(k7,O7,U7,!1,null,"0169c56a",null)),Q7=z7.exports,G7=function(){var t=this,e=t._self._c;return e("div",[e("el-radio-group",{attrs:{size:"small"},model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},[e("el-radio-button",{attrs:{label:1}},[t._v("卫星图")]),e("el-radio-button",{attrs:{label:2}},[t._v("矢量图")])],1)],1)},H7=[],V7={props:{type:{type:Number,default:1}},data(){return{radio:1,default:""}},watch:{radio(t){1===t?ym.checkStyle(this.default).then((()=>{this.$emit("checkStyle",t)})):ym.checkStyle("mapbox://styles/mapbox/streets-v11").then((()=>{this.$emit("checkStyle",t)}))}},mounted(){this.radio=this.type,setTimeout((()=>{this.default=ym.map.getStyle()}),1e3)}},j7=V7,Z7=x7(j7,G7,H7,!1,null,"1a040aed",null),W7=Z7.exports,X7=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"tools"},[e("div",{staticClass:"tools-bar flex flex-align-center"},[e("div",{class:{"main-color":"move"===t.type},attrs:{title:"移动"},on:{click:function(e){return t.startDraw("move")}}},[e("i",{staticClass:"el-icon-rank mr-5"}),t._v("移动 ")]),t._l(t.action,(function(n){return e("div",{key:n.type,staticClass:"ml-20",class:{"main-color":n.type===t.type},attrs:{title:n.name,label:n.type},on:{click:function(e){return t.startDraw(n.type)}}},[e("i",{staticClass:"mr-5",class:n.icon}),t._v(t._s(n.name)+" ")])})),t.showDeleteBtn?e("div",{staticClass:"ml-20",attrs:{title:"删除"},on:{click:t.drawDelete}},[e("i",{staticClass:"el-icon-close mr-5"}),t._v("删除 ")]):t._e(),t.showClearBtn?e("div",{staticClass:"ml-20",attrs:{title:"清空"},on:{click:t.clear}},[e("i",{staticClass:"el-icon-delete mr-5"}),t._v("清空")]):t._e(),t.showFullBtn?e("map-full-screen",{staticClass:"ml-20",attrs:{dom:t.fullDom}}):t._e(),e("div",{staticClass:"ml-20 red"},[t._v("* 点击图形编辑")]),t.showMapStyle?e("map-style",{staticClass:"margin-left",on:{checkStyle:t.checkStyle}}):t._e()],2),t.showMoveInput?e("div",{staticClass:"margin-top flex"},[e("div",{staticClass:"flex flex-align-center"},[e("span",{staticClass:"flex-child-noshrink"},[t._v("经度:")]),e("el-input",{attrs:{size:"small",placeholder:"请输入纬度"},model:{value:t.lng,callback:function(e){t.lng=e},expression:"lng"}})],1),e("div",{staticClass:"flex flex-align-center margin-left"},[e("span",{staticClass:"flex-child-noshrink"},[t._v("纬度:")]),e("el-input",{attrs:{size:"small",placeholder:"请输入经度"},model:{value:t.lat,callback:function(e){t.lat=e},expression:"lat"}})],1),e("div",{staticClass:"margin-left"},[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.search}},[t._v("搜索")])],1)]):t._e(),t.uploadShp||t.uploadJson?e("div",{staticClass:"mt-15"},[t.uploadShp?e("shp-file",{attrs:{requireDbf:t.requireDbf},on:{upload:t.getUpload}}):t._e(),t.uploadJson?e("json-file",{attrs:{requireDbf:t.requireDbf},on:{upload:t.getUpload}}):t._e()],1):t._e(),t._t("tools")],2),e("div",{staticClass:"right-fixed"},[t._t("right-fixed")],2)])},K7=[];i(3024);let q7=null,J7={coordinates:[],isAdsorb:!1,properties:{}},Y7={layerId:null,boundP:20},$7=null,ttt=null;const ett=(t={},e=ym.map)=>{$7=e,Y7=Object.assign(Y7,t),Y7.layerId&&(q7||rtt(),$7.on("mousemove",(t=>{if(q7){let e=t.lngLat;J7=ntt([e.lng,e.lat]),q7.setLngLat(J7.coordinates)}})))},ntt=t=>{let e=!1,n=null;if(rm(Y7.layerId)){const r=S(t);var i=$7.project(t);const o=[[i.x-Y7.boundP,i.y-Y7.boundP],[i.x+Y7.boundP,i.y+Y7.boundP]],s=$7.queryRenderedFeatures(o,{layers:[Y7.layerId]});let a,l=1/0;if(s.forEach((t=>{const e=L(t.geometry.coordinates),i=Bi(r,e,{units:"meters"});i<l&&(l=i,a=e,n=t.properties)})),a){const n=_i(a,r);t=n.geometry.coordinates,e=!0}}return{coordinates:t,isAdsorb:e,properties:n}},itt=(t=ttt,e)=>(ttt=t,J7.isAdsorb&&ttt&&e&&(ttt.delete(e.id),e.geometry.coordinates=J7.coordinates,setTimeout((()=>{ttt.add(e)}),300),ttt.changeMode("simple_select",{features:[e]})),ott(),$7.off("mousemove"),J7),rtt=()=>{const t=document.createElement("div");t.className="marker",t.style.backgroundImage="url(/img/marker2.png)",t.style.width="10px",t.style.height="10px",t.style.backgroundSize="100%",q7=new(eg().Marker)(t).setLngLat([0,0]).addTo($7)},ott=()=>{q7&&q7.remove(),q7=null};var stt=function(){var t=this,e=t._self._c;return e("el-button",{staticClass:"upload",attrs:{size:"small",type:"warning"}},[t._v(" JSON上传 "),e("input",{staticClass:"file",attrs:{type:"file",accept:".json"},on:{input:t.getFile}})])},att=[],ltt={data(){return{}},methods:{getFile(t){const e=t.target.files?t.target.files[0]:"";if(e){let n=new FileReader;n.readAsText(e,"UTF-8"),n.onload=e=>{let n=e.target.result;if(n){n=JSON.parse(n),n.features||(n=kg(n));const e=ft(n);if(e.length>0&&e[0]>180)return this.$message.error("不属于WGS84坐标系,请使用其他工具进行数据转换");this.$emit("upload",n),t.target.value=""}}}}}},ctt=ltt,utt=(i(1602),x7(ctt,stt,att,!1,null,"5a5f8c5d",null)),htt=utt.exports,Att=function(){var t=this,e=t._self._c;return e("el-button",{staticClass:"upload",attrs:{size:"small",type:"warning"}},[t._v(" SHP上传 "),e("input",{staticClass:"file",attrs:{type:"file",accept:t.requireDbf?".shp,.dbf":".shp",multiple:t.requireDbf},on:{input:t.getFile}})])},dtt=[];const ptt=i(2388);var ftt={props:{requireDbf:{type:Boolean,default:!0,required:!1}},methods:{readFileAsArrayBuffer(t){return new Promise(((e,n)=>{const i=new FileReader;i.onload=t=>e(t.target.result),i.onerror=n,i.readAsArrayBuffer(t)}))},validateAndProcessGeoJSON(t){if(t.features||(t=kg(t)),!t.features||0==t.features.length)return this.$message.error("当前导入SHP没有数据!"),!1;const e=ft(t);return e.length>0&&e[0]>180?(this.$message.error("不属于WGS84坐标系,请使用其他工具进行数据转换"),!1):(this.$emit("upload",t),!0)},getFile(t){const e=Array.from(t.target.files||[]);if(0===e.length)return;t.target.value="";const n=e.find((t=>t.name.toLowerCase().endsWith(".shp"))),i=e.find((t=>t.name.toLowerCase().endsWith(".dbf")));return n?this.requireDbf&&!i?this.$message.error("请同时上传.dbf文件以获取属性数据"):void(i?this.readWithDbf(n,i):this.readShpOnly(n)):this.$message.error("请上传.shp文件")},readWithDbf(t,e){Promise.all([this.readFileAsArrayBuffer(t),this.readFileAsArrayBuffer(e)]).then((([t,e])=>{ptt.open(t,e,{encoding:"gb2312"}).then((t=>{const e=[],n=()=>t.read().then((t=>{if(!t.done)return e.push(t.value),n();{const t={type:"FeatureCollection",features:e};this.validateAndProcessGeoJSON(t)}}));return n()})).catch((t=>{console.error("读取文件错误:",t),this.$message.error("读取文件失败,请检查文件格式是否正确")}))}))},readShpOnly(t){this.readFileAsArrayBuffer(t).then((t=>{ptt.read(t).then((t=>{this.validateAndProcessGeoJSON(t)})).catch((t=>{console.error("读取文件错误:",t),this.$message.error("读取文件失败,请检查文件格式是否正确")}))}))}}},gtt=ftt,mtt=(i(4965),x7(gtt,Att,dtt,!1,null,"6e60926f",null)),_tt=mtt.exports,ytt={components:{mapFullScreen:Q7,mapStyle:W7,jsonFile:htt,shpFile:_tt},props:{fullDom:{type:String,default:"fullScreen"},list:{type:Array,default:()=>[]},single:{type:Boolean,default:!0},showFullBtn:{type:Boolean,default:!0},showDeleteBtn:{type:Boolean,default:!0},showClearBtn:{type:Boolean,default:!0},showMoveInput:{type:Boolean,default:!0},showMapStyle:{type:Boolean,default:!1},showMarker:{type:Boolean,default:!0},uploadJson:{type:Boolean,default:!1},uploadShp:{type:Boolean,default:!1},requireDbf:{type:Boolean,default:!1},isAdsorb:{type:Boolean,default:!1},adsorbParams:{type:Object,default:()=>{}}},data(){return{type:"move",isEdit:!1,draw:"",activeFeatures:"",lng:"",lat:"",geoJson:"",selectPoint:[]}},computed:{action(){let t=[{id:"point",type:"draw_point",name:"绘制点",icon:"el-icon-coordinate"},{id:"line",type:"draw_line_string",name:"绘制线",icon:"el-icon-arrow-up"},{id:"polygon",type:"draw_polygon",name:"绘制面",icon:"el-icon-house"}],e=this.list.length>0?t.filter((t=>this.list.includes(t.id))):t;return e}},mounted(){},methods:{initDraw(t,e){this.map=t;const n=this.draw=new(xm())(Object.assign({},{displayControlsDefault:!1,controls:{}},e));t.addControl(n),t.on("draw.create",this.drawEnd),t.on("draw.update",this.drawUpdate),t.on("draw.selectionchange",this.select),document.onkeydown=t=>{if(0===this.selectPoint.length||0===this.activeFeatures.length)return;const e=this.activeFeatures[0].geometry.type,n=t.keyCode||t.which||t.charCode;46==n&&(console.log("删除锚点",this.selectPoint,this.activeFeatures[0].geometry.coordinates),this.selectPoint.forEach((t=>{if("Polygon"===e){if(3==this.activeFeatures[0].geometry.coordinates[0].length)return void this.$message.warning("面图层至少绘制3个点,无法删除!");this.activeFeatures[0].geometry.coordinates[0].forEach(((e,n)=>{JSON.stringify(e)===JSON.stringify(t.geometry.coordinates)&&(console.log(e,n),this.activeFeatures[0].geometry.coordinates[0].splice(n,1))}))}else if("LineString"===e){if(2==this.activeFeatures[0].geometry.coordinates.length)return void this.$message.warning("线图层至少绘制2个点,无法删除!");this.activeFeatures[0].geometry.coordinates.forEach(((e,n)=>{JSON.stringify(e)===JSON.stringify(t.geometry.coordinates)&&this.activeFeatures[0].geometry.coordinates.splice(n,1)}))}})),this.updateGeometry(this.activeFeatures[0]),this.$emit("deletePoint",{selectPoint:[...this.selectPoint],data:this.getDraw()}),this.selectPoint=[])}},updateGeometry(t){const e=t.geometry;this.draw.delete(t.id),this.draw.add(e),this.drawUpdate()},getDraw(){const t=this.draw.getAll();return t},startDraw(t){this.type=t,"move"!==t&&(this.single&&this.clear(),console.log("开始绘制"),this.draw.changeMode(t),this.isAdsorb&&ett(this.adsorbParams,this.map),this.$emit("start"))},drawEnd(t){const e=this.getDraw();if(console.log("绘制结束",e),this.type="move",this.geoJson=e,this.isAdsorb){let n=t.features[0];e.lastPosition=itt(this.draw,n)}this.$emit("end",e)},drawUpdate(t){const e=this.getDraw();console.log("修改结束",e),this.geoJson=e,this.$emit("update",e)},drawEdit(t){this.geoJson=t,t.features.forEach((t=>{this.draw.add(t.geometry)}))},drawDelete(){this.activeFeatures&&this.activeFeatures.length>0?this.activeFeatures.forEach((t=>{this.draw.delete(t.id);const e=this.getDraw();e.features&&e.features.length>0?this.$emit("delete",e):this.$emit("clear"),console.log("删除选中对象",this.activeFeatures[0]),this.activeFeatures=[]})):this.$message.warning("未选择删除的对象")},clear(){this.draw&&(this.draw.deleteAll(),this.$emit("clear")),rm("search-marker")&&cm("search-marker",!1)},select(t){t.points&&t.points.length>0&&(console.log("选中锚点",t.points),this.selectPoint=t.points,this.$emit("selectpoint",t)),this.activeFeatures=t.features,console.log("选中对象",this.activeFeatures),this.$emit("select",t.features)},search(){if(!this.lng||!this.lat)return this.$message.error("请输入正确的经纬度信息");this.map.easeTo({center:[this.lng,this.lat]}),this.showMarker&&this.addMarker()},getCenter(){const{lng:t,lat:e}=this.map.getCenter();this.lng=t,this.lat=e},checkStyle(t){this.geoJson&&(this.clear(),this.drawEdit(this.geoJson),this.$emit("checkStyle",t))},addMarker(){const t=[{id:1,name:"当前位置",lnglat:[this.lng,this.lat]}],e=Ug(t,"Point","lnglat");Rm({id:"search-marker",data:e}),rm("search-marker")&&cm("search-marker",!0)},getUpload(t){this.$emit("getUpload",t)}}},vtt=ytt,xtt=(i(9474),x7(vtt,X7,K7,!1,null,"32331762",null)),btt=xtt.exports,wtt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"full-height relative overflow",attrs:{id:"fullScreen"}},[e("div",{staticClass:"full-height",attrs:{id:"map"}}),e("draw-tools",t._b({ref:"draw",attrs:{list:["point"],showMoveInput:!1,showDeleteBtn:!1,isAdsorb:t.isAdsorb},on:{update:t.drawUpdate,end:t.drawUpdate,delete:t.drawUpdate,clear:t.clear}},"draw-tools",t.$attrs,!1),[e("div",{staticClass:"mt-15",attrs:{slot:"tools"},slot:"tools"},[e("div",{staticClass:"flex"},[e("el-input",{staticClass:"full-width margin-right",attrs:{value:t.position.toString(),size:"small",placeholder:"点击地图获取坐标",readonly:""}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.save}},[t._v("保存")])],1),t.address&&t.address.formattedAddress?e("div",{staticClass:"margin-top font-12"},[t._v(" 地址:"+t._s(t.address.formattedAddress)+" ")]):t._e()])])],1)},Ett=[],Ctt={components:{drawTools:btt},props:{config:{type:Object,default:()=>{}},geoData:{type:[Object,String],default:""},lng:{type:[Number,String],default:""},lat:{type:[Number,String],default:""},zoom:{type:Number,default:14},isAdsorb:{type:Boolean,default:!1}},data(){return{geoJson:"",position:"",address:"",lastPosition:""}},watch:{lng(){this.draw()},geoData(){this.draw()}},mounted(){this.init()},methods:{init(){let t=Object.assign({},{accessToken:"pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg",zoom:this.zoom,center:[102.83643451528434,24.81972792178513],is3d:!1},this.config);ym.initMap(t).then((t=>{this.$refs.draw.initDraw(t),this.draw(),this.$emit("map-load")}))},draw(){this.lng&&this.lat?this.geoJson={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"Point",coordinates:[1*this.lng,1*this.lat]},properties:{}}]}:this.geoJson=this.geoData,this.drawUpdate(this.geoJson),this.geoJson&&this.$refs.draw.drawEdit(this.geoJson)},drawUpdate(t){if(!t)return;const e=t.features;this.geoJson=t,e.length>0?(this.position=e[0].geometry.coordinates,this.position=this.position.map((t=>Number(t).toFixed(6))),this.$nextTick((()=>{ym.easeTo(this.position),f7(this.position).then((t=>{this.address=t}))})),this.lastPosition=t.lastPosition):(this.position="",this.address="",this.lastPosition="")},save(){let t={geoJson:this.geoJson,position:this.position,lng:this.position[0],lat:this.position[1],address:this.address,lastPosition:this.lastPosition};this.$emit("save",t)},clear(){this.geoJson="",this.position="",this.address=""}}},Btt=Ctt,Stt=x7(Btt,wtt,Ett,!1,null,null,null),Mtt=Stt.exports,Ttt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"full-height relative overflow",attrs:{id:"fullScreen"}},[e("div",{staticClass:"full-height",attrs:{id:"map"}}),e("draw-tools",t._b({ref:"draw",attrs:{list:["line"],single:t.single,showMoveInput:!1},on:{update:t.drawUpdate,end:t.drawUpdate,delete:t.drawUpdate,clear:t.clear,getUpload:t.getUpload}},"draw-tools",t.$attrs,!1),[e("div",{staticClass:"mt-15 flex flex-wrap",attrs:{slot:"tools"},slot:"tools"},[e("el-input",{staticClass:"flex-child-grow",staticStyle:{width:"300px","margin-right":"10px"},attrs:{value:t.position.toString(),size:"small",placeholder:"点击地图获取坐标",readonly:t.readonly}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.save}},[t._v("保存")]),t._t("default")],2)])],1)},Itt=[],Ltt={components:{drawTools:btt},props:{config:{type:Object,default:()=>{}},readonly:{type:Boolean,default:!1},autoZoom:{type:Boolean,default:!1},single:{type:Boolean,default:!1},geoData:{type:[Object,String],default:""},pointList:{type:[Array,String],default:""}},data(){return{geoJson:"",position:""}},watch:{pointList(){this.draw()},geoData(){this.draw()}},mounted(){this.init()},methods:{init(){let t=Object.assign({},{accessToken:"pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg",center:[102.83643451528434,24.81972792178513],is3d:!1},this.config);ym.initMap(t).then((t=>{this.$refs.draw.initDraw(t),this.draw(),this.$emit("map-load")}))},draw(){if(this.pointList&&this.pointList.length>0){let t=this.pointList.map((t=>({type:"Feature",geometry:{type:"LineString",coordinates:t},properties:{}})));this.geoJson={type:"FeatureCollection",features:t}}else this.geoJson=this.geoData;this.drawUpdate(this.geoJson,!0),this.edit()},edit(){this.geoJson&&this.$refs.draw.drawEdit(this.geoJson)},drawUpdate(t,e=!1){t&&(this.geoJson=t,this.position=t.features.map((t=>t.geometry.coordinates.flat(1/0))),this.position=Jg(2,...this.position),this.position.forEach((t=>{t[0]=Number(t[0]).toFixed(6),t[1]=Number(t[1]).toFixed(6)})),(this.autoZoom||e)&&this.$nextTick((()=>{ym.fitJsonBounds(t,{padding:100})})))},save(){let t={geoJson:this.geoJson,position:this.position};console.log(t),this.$emit("save",t)},clear(){this.geoJson="",this.position=""},getUpload(t){console.log(t),this.$refs.draw.clear(),this.drawUpdate(t,!0),this.edit()}}},Ptt=Ltt,Ftt=x7(Ptt,Ttt,Itt,!1,null,null,null),Rtt=Ftt.exports,Dtt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"full-height relative overflow",attrs:{id:"fullScreen"}},[e("div",{staticClass:"full-height",attrs:{id:"map"}}),e("draw-tools",t._b({ref:"draw",attrs:{list:["polygon"],single:t.single,showMoveInput:!1},on:{update:t.drawUpdate,end:t.drawUpdate,delete:t.drawUpdate,clear:t.clear,getUpload:t.getUpload}},"draw-tools",t.$attrs,!1),[e("div",{staticClass:"mt-15 flex flex-wrap",attrs:{slot:"tools"},slot:"tools"},[e("el-input",{staticClass:"flex-child-grow",staticStyle:{width:"300px","margin-right":"10px"},attrs:{value:t.position.toString(),size:"small",placeholder:"点击地图获取坐标",readonly:t.readonly}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.save}},[t._v("保存")]),t._t("default")],2)])],1)},Ott=[],Utt={components:{drawTools:btt},props:{config:{type:Object,default:()=>{}},single:{type:Boolean,default:!1},autoZoom:{type:Boolean,default:!1},readonly:{type:Boolean,default:!0},geoData:{type:[Object,String],default:""},pointList:{type:[Array,String],default:""}},data(){return{geoJson:"",position:""}},watch:{pointList(){this.draw()},geoData(){this.draw()}},mounted(){this.init()},methods:{init(){let t=Object.assign({},{accessToken:"pk.eyJ1IjoiaGo0NjI3NzEzOTYiLCJhIjoiY2w5YzNjOTZvMDF6NDNwb2d6YmJkYWRpMCJ9.-fW-OChGB1oY2DCMO_c8sg",center:[102.83643451528434,24.81972792178513],is3d:!1},this.config);ym.initMap(t).then((t=>{this.$refs.draw.initDraw(t),this.draw(),this.$emit("map-load")}))},draw(){if(this.pointList&&this.pointList.length>0){let t=this.pointList.map((t=>({type:"Feature",geometry:{type:"Polygon",coordinates:[t]},properties:{}})));this.geoJson={type:"FeatureCollection",features:t}}else this.geoJson=this.geoData;this.drawUpdate(this.geoJson,!0),this.edit()},edit(){this.geoJson&&this.$refs.draw.drawEdit(this.geoJson)},drawUpdate(t,e=!1){t&&(this.geoJson=t,this.position=t.features.map((t=>t.geometry.coordinates.flat(1/0))),this.position=Jg(2,...this.position),this.position.forEach((t=>{t[0]=Number(t[0]).toFixed(6),t[1]=Number(t[1]).toFixed(6)})),(this.autoZoom||e)&&this.$nextTick((()=>{ym.fitJsonBounds(t,{padding:100})})))},save(){let t={geoJson:this.geoJson,position:this.position};console.log(t),this.$emit("save",t)},clear(){this.geoJson="",this.position=""},getUpload(t){console.log(t),this.$refs.draw.clear(),this.drawUpdate(t,!0),this.edit()}}},Ntt=Utt,ktt=x7(Ntt,Dtt,Ott,!1,null,null,null),ztt=ktt.exports;const Qtt={showLayerText:um,setSource:im,hasSource:om,showLayer:cm,hasLayer:rm,removeLayer:am,removeSource:sm,setLayout:hm,setPaint:Am,setFilter:dm,setHigh:pm,getLayerAll:lm},Gtt={addLayerText:bm,addLayerLine:Sm,addLayerLineAnimation:Mm,addLayerPoint:Lm,addDiyPoint:Fm,addFlashPoint:Pm,addLayerImagePoint:Rm,addLayerPolygon:Um,addLayerCircle:km,addCircleAnimate:Gm,addLayerModel:FP,addLayerPipe:DP,addLayerWater:d7,load3DTiles:u7},Htt={toGeoJson:Ug,pointToGeoJson:Ng,loadImage:Vg,ranging:jg,drawArea:Zg,spArray:Jg,clearDraw:Wg,distance:Xg,lineCenter:Kg,polygonCenter:qg,GeoAddress:f7,Geolocation:g7,getElevation:Yg,geometryCollectionToFeatureCollection:kg},Vtt={mapHover:Em,mapClick:wm,changeMapCursor:Cm,mapHoverHtml:p7};var jtt=_["default"]}(),r}()}));
|