@kq_npm/client3d_webgl_vue
Version:
KQGIS Client3D for Vue.js
1 lines • 35.5 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue"),require("@kq_npm/client_common_vue/_utils/gis-utils"),require("@kq_npm/client_common_vue/_utils/util"),require("@kq_npm/client_common_vue/init.js")):"function"==typeof define&&define.amd?define("@kq_npm/client3d_webgl_vue",["vue","@kq_npm/client_common_vue/_utils/gis-utils","@kq_npm/client_common_vue/_utils/util","@kq_npm/client_common_vue/init.js"],t):"object"==typeof exports?exports["@kq_npm/client3d_webgl_vue"]=t(require("vue"),require("@kq_npm/client_common_vue/_utils/gis-utils"),require("@kq_npm/client_common_vue/_utils/util"),require("@kq_npm/client_common_vue/init.js")):e["@kq_npm/client3d_webgl_vue"]=t(e.Vue,e["@kq_npm/client_common_vue/_utils/gis-utils"],e["@kq_npm/client_common_vue/_utils/util"],e["@kq_npm/client_common_vue/init.js"])}(this,(function(e,t,a,n){return function(){"use strict";var o={8764:function(e,t,a){var n=a(3645),o=a.n(n)()((function(e){return e[1]}));o.push([e.id,".gp[data-v-b1608504]{display:flex;flex-direction:column;align-items:flex-start}.gp .palette[data-v-b1608504]{width:257px;height:16px}.gp .csh[data-v-b1608504]{width:257px;height:17.5px;position:relative;cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAATUlEQVQ4T2NkwAH+////HybFyMjIiE0ZVkGQQpBmkB6QGaOaEUHHiByq6CEKCzBcMQLWjCMmcOkBi4NjgSKb8SWS0XjGDB28GYNQrgIAPsNjBG37r7sAAAAASUVORK5CYII=),crosshair !important}",""]),t.Z=o},5445:function(e,t,a){var n=a(3645),o=a.n(n)()((function(e){return e[1]}));o.push([e.id,".cs[data-v-c771bfde]{position:absolute;width:10px;cursor:pointer}.cs[data-v-c771bfde] .kq-color-picker{display:block}.cs[data-v-c771bfde] .kq-color-picker .kq-color-picker__trigger{display:flex;height:8px;width:10px;border:none;border-radius:0}.cs[data-v-c771bfde] .kq-color-picker .kq-color-picker__trigger .kq-color-picker__color{border:none;height:8px;width:10px}.cs[data-v-c771bfde] .kq-color-picker .kq-color-picker__trigger .kq-color-picker__color .kq-color-picker__color-inner{height:8px;width:10px}.cs[data-v-c771bfde] .kq-color-picker .kq-color-picker__trigger .kq-color-picker__color .kq-color-picker__color-inner .kq-color-picker__icon{display:none}.cs[data-v-c771bfde] .kq-color-picker .kq-color-picker__mask{display:none}.cs[data-v-c771bfde] .kq-color-picker:hover:not(.is-disabled) .kq-color-picker__trigger{border:none}.cs[data-v-c771bfde] .kq-color-picker.is-disabled .kq-color-picker__trigger{cursor:pointer}.cs .delete[data-v-c771bfde]{display:none;font-size:12px;line-height:normal;text-align:center;margin-left:-16px}.cs:hover .delete[data-v-c771bfde]{display:block}.cs .arrow[data-v-c771bfde]{width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-bottom:4px solid #d9d9d9}.cs .content[data-v-c771bfde]{height:8px;width:10px;border:1px solid #d9d9d9;box-sizing:border-box}",""]),t.Z=o},3645:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var a=e(t);return t[2]?"@media ".concat(t[2]," {").concat(a,"}"):a})).join("")},t.i=function(e,a,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i<this.length;i++){var l=this[i][0];null!=l&&(o[l]=!0)}for(var r=0;r<e.length;r++){var s=[].concat(e[r]);n&&o[s[0]]||(a&&(s[2]?s[2]="".concat(a," and ").concat(s[2]):s[2]=a),t.push(s))}},t}},3379:function(e,t,a){var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var e={};return function(t){if(void 0===e[t]){var a=document.querySelector(t);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(e){a=null}e[t]=a}return e[t]}}(),l=[];function r(e){for(var t=-1,a=0;a<l.length;a++)if(l[a].identifier===e){t=a;break}return t}function s(e,t){for(var a={},n=[],o=0;o<e.length;o++){var i=e[o],s=t.base?i[0]+t.base:i[0],u=a[s]||0,d="".concat(s," ").concat(u);a[s]=u+1;var c=r(d),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==c?(l[c].references++,l[c].updater(p)):l.push({identifier:d,updater:g(p,t),references:1}),n.push(d)}return n}function u(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=a.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var l=i(e.insert||"head");if(!l)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(t)}return t}var d,c=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function p(e,t,a,n){var o=a?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=c(t,o);else{var i=document.createTextNode(o),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(i,l[t]):e.appendChild(i)}}function h(e,t,a){var n=a.css,o=a.media,i=a.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var m=null,f=0;function g(e,t){var a,n,o;if(t.singleton){var i=f++;a=m||(m=u(t)),n=p.bind(null,a,i,!1),o=p.bind(null,a,i,!0)}else a=u(t),n=h.bind(null,a,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(a)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var a=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<a.length;n++){var o=r(a[n]);l[o].references--}for(var i=s(e,t),u=0;u<a.length;u++){var d=r(a[u]);0===l[d].references&&(l[d].updater(),l.splice(d,1))}a=i}}}},3744:function(e,t){t.Z=(e,t)=>{const a=e.__vccOpts||e;for(const[e,n]of t)a[e]=n;return a}},1705:function(e,t,a){var n=a(9389),o=a(7997),i=a.n(o);n.ElMessage.install=(e,t)=>{i()(e,t),e.component("KqMessage",n.ElMessage)},t.Z=n.ElMessage},8422:function(e){e.exports=require("@element-plus/icons-vue")},348:function(e){e.exports=require("@kq_npm/client_icons_vue")},9389:function(e){e.exports=require("element-plus/dist/index.full.js")},7080:function(e){e.exports=require("vue-i18n/dist/vue-i18n.cjs.js")},7135:function(e){e.exports=t},3458:function(e){e.exports=a},7997:function(e){e.exports=n},1895:function(t){t.exports=e}},i={};function l(e){var t=i[e];if(void 0!==t)return t.exports;var a=i[e]={id:e,exports:{}};return o[e](a,a.exports,l),a.exports}l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,{a:t}),t},l.d=function(e,t){for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.nc=void 0;var r={};return function(){l.r(r),l.d(r,{Heatmap3dViewModel:function(){return o},default:function(){return D}});var e=l(1895),t=l(7135),a=l(3458),n=l(1705);class o{_viewer=null;_options=null;_heatmap=null;_mouseLabel=null;language=null;_heatmap2d=null;_heatmap2dCountLayer=null;heatmapData=null;_heatmapHandler=null;constructor(e,t){this._viewer=e._viewer,this._options=t,this._viewer.scene.globe.depthTestAgainstTerrain=!0,this._mouseLabel=new Cesium.Kq3dHtmlTag(this._viewer,{position:new Cesium.Cartesian3(0,0,0),html:'<div>\n <div class="border-moving">\n <span id="mouse_lonlat" class="append"></span>\n <div class="border-moving-box" style="top:3px;left:3px;bottom:3px;right:3px;">\n <span></span><span></span><span></span><span></span>\n </div></div>\n <div class="guidline">\n <div class="pulse"></div>\n </div>\n </div>',anchor:[0,-138],noEvent:!0,visible:!1});let n=this;this._heatmapHandler=new window.Cesium.ScreenSpaceEventHandler(this._viewer.canvas),this._heatmapHandler.setInputAction((function(e){var t=n._viewer.scene.pickPosition(e.position);if(t){if(!n._heatmap&&!n._heatmap2d)return;if(!n._options.isShow)return;n._mouseLabel.position=t;var o=Cesium.Cartographic.fromCartesian(t),i=Cesium.Math.toDegrees(o.longitude),l=Cesium.Math.toDegrees(o.latitude),r=0;"3D"==n._options.heatmapType?r=String(n._heatmap.getValueAt({lng:i,lat:l})):"2D"==n._options.heatmapType&&(r=String(n._heatmap2d.getValueAt({lng:i,lat:l}))),(0,a.setInnerHtml)(document.getElementById("mouse_lonlat"),`<p>${n.language.longitude||"longitude"}:${i.toFixed(5)}</p><p>${n.language.latitude||"latitude"}:${l.toFixed(5)}</p><p>${n.language.heatValue||"value"}:${r}</p>`),n._mouseLabel.setVisible(!0)}else n._mouseLabel.setVisible(!1)}),Cesium.ScreenSpaceEventType.LEFT_CLICK)}initHeatmap3d(e){this._heatmap=new Cesium.Kq3dHeatmap3D({xField:"lng",yField:"lat",valueField:this._options.valueField||this.language.noSet,radius:this._options.radius,scene:this._viewer.scene,height:this._options.height,heightRatio:this._options.heightRatio,alpha:this._options.transparents,dynamic:this._options.isFollowingPerspective,clampToGround:this._options.isGround,show:"3D"==this._options.heatmapType&&this._options.isShow}),this._options.gradient&&(this._heatmap.gradient=this._options.gradient),this._viewer.scene.primitives.add(this._heatmap),this._heatmap&&this._heatmap.setData(e),this._heatmap&&this._heatmap.readyPromise.then((()=>{this._viewer.camera.flyTo({destination:this._heatmap._rectangle})}))}initHeatmap2d(e){this._heatmap2d=new Cesium.Kq3dHeatmap2D({xField:"lng",yField:"lat",valueField:this._options.valueField||this.language.noSet,canvasWidth:1024,canvasHeight:1024,radius:this._options.radius,blur:1,gradient:this._options.gradient}),this._heatmap2d.setData(e);let t=this._heatmap2d.extent,a=new Cesium.SingleTileImageryProvider({url:this._heatmap2d.toDataURL(),rectangle:Cesium.Rectangle.fromDegrees(t[0],t[1],t[2],t[3])});this._heatmap2dCountLayer=new Cesium.ImageryLayer(a,{alpha:this._options.transparents,show:"2D"==this._options.heatmapType&&this._options.isShow}),this._viewer.imageryLayers.add(this._heatmap2dCountLayer),this._viewer.camera.flyTo({destination:Cesium.Rectangle.fromDegrees(t[0],t[1],t[2],t[3])})}changeHeatmap2d(){this._options.gradient&&(this._heatmap2d.gradient=this._options.gradient),this._options.radius&&(this._heatmap2d.radius=this._options.radius),this._heatmap2dCountLayer&&this._viewer.imageryLayers.remove(this._heatmap2dCountLayer,!0);let e=this._heatmap2d.extent,t=new Cesium.SingleTileImageryProvider({url:this._heatmap2d.toDataURL(),rectangle:Cesium.Rectangle.fromDegrees(e[0],e[1],e[2],e[3])});this._heatmap2dCountLayer=new Cesium.ImageryLayer(t,{alpha:this._options.transparents,show:"2D"==this._options.heatmapType}),this._viewer.imageryLayers.add(this._heatmap2dCountLayer)}setColorArray(e){this._options.gradient=e,this._heatmap&&(this._heatmap.gradient=e),this._heatmap2d&&this.changeHeatmap2d()}paramsChanged(e,t){if(this._options[e]=t,this._heatmap&&this._heatmap2dCountLayer)switch(e){case"heatmapType":this._mouseLabel.setVisible(!1),"3D"==this._options.heatmapType?(this._viewer.scene.highDynamicRange=!1,this._viewer.scene.globe.showGroundAtmosphere=!0,this._heatmap.show=this._options.isShow,this._heatmap2dCountLayer.show=!1):"2D"==this._options.heatmapType&&(this._viewer.scene.highDynamicRange=!0,this._viewer.scene.globe.showGroundAtmosphere=!1,this._heatmap.show=!1,this._heatmap2dCountLayer.show=this._options.isShow);break;case"radius":this._mouseLabel.setVisible(!1),this._heatmap[e]=Number(t),this._heatmap.dynamic&&(this._heatmap.dynamic=!1),this.changeHeatmap2d();break;case"height":this._mouseLabel.setVisible(!1),this._heatmap[e]=Number(t),this._heatmap.dynamic&&(this._heatmap.dynamic=!1);break;case"transparents":this._heatmap.alpha=Number(t),this._heatmap2dCountLayer.alpha=Number(t);break;case"heightRatio":this._mouseLabel.setVisible(!1),this._heatmap.heightRatio=Number(t);break;case"isShow":"3D"==this._options.heatmapType?this._heatmap.show=t:"2D"==this._options.heatmapType&&(this._heatmap2dCountLayer.show=t),this._mouseLabel.setVisible(!1);break;case"isFollowingPerspective":this._heatmap.dynamic=t,this._mouseLabel.setVisible(!1);break;case"isGround":this._heatmap.clampToGround=t,this._mouseLabel.setVisible(!1);break;case"valueField":this.clear(),this.heatmapData&&(this.initHeatmap3d(this.heatmapData),this.initHeatmap2d(this.heatmapData))}}start(){this.clear(),this.heatmapData?(this.initHeatmap3d(this.heatmapData),this.initHeatmap2d(this.heatmapData)):(0,n.Z)({message:this.language.fileTypeMessage+"!",type:"warning",duration:2e3})}clear(){this._mouseLabel.setVisible(!1),this._heatmap&&(this._viewer.scene.primitives.remove(this._heatmap),this._heatmap=null),this._heatmap2d&&(this._heatmap2d=null),this._heatmap2dCountLayer&&this._viewer.imageryLayers.remove(this._heatmap2dCountLayer,!0)}destroy(){this.clear(),this._mouseLabel.destroy(),this._heatmapHandler&&this._heatmapHandler.destroy()}}var i=l(8422),s=l(348),u=l(7080);const d=(t=>((0,e.pushScopeId)("data-v-c771bfde"),t=t(),(0,e.popScopeId)(),t))((()=>(0,e.createElementVNode)("div",{class:"arrow"},null,-1)));var c={__name:"CustomColorPickerSlider",props:["width","color","percentage","id"],emits:["updatePercentage","updateColor","deleteColorSlider"],setup(t,{emit:a}){const n=t,o=n.id,i=(0,e.ref)(n.color),l=n.width-5,r=(0,e.ref)(n.percentage/100*n.width-5),s=(0,e.ref)(!1);let u=0,c=!1,p=0;function h(e){c=!0,u=e.clientX-r.value,p=e.clientX,document.addEventListener("mousemove",m),document.addEventListener("mouseup",f),e.preventDefault()}function m(e){if(c){r.value=Math.min(Math.max(e.clientX-u,-5),l);const t=(r.value+Math.abs(-5))/(l- -5)*100;a("updatePercentage",{percentage:t,id:o})}}function f(e){c&&(c=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",f)),Math.abs(e.clientX-p)>2&&(s.value=!0,setTimeout((function(){s.value=!1}),100))}function g(e){i.value=e,a("updateColor",{color:e,id:o})}function v(){a("deleteColorSlider",{id:o})}function _(e){e.stopPropagation()}return(t,a)=>{const n=(0,e.resolveComponent)("kq-color-picker");return(0,e.openBlock)(),(0,e.createElementBlock)("div",{class:"cs",style:(0,e.normalizeStyle)({left:r.value+"px"}),onMousedown:h,onClick:_},[d,(0,e.createVNode)(n,{modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=e=>i.value=e),onActiveChange:g,disabled:s.value},null,8,["modelValue","disabled"]),(0,e.createElementVNode)("div",{class:"delete",onClick:v},"x")],36)}}},p=l(3379),h=l.n(p),m=l(5445),f={insert:"head",singleton:!1},g=(h()(m.Z,f),m.Z.locals,l(3744));var v=(0,g.Z)(c,[["__scopeId","data-v-c771bfde"]]);const _={class:"gp"};var w={__name:"CustomColorPicker",props:["data"],emits:["color-changed"],setup(t,{emit:n}){const o=t,i=(0,e.ref)(o.data);let l=(0,e.ref)(r());function r(){let e=[];for(let t=0;t<i.value.length;t++){const a=i.value[t];e.push(`${a.color} ${a.percentage}%`)}return`background-image: linear-gradient(90deg, ${e.toString()})`}function s(e){const{percentage:t,id:a}=e;for(let e=0;e<i.value.length;e++)if(i.value[e].id==a){i.value[e].percentage=t;break}i.value.sort(((e,t)=>e.percentage-t.percentage)),l.value=r(),n("color-changed",i.value)}function u(e){const{color:t,id:a}=e;for(let e=0;e<i.value.length;e++)if(i.value[e].id==a){i.value[e].color=t;break}i.value.sort(((e,t)=>e.percentage-t.percentage)),l.value=r(),n("color-changed",i.value)}function d(e){if(i.value.length<=2)return;const{id:t}=e;for(let e=0;e<i.value.length;e++)if(i.value[e].id==t){i.value.splice(e,1);break}l.value=r(),n("color-changed",i.value)}function c(e){i.value.push({id:(0,a.guid)(),color:"#0000FF",percentage:e.offsetX/257*100}),i.value.sort(((e,t)=>e.percentage-t.percentage)),l.value=r(),n("color-changed",i.value)}return(t,a)=>((0,e.openBlock)(),(0,e.createElementBlock)("div",_,[(0,e.createElementVNode)("div",{class:"palette",style:(0,e.normalizeStyle)((0,e.unref)(l))},null,4),(0,e.createElementVNode)("div",{class:"csh",onClick:c},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.value,(t=>((0,e.openBlock)(),(0,e.createBlock)(v,{key:t.id,width:257,color:t.color,id:t.id,percentage:t.percentage,onUpdatePercentage:s,onUpdateColor:u,onDeleteColorSlider:d},null,8,["color","id","percentage"])))),128))])]))}},C=l(8764),x={insert:"head",singleton:!1};h()(C.Z,x),C.Z.locals;var b=(0,g.Z)(w,[["__scopeId","data-v-b1608504"]]);const y={class:"kq3d-heatmap-box"},F={class:"kq3d-heatmap-span"},V={class:"kq3d-heatmap-span"},k={class:"kq3d-heatmap-footer"},N={name:"Kq3dHeatmap"};var D=Object.assign(N,{props:{settingParams:{type:Object},showShadow:{type:Boolean,default:!0},position:[String,Object],showHeaderTemp:{type:Boolean,default:!1},isCollapseHeaderTemp:{type:Boolean,default:!1},headerTempTitle:{type:String},headerTempIcon:{type:[Object,String],default:s.IconHeatMap3D},isRight:{type:Boolean,default:!0}},setup(l,{expose:r}){const d=l,{proxy:c}=(0,e.getCurrentInstance)();let p=(0,e.ref)(""),h=(0,e.ref)(c.$i18n.global.messages[c.$i18n.global.locale].webgl),m=(0,e.ref)([]),f=(0,e.reactive)({collapseValue:d.settingParams&&d.settingParams.collapseValue||(""==(d.settingParams&&d.settingParams.collapseValue)?"":"setting"),dataPath:d.settingParams&&d.settingParams.dataPath||"",heatmapType:d.settingParams&&d.settingParams.heatmapType||"3D",radius:d.settingParams&&d.settingParams.radius||8,minRadius:d.settingParams&&d.settingParams.minRadius||5,maxRadius:d.settingParams&&d.settingParams.maxRadius||100,transparents:d.settingParams&&d.settingParams.transparents||.75,minTransparents:0,maxTransparents:1,height:d.settingParams&&d.settingParams.height||800,minHeight:d.settingParams&&d.settingParams.minHeight||0,maxHeight:d.settingParams&&d.settingParams.minHeight||1e3,heightRatio:d.settingParams&&d.settingParams.heightRatio||2,minHeightRatio:d.settingParams&&d.settingParams.minHeightRatio||.1,maxHeightRatio:d.settingParams&&d.settingParams.maxHeightRatio||10,isShow:d.settingParams&&d.settingParams.isShow||!0,isGround:d.settingParams&&d.settingParams.isGround||!1,isFollowingPerspective:d.settingParams&&d.settingParams.isFollowingPerspective||!0,valueField:d.settingParams&&d.settingParams.valueField||"",colorMode:d.settingParams&&d.settingParams.colorMode||1,colorRamp:d.settingParams&&d.settingParams.colorRamp||0}),g=null,v=(0,e.ref)(null),_=(0,e.ref)(),w=(0,e.ref)(),{locale:C,messages:x}=(0,u.useI18n)(),N=(0,e.ref)(null);N.value=h.value.heatmapTitle,(0,e.watch)((()=>C.value),((e,t)=>{h.value=x.value[e].webgl,N.value=h.value.heatmapTitle,g&&(g.language=h.value)})),(0,e.onMounted)((()=>{(0,a.updatePosition)(v.value,d),(0,e.watch)((()=>d.position),((e,t)=>{(0,a.updatePosition)(v.value,d)})),D(),(0,e.watch)((()=>d.showHeaderTemp),((t,a)=>{(0,e.nextTick)((()=>{D()}))})),p.value=c.$i18n.locale,m.value=[h.value.noSet],f.valueField||(f.valueField=h.value.noSet),t.utils.getWebMap(null,(e=>{if(e&&(g=new o(e,f),g)){g.language=h.value;E.value}}))}));const D=()=>{d.showHeaderTemp&&(_.value=(0,a.createHeaderTemp)(v.value,(0,e.toRefs)(d),w,N))};function B(e){let t=URL.createObjectURL(e.raw);f.dataPath=t}function q(e){switch(g&&g.paramsChanged(e,f[e]),e){case"radius":case"height":f.isFollowingPerspective=!1}}function P(){!function(){if(!f||!f.dataPath)return void(0,n.Z)({message:h.value.fileTypeMessage+"!",type:"warning",duration:2e3});Cesium.Resource.fetchJson(f.dataPath).then((e=>{if(e&&e.features){if(0===e.features.length)return void(0,n.Z)({message:"features "+h.value.noDataMessage+"!",type:"warning",duration:2e3});let t=[],a=[];e.features.forEach((e=>{if(!e.properties||0===Object.keys(e.properties).length)return;let n=function(e){const t=[],a={};for(const n in e){const o=e[n];!isNaN(o)&&o>0&&(t.push(n),a[n]=o)}return{validKeys:t,newObj:a}}(e.properties);a.push(n.validKeys),t.push({lng:e.geometry.coordinates[0],lat:e.geometry.coordinates[1],...n.newObj,noSet:0})}));let o=function(e){if(0===e.length)return[];let t=[...e[0]];for(let a=1;a<e.length;a++)t=t.filter((t=>e[a].includes(t)));return t}(a);m.value=[h.value.noSet].concat(o),g&&(g.heatmapData=t,g.start())}else(0,n.Z)({message:h.value.geojsonTypeMessage+"!",type:"warning",duration:2e3})}))}()}const S=(0,e.ref)([["#F0EDB6","#E0831F","#910909"],["#80FFFF","#2EA7F2","#000068"],["#9999FF","#99FFFF","#FF9999","#FFFF99"],["#9766BF","#C9ADAD","#B5ADDD","#93A9DD","#74A9E1"],["#0000FF","#00FFFF","#00FF00","#FFFF00","#FF0000"],["#814BAB","#821498","#D53448","#FDD944","#FFFFFF"],["#636CEA","#1B1DD5","#BE1C4D","#F79390","#FFFFCC"],["#7FC97F","#BEAED4","#FDC086","#FFFF99","#386CB0","#70027F","#BF5B17"],["#A6CEE3","#1F78B4","#B2DF8A","#33A02C","#FB9A99","#D2212D","#FDBF6F"],["#E41A1C","#377EB8","#4DAF4A","#984EA3","#FF7F00","#FFFF33","#A65628"],["#D73027","#FC8D59","#FEE08B","#FFFFBF","#D9EF8B","#91CF60","#1A9850"],["#D53E4F","#FC8D59","#FEE08B","#FFFFBF","#E6F598","#99D594","#3288BD"],["#D73027","#FC8D59","#FEE090","#FFFFBF","#E0F3F8","#91BFDB","#4575B4"],["#B2182B","#EF8A62","#FDDBC7","#FFFFFF","#E0E0E0","#999999","#4D4D4D"],["#E9F013","#B3B3B3","#408000","#000080","#0D3069","#ABABAB","#FFFCFF"],["#B0B0B0","#0000FF","#00A6FF","#00FF00","#00FFFF","#FF0000","#FFA600","#FF00FF","#0000FF"],["#531DAB","#2F54EB","#40A9FF","#5CDBD3","#B7EB8F","#FFE58F","#FFC069","#FF7A45","#F53B44","#A8071A"]]),T=(0,e.computed)({get(){const e=d.settingParams&&d.settingParams.custom;return e&&0!=e.length?e:L(S.value[f.colorRamp])},set(e){A()}}),E=(0,e.computed)({get(){return 1===f.colorMode?(L(S.value[f.colorRamp]),A()):R(),E.value},set(e){g&&g.setColorArray(e)}});function A(){let e={};T.value.forEach((t=>{e[t.percentage/100]=t.color})),E.value=e}function R(){const e=S.value[f.colorRamp],t=e.length,a=1/t;let n={};for(let o=0;o<t-1;o++)n[a*(o+1)]=e[o];n[1]=e[t-1],E.value={0:"rgba(0, 0, 0, 0)",...n}}function L(e){let t=[];const n=e.length,o=1/(n-1);for(let i=0;i<n;i++)t.push({id:(0,a.guid)(),color:e[i],percentage:i*o*100});return t}function H(e){let t={};for(let a=0;a<e.length;a++)0==e[a].percentage&&(e[a].percentage=1),t[e[a].percentage/100]=e[a].color;E.value={0:"rgba(0, 0, 0, 0)",...t}}function M(e){return`background-image: linear-gradient(90deg, ${e.toString()})`}return(0,e.onBeforeUnmount)((()=>{g&&g.destroy()})),r({}),(t,a)=>{const n=(0,e.resolveComponent)("kq-col"),o=(0,e.resolveComponent)("kq-icon"),r=(0,e.resolveComponent)("kq-button"),u=(0,e.resolveComponent)("kq-upload"),d=(0,e.resolveComponent)("kq-input"),c=(0,e.resolveComponent)("kq-row"),C=(0,e.resolveComponent)("kq-radio"),x=(0,e.resolveComponent)("kq-radio-group"),N=(0,e.resolveComponent)("kq-option"),D=(0,e.resolveComponent)("kq-select"),E=(0,e.resolveComponent)("kq-form-item"),A=(0,e.resolveComponent)("kq-radio-button"),L=(0,e.resolveComponent)("kq-slider"),j=(0,e.resolveComponent)("kq-input-number"),U=(0,e.resolveComponent)("kq-switch"),I=(0,e.resolveComponent)("kq-form"),O=(0,e.resolveComponent)("kq-collapse-item"),G=(0,e.resolveComponent)("kq-collapse");return(0,e.openBlock)(),(0,e.createElementBlock)("section",{class:(0,e.normalizeClass)(["kq3d-heatmap",{"kq-box-shadow":l.showShadow}]),ref_key:"boxRef",ref:v},[l.showHeaderTemp?((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)((0,e.unref)(_)),{key:0,ref_key:"headerTempRef",ref:w},null,512)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",y,[(0,e.createVNode)(c,{class:"rowClass"},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(n,{span:7,class:"colClass"},{default:(0,e.withCtx)((()=>[(0,e.createElementVNode)("span",F,(0,e.toDisplayString)((0,e.unref)(h).dataPath),1)])),_:1}),(0,e.createVNode)(n,{span:17},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(d,{modelValue:(0,e.unref)(f).dataPath,"onUpdate:modelValue":a[0]||(a[0]=t=>(0,e.unref)(f).dataPath=t),onChange:a[1]||(a[1]=e=>q("dataPath")),placeholder:(0,e.unref)(h).videoPathPlace},{append:(0,e.withCtx)((()=>[(0,e.createVNode)(u,{"on-change":B,"auto-upload":!1,"show-file-list":!1,accept:".json"},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(r,null,{default:(0,e.withCtx)((()=>[(0,e.createVNode)(o,{size:16},{default:(0,e.withCtx)((()=>[(0,e.createVNode)((0,e.unref)(s.IconFolder2))])),_:1})])),_:1})])),_:1})])),_:1},8,["modelValue","placeholder"])])),_:1})])),_:1}),(0,e.createVNode)(c,{class:"rowClass"},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(n,{span:7,class:"colClass"},{default:(0,e.withCtx)((()=>[(0,e.createElementVNode)("span",V,(0,e.toDisplayString)((0,e.unref)(h).heatmapType),1)])),_:1}),(0,e.createVNode)(n,{span:17},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(x,{modelValue:(0,e.unref)(f).heatmapType,"onUpdate:modelValue":a[4]||(a[4]=t=>(0,e.unref)(f).heatmapType=t)},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(C,{label:"3D",onChange:a[2]||(a[2]=e=>q("heatmapType"))},{default:(0,e.withCtx)((()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(h).classic3d),1)])),_:1}),(0,e.createVNode)(C,{label:"2D",onChange:a[3]||(a[3]=e=>q("heatmapType"))},{default:(0,e.withCtx)((()=>[(0,e.createTextVNode)("2D")])),_:1})])),_:1},8,["modelValue"])])),_:1})])),_:1}),(0,e.createVNode)(c,{class:"kq3d-heatmap-tip"},{default:(0,e.withCtx)((()=>[(0,e.createElementVNode)("p",null,(0,e.toDisplayString)((0,e.unref)(h).heatmapTips),1)])),_:1}),(0,e.createVNode)(G,{"model-value":(0,e.unref)(f).collapseValue,class:"kq3d-heatmap-collapse"},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(O,{title:(0,e.unref)(h).analysisSettings,name:"setting"},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(I,{"label-width":"zh"===(0,e.unref)(p)?"110px":"130px","label-position":"left"},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(c,null,{default:(0,e.withCtx)((()=>[(0,e.createVNode)(E,{label:(0,e.unref)(h).weightField},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(D,{modelValue:(0,e.unref)(f).valueField,"onUpdate:modelValue":a[5]||(a[5]=t=>(0,e.unref)(f).valueField=t),onChange:a[6]||(a[6]=e=>q("valueField")),style:{width:"100%"}},{default:(0,e.withCtx)((()=>[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)((0,e.unref)(m),((t,a)=>((0,e.openBlock)(),(0,e.createBlock)(N,{key:a,label:t,value:t},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1},8,["label"])])),_:1}),(0,e.createVNode)(c,null,{default:(0,e.withCtx)((()=>[(0,e.createVNode)(E,{label:(0,e.unref)(h).colorScheme},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(c,null,{default:(0,e.withCtx)((()=>[(0,e.createVNode)(n,{style:{"text-align":"left"}},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(x,{modelValue:(0,e.unref)(f).colorMode,"onUpdate:modelValue":a[7]||(a[7]=t=>(0,e.unref)(f).colorMode=t)},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(A,{label:"1"},{default:(0,e.withCtx)((()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(h).preset),1)])),_:1}),(0,e.createVNode)(A,{label:"2"},{default:(0,e.withCtx)((()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(h).customTitle),1)])),_:1})])),_:1},8,["modelValue"])])),_:1})])),_:1})])),_:1},8,["label"])])),_:1}),1==(0,e.unref)(f).colorMode?((0,e.openBlock)(),(0,e.createBlock)(c,{key:0},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(E,{label:(0,e.unref)(h).colorBand},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(c,null,{default:(0,e.withCtx)((()=>[(0,e.createVNode)(n,{style:{"text-align":"left"},class:"heatSelect"},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(D,{style:{width:"100%"},"popper-class":"heat-color-select",modelValue:(0,e.unref)(f).colorRamp,"onUpdate:modelValue":a[8]||(a[8]=t=>(0,e.unref)(f).colorRamp=t),onChange:R},{prefix:(0,e.withCtx)((()=>[(0,e.createElementVNode)("div",{class:"color-ramp",style:(0,e.normalizeStyle)(M(S.value[(0,e.unref)(f).colorRamp]))},null,4)])),default:(0,e.withCtx)((()=>[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(S.value,((t,a)=>((0,e.openBlock)(),(0,e.createBlock)(N,{class:"color-option",key:a,value:a},{default:(0,e.withCtx)((()=>[(0,e.createElementVNode)("div",{class:"color-ramp",style:(0,e.normalizeStyle)(M(t))},null,4),(0,e.createVNode)(o,{class:"reverse",onClick:(0,e.withModifiers)((e=>(t.reverse(),void R())),["stop"])},{default:(0,e.withCtx)((()=>[(0,e.createVNode)((0,e.unref)(i.Switch))])),_:2},1032,["onClick"])])),_:2},1032,["value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1})])),_:1},8,["label"])])),_:1})):(0,e.createCommentVNode)("v-if",!0),2==(0,e.unref)(f).colorMode?((0,e.openBlock)(),(0,e.createBlock)(c,{key:1},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(E,{label:(0,e.unref)(h).colorBand},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(c,null,{default:(0,e.withCtx)((()=>[(0,e.createVNode)(n,{style:{"text-align":"left"}},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(b,{data:T.value,onColorChanged:H},null,8,["data"])])),_:1})])),_:1})])),_:1},8,["label"])])),_:1})):(0,e.createCommentVNode)("v-if",!0),(0,e.createVNode)(c,null,{default:(0,e.withCtx)((()=>[(0,e.createVNode)(E,{label:(0,e.unref)(h).radius+"(m)"},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(c,{style:{display:"flex"}},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(n,{span:16},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(L,{modelValue:(0,e.unref)(f).radius,"onUpdate:modelValue":a[9]||(a[9]=t=>(0,e.unref)(f).radius=t),step:.1,min:(0,e.unref)(f).minRadius,max:(0,e.unref)(f).maxRadius,onChange:a[10]||(a[10]=e=>q("radius"))},null,8,["modelValue","step","min","max"])])),_:1}),(0,e.createVNode)(n,{span:8},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(j,{modelValue:(0,e.unref)(f).radius,"onUpdate:modelValue":a[11]||(a[11]=t=>(0,e.unref)(f).radius=t),min:(0,e.unref)(f).minRadius,max:(0,e.unref)(f).maxRadius,step:.1,onChange:a[12]||(a[12]=e=>q("radius")),"controls-position":"right"},null,8,["modelValue","min","max","step"])])),_:1})])),_:1})])),_:1},8,["label"])])),_:1}),(0,e.createVNode)(c,null,{default:(0,e.withCtx)((()=>[(0,e.createVNode)(E,{label:(0,e.unref)(h).transparents},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(c,{style:{display:"flex"}},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(n,{span:16},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(L,{modelValue:(0,e.unref)(f).transparents,"onUpdate:modelValue":a[13]||(a[13]=t=>(0,e.unref)(f).transparents=t),step:.01,min:(0,e.unref)(f).minTransparents,max:(0,e.unref)(f).maxTransparents,onChange:a[14]||(a[14]=e=>q("transparents"))},null,8,["modelValue","step","min","max"])])),_:1}),(0,e.createVNode)(n,{span:8},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(j,{modelValue:(0,e.unref)(f).transparents,"onUpdate:modelValue":a[15]||(a[15]=t=>(0,e.unref)(f).transparents=t),min:(0,e.unref)(f).minTransparents,max:(0,e.unref)(f).maxTransparents,step:.01,onChange:a[16]||(a[16]=e=>q("transparents")),"controls-position":"right"},null,8,["modelValue","min","max","step"])])),_:1})])),_:1})])),_:1},8,["label"])])),_:1}),(0,e.withDirectives)((0,e.createVNode)(c,null,{default:(0,e.withCtx)((()=>[(0,e.createVNode)(E,{label:(0,e.unref)(h).height+"(m)"},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(c,{style:{display:"flex"}},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(n,{span:16},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(L,{modelValue:(0,e.unref)(f).height,"onUpdate:modelValue":a[17]||(a[17]=t=>(0,e.unref)(f).height=t),step:1,min:(0,e.unref)(f).minHeight,max:(0,e.unref)(f).maxHeight,onChange:a[18]||(a[18]=e=>q("height"))},null,8,["modelValue","min","max"])])),_:1}),(0,e.createVNode)(n,{span:8},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(j,{modelValue:(0,e.unref)(f).height,"onUpdate:modelValue":a[19]||(a[19]=t=>(0,e.unref)(f).height=t),min:(0,e.unref)(f).minHeight,max:(0,e.unref)(f).maxHeight,step:1,onChange:a[20]||(a[20]=e=>q("height")),"controls-position":"right"},null,8,["modelValue","min","max"])])),_:1})])),_:1})])),_:1},8,["label"])])),_:1},512),[[e.vShow,"3D"===(0,e.unref)(f).heatmapType]]),(0,e.withDirectives)((0,e.createVNode)(c,null,{default:(0,e.withCtx)((()=>[(0,e.createVNode)(E,{label:(0,e.unref)(h).heightRatio},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(c,{style:{display:"flex"}},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(n,{span:16},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(L,{modelValue:(0,e.unref)(f).heightRatio,"onUpdate:modelValue":a[21]||(a[21]=t=>(0,e.unref)(f).heightRatio=t),step:.1,min:(0,e.unref)(f).minHeightRatio,max:(0,e.unref)(f).maxHeightRatio,onChange:a[22]||(a[22]=e=>q("heightRatio"))},null,8,["modelValue","step","min","max"])])),_:1}),(0,e.createVNode)(n,{span:8},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(j,{modelValue:(0,e.unref)(f).heightRatio,"onUpdate:modelValue":a[23]||(a[23]=t=>(0,e.unref)(f).heightRatio=t),min:(0,e.unref)(f).minHeightRatio,max:(0,e.unref)(f).maxHeightRatio,step:.1,onChange:a[24]||(a[24]=e=>q("heightRatio")),"controls-position":"right"},null,8,["modelValue","min","max","step"])])),_:1})])),_:1})])),_:1},8,["label"])])),_:1},512),[[e.vShow,"3D"===(0,e.unref)(f).heatmapType]]),(0,e.createVNode)(c,null,{default:(0,e.withCtx)((()=>[(0,e.createVNode)(E,{label:(0,e.unref)(h).isShow},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(c,{style:{display:"flex"}},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(n,{style:{"text-align":"left"}},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(U,{modelValue:(0,e.unref)(f).isShow,"onUpdate:modelValue":a[25]||(a[25]=t=>(0,e.unref)(f).isShow=t),onChange:a[26]||(a[26]=e=>q("isShow"))},null,8,["modelValue"])])),_:1})])),_:1})])),_:1},8,["label"])])),_:1}),(0,e.withDirectives)((0,e.createVNode)(c,null,{default:(0,e.withCtx)((()=>[(0,e.createVNode)(E,{label:(0,e.unref)(h).isGround},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(c,{style:{display:"flex"}},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(n,{style:{"text-align":"left"}},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(U,{modelValue:(0,e.unref)(f).isGround,"onUpdate:modelValue":a[27]||(a[27]=t=>(0,e.unref)(f).isGround=t),onChange:a[28]||(a[28]=e=>q("isGround"))},null,8,["modelValue"])])),_:1})])),_:1})])),_:1},8,["label"])])),_:1},512),[[e.vShow,"3D"===(0,e.unref)(f).heatmapType]]),(0,e.withDirectives)((0,e.createVNode)(c,null,{default:(0,e.withCtx)((()=>[(0,e.createVNode)(E,{label:(0,e.unref)(h).isFollowingPerspective},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(c,{style:{display:"flex"}},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(n,{style:{"text-align":"left"}},{default:(0,e.withCtx)((()=>[(0,e.createVNode)(U,{modelValue:(0,e.unref)(f).isFollowingPerspective,"onUpdate:modelValue":a[29]||(a[29]=t=>(0,e.unref)(f).isFollowingPerspective=t),onChange:a[30]||(a[30]=e=>q("isFollowingPerspective"))},null,8,["modelValue"])])),_:1})])),_:1})])),_:1},8,["label"])])),_:1},512),[[e.vShow,"3D"===(0,e.unref)(f).heatmapType]])])),_:1},8,["label-width"])])),_:1},8,["title"])])),_:1},8,["model-value"]),(0,e.createElementVNode)("div",k,[(0,e.createVNode)(r,{onClick:a[31]||(a[31]=(0,e.withModifiers)((e=>P()),["stop"])),title:(0,e.unref)(h).heatmapLoad,type:"primary"},{default:(0,e.withCtx)((()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(h).heatmapLoad),1)])),_:1},8,["title"]),(0,e.createVNode)(r,{onClick:a[32]||(a[32]=(0,e.withModifiers)((e=>{g&&g.clear()}),["stop"])),title:(0,e.unref)(h).clearResult},{default:(0,e.withCtx)((()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(h).clearResult),1)])),_:1},8,["title"])])])],2)}}}),B=l(7997),q=l.n(B);D.install=(e,t)=>{q()(e,t),e.component(D.name,D)}}(),r}()}));