cesium_dev_kit 1.0.68 → 1.0.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,5 +1,5 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("libgif"),require("@turf/turf"),require("dat.gui"),require("echarts")):"function"==typeof define&&define.amd?define(["exports","libgif","@turf/turf","dat.gui","echarts"],e):e((t=t||self).cesium_dev_kit={},t.SuperGif,t.turf,t.dat,t.echarts)}(this,function(R,l,X,c,u){"use strict";l=l&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l,u=u&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u;let o=null;class N{constructor(t){o=t,this.init_data()}init_data(){this.viewer=null}init({containerId:t,viewerConfig:e,extraConfig:i,MapImageryList:n}){let a=new o.SingleTileImageryProvider({url:"https://mapv-data.oss-cn-hangzhou.aliyuncs.com/Cesium-1.82-hawk/background.png"});var r={imageryProvider:a=0!==n.length?this.setOneimageryProvider(n[0]):a,contextOptions:{webgl:{alpha:!1}},animation:!1,timeline:!1,fullscreenButton:!1,geocoder:!1,homeButton:!1,selectionIndicator:!1,shadow:!0,sceneMode:o.SceneMode.SCENE3D,infoBox:!1,sceneModePicker:!1,navigationHelpButton:!1,projectionPicker:!1,baseLayerPicker:!1,shouldAnimate:!0,navigation:!1,showRenderLoopErrors:!0},r=Object.assign(r,e),e=new o.Viewer(t,r);return i.logo||(e.cesiumWidget.creditContainer.style.display="none"),i.depthTest&&(e.scene.globe.depthTestAgainstTerrain=!0),this.setConfigMapList(e,n),this.removeJagged(e),this.viewer=e}setOneimageryProvider(t){var e;return t.classConfig.customTags&&(t.classConfig.customTags=(e="("+t.classConfig.customTags+")",new Function("return "+e)())),new o[t.type](t.classConfig)}setConfigMapList(n,t){const i=n.imageryLayers;t.some((t,e)=>{if(0===e)return!1;i.addImageryProvider(this.setOneimageryProvider(t))}),t.some((e,t)=>{const i=n.imageryLayers.get(t);e.interfaceConfig&&Object.getOwnPropertyNames(e.interfaceConfig).forEach(function(t){i[t]=e.interfaceConfig[t]}),i.invertColor=e.invertswitch,i.filterRGB=[255,255,255],"#000000"!==e.filterRGB&&"#ffffff"!==e.filterRGB&&(i.filterRGB=function(e){let i=e.toLowerCase();if(/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(i)){if(4===i.length){let e="#";for(let t=1;t<4;t+=1)e+=i.slice(t,t+1).concat(i.slice(t,t+1));i=e}const e=[];for(let t=1;t<7;t+=2)e.push(parseInt("0x"+i.slice(t,t+2)));return e}return[]}(e.filterRGB));t=e.offset.split(",");if(2===t.length)try{const n=[parseFloat(t[0]),parseFloat(t[1])];i._imageryProvider._tilingScheme._rectangleNortheastInMeters.x+=n[0],i._imageryProvider._tilingScheme._rectangleNortheastInMeters.y+=n[1]}catch(t){console.log(t)}this.changeImageryProviderColors(n,i)})}removeJagged(e){if(e.scene.postProcessStages.fxaa.enabled=!1,e.scene.fxaa=!1,e.cesiumWidget._supportsImageRenderingPixelated){let t=window.devicePixelRatio;for(;2<=t;)t/=2;e.resolutionScale=t}}changeImageryProviderColors(t,i){var n=t.scene.globe._surfaceShaderSet.baseFragmentShaderSource.sources;for(let e=0;e<n.length;e++){var a=n[e],r="color = czm_saturation(color, textureSaturation);\n#endif\n";let t="color = czm_saturation(color, textureSaturation);\n#endif\n";i.invertColor&&(t=(t+="\n color.r = 1.0 - color.r;\n color.g = 1.0 - color.g;\n color.b = 1.0 - color.b;\n ")+`
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("libgif"),require("@turf/turf"),require("dat.gui"),require("echarts")):"function"==typeof define&&define.amd?define(["exports","libgif","@turf/turf","dat.gui","echarts"],e):e((t=t||self).cesium_dev_kit={},t.SuperGif,t.turf,t.dat,t.echarts)}(this,function(R,l,T,c,x){"use strict";l=l&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l,x=x&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x;let o=null;class N{constructor(t){o=t,this.init_data()}init_data(){this.viewer=null}init({containerId:t,viewerConfig:e,extraConfig:i,MapImageryList:n}){let a=new o.SingleTileImageryProvider({url:"https://mapv-data.oss-cn-hangzhou.aliyuncs.com/Cesium-1.82-hawk/background.png"});var r={imageryProvider:a=0!==n.length?this.setOneimageryProvider(n[0]):a,contextOptions:{webgl:{alpha:!1}},animation:!1,timeline:!1,fullscreenButton:!1,geocoder:!1,homeButton:!1,selectionIndicator:!1,shadow:!0,sceneMode:o.SceneMode.SCENE3D,infoBox:!1,sceneModePicker:!1,navigationHelpButton:!1,projectionPicker:!1,baseLayerPicker:!1,shouldAnimate:!0,navigation:!1,showRenderLoopErrors:!0},r=Object.assign(r,e),e=new o.Viewer(t,r);return i.logo||(e.cesiumWidget.creditContainer.style.display="none"),i.depthTest&&(e.scene.globe.depthTestAgainstTerrain=!0),this.setConfigMapList(e,n),this.removeJagged(e),this.viewer=e}setOneimageryProvider(t){var e;return t.classConfig.customTags&&(t.classConfig.customTags=(e="("+t.classConfig.customTags+")",new Function("return "+e)())),new o[t.type](t.classConfig)}setConfigMapList(n,t){const i=n.imageryLayers;t.some((t,e)=>{if(0===e)return!1;i.addImageryProvider(this.setOneimageryProvider(t))}),t.some((e,t)=>{const i=n.imageryLayers.get(t);e.interfaceConfig&&Object.getOwnPropertyNames(e.interfaceConfig).forEach(function(t){i[t]=e.interfaceConfig[t]}),i.invertColor=e.invertswitch,i.filterRGB=[255,255,255],"#000000"!==e.filterRGB&&"#ffffff"!==e.filterRGB&&(i.filterRGB=function(e){let i=e.toLowerCase();if(/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(i)){if(4===i.length){let e="#";for(let t=1;t<4;t+=1)e+=i.slice(t,t+1).concat(i.slice(t,t+1));i=e}const e=[];for(let t=1;t<7;t+=2)e.push(parseInt("0x"+i.slice(t,t+2)));return e}return[]}(e.filterRGB));t=e.offset.split(",");if(2===t.length)try{const n=[parseFloat(t[0]),parseFloat(t[1])];i._imageryProvider._tilingScheme._rectangleNortheastInMeters.x+=n[0],i._imageryProvider._tilingScheme._rectangleNortheastInMeters.y+=n[1]}catch(t){console.log(t)}this.changeImageryProviderColors(n,i)})}removeJagged(e){if(e.scene.postProcessStages.fxaa.enabled=!1,e.scene.fxaa=!1,e.cesiumWidget._supportsImageRenderingPixelated){let t=window.devicePixelRatio;for(;2<=t;)t/=2;e.resolutionScale=t}}changeImageryProviderColors(t,i){var n=t.scene.globe._surfaceShaderSet.baseFragmentShaderSource.sources;for(let e=0;e<n.length;e++){var a=n[e],r="color = czm_saturation(color, textureSaturation);\n#endif\n";let t="color = czm_saturation(color, textureSaturation);\n#endif\n";i.invertColor&&(t=(t+="\n color.r = 1.0 - color.r;\n color.g = 1.0 - color.g;\n color.b = 1.0 - color.b;\n ")+`
2
2
  color.r = color.r * ${i.filterRGB[0]}.0/255.0;
3
3
  color.g = color.g * ${i.filterRGB[1]}.0/255.0;
4
4
  color.b = color.b * ${i.filterRGB[2]}.0/255.0;
5
- `),-1!==a.indexOf(r)&&(n[e]=n[e].replace(r,t))}}getCurCenterlonLat(t){t=t.camera.pickEllipsoid(new o.Cartesian2(t.canvas.clientWidth/2,t.canvas.clientHeight/2)),t=o.Ellipsoid.WGS84.cartesianToCartographic(t);return{lon:180*t.longitude/Math.PI,lat:180*t.latitude/Math.PI}}}let d=null;function y(t,e,i){t&&(d=e,this._graphicsLayer=new d.CustomDataSource("graphicsLayer"),t)&&t.dataSources.add(this._graphicsLayer)}y.prototype={getPointGraphics:function(t){if(t=t||{})return new d.PointGraphics({color:t.color||d.Color.GREEN,pixelSize:t.pixelSize||5,outlineColor:t.outlineColor||d.Color.WHITE,outlineWidth:t.outlineWidth||1})},getLineGraphics:function(t){if((t=t||{})&&t.positions)return new d.PolylineGraphics({show:!0,positions:t.positions,material:t.material||d.Color.YELLOW,width:t.width||1,clampToGround:t.clampToGround||!1})},getPolygonGraphics:function(t){if((t=t||{})&&t.positions)return new d.PolygonGraphics({hierarchy:{positions:t.positions},material:t.material||d.Color.RED.withAlpha(.2),clampToGround:t.clampToGround||!1})},getLabelGraphics:function(t){if((t=t||{})&&t.l_text)return new d.LabelGraphics({text:t.l_text,font:t.l_font||"14px sans-serif",fillColor:t.l_fillColor||d.Color.GOLD,style:t.l_style||d.LabelStyle.FILL_AND_OUTLINE,outlineWidth:t.l_outlineWidth||2,showBackground:t.l_showBackground||!1,backgroundColor:t.l_backgroundColor||new d.Color(.165,.165,.165,.8),verticalOrigin:t.l_verticalOrigin||d.VerticalOrigin.BOTTOM,pixelOffset:t.l_pixelOffset||new d.Cartesian2(0,-30)})},getBillboardGraphics:function(t){if((t=t||{})&&t.b_img)return new d.BillboardGraphics({image:t.b_img,width:t.b_width||35,height:t.b_height||35,clampToGround:t.b_clampToGround||!0,scale:t.b_scale||1,pixelOffset:t.b_pixelOffset||new d.Cartesian2(0,-20),scaleByDistance:t.b_scaleByDistance||void 0})},getPathGraphics:function(t){if(t=t||{})return new d.PathGraphics({resolution:t.resolution||1,material:new d.PolylineGlowMaterialProperty({glowPower:t.glowPower||.1,color:t.color||d.Color.YELLOW}),width:t.width||30})},getModelGraphics:function(t){if(t=t||{})return new d.ModelGraphics({uri:t.m_url||t.url,scale:t.m_scale||t.scale||10,clampAnimations:!0})},getEllipseGraphics:function(t){if(t=t||{})return new d.EllipseGraphics({semiMajorAxis:t.e_semiMinorAxis||1e6,semiMinorAxis:t.e_semiMinorAxis||1e6,metarial:t.e_metarial||d.Color.RED.withAlpha(.5),outline:t.e_outline||!0})},getEllipsoidGraphics:function(t){var e;if(t=t||{})return e=t.radii||1e6,new d.EllipsoidGraphics({radii:new d.Cartesian3(e,e,e),maximumCone:t.maximumCone||d.Math.PI_OVER_TWO,stackPartitions:t.stackPartitions||56,slicePartitions:t.slicePartitions||56,outlineWidth:t.outlineWidth||2,outlineColor:t.outlineColor||d.Color.YELLOW,outline:t.outline||!0,fill:t.fill||!0,material:t.material||d.Color.RED.withAlpha(.1)})},getBoxGraphics:function(t){if(t=t||{show:!0,outline:!1,fill:!0})return new d.BoxGraphics({show:t.show,fill:t.fill,dimensions:t.dimensions||new d.Cartesian3(0,0,0),material:t.material,outline:t.outline,outlineColor:t.outlineColor||d.Color.BLACK,distanceDisplayCondition:t.distanceDisplayCondition||void 0})},getPlaneGraphics:function(t){if(t=t||{})return new d.PlaneGraphics({plane:t.plane||new d.Plane(d.Cartesian3.UNIT_Y,0),dimensions:t.dimensions||new d.Cartesian2(170,130),material:t.material||d.Color.BLUE})},getCylinderGraphics:function(t){if(t=t||{})return new d.CylinderGraphics({HeightReference:d.HeightReference.RELATIVE_TO_GROUND,length:t.length||250,topRadius:t.topRadius||0,bottomRadius:t.bottomRadius||0,material:t.material||new d.Color(0,1,1,.4),slices:t.slices||128})},createPointsGraphics:function(t){if(t&&t.positions){var e,i=[];for(e in t.positions){var n=t.positions[e],a=this.createGraphics();a.name=t.name||"",a.oid=t.oid||"point",a.position=n,t.point&&(a.point=this.getPointGraphics()),t.billboard&&(a.billboard=this.getBillboardGraphics(t.billboard)),t.label&&(a.label=this.getLabelGraphics(t.label)),i.push(this._graphicsLayer.entities.add(a))}return i}},createLineGraphics:function(t){var e;if(t&&t.positions)return(e=this.createGraphics()).name=t.name||"",e.oid=t.oid||"line",e.position=t.positions,e.polyline=this.getLineGraphics(t),this._graphicsLayer.entities.add(e)},createPolygonGraphics:function(t){var e;if(t=t||{})return(e=this.createGraphics()).polygon=this.getPolygonGraphics(t),e.clampToS3M=t.clampToS3M||!1,this._graphicsLayer.entities.add(e)},createBoxGraphics:function(t){var e;if(t=t||{})return(e=this.createGraphics()).position=t.position,e.name=t.name||"box_graphic",e.box=this.getBoxGraphics(t.box),this._graphicsLayer.entities.add(e)},createModelGraphics:function(t){var e;if(t&&t.position)return(e=this.createGraphics()).model=this.getModelGraphics(t),e.position=t.position,this._graphicsLayer.entities.add(e)},craeteCorridorGraphics:function(t){var e;if(t&&t.positions)return(e=this.createGraphics()).corridor={positions:t.positions,height:t.height||6,width:t.width||15,material:t.material||new d.Scene.WarnLinkMaterialProperty({freely:"cross",color:d.Color.YELLOW,duration:1e3,count:1,direction:"+"})},this._graphicsLayer.entities.add(e)},craeteDynamicPolyLineGraphics:function(t){var e;if(t&&t.positions)return(e=this.createGraphics()).polyline={show:!0,positions:[],material:t.material||d.Color.CHARTREUSE,width:t.width||5,clampToGround:t.clampToGround||!1},e.polyline.positions=new d.CallbackProperty(function(){return t.positions},!1),this._graphicsLayer.entities.add(e)},craeteDynamicCylinderGraphics:function(t){var i,n,e={};if(t&&t.cylinder)return i=t.entity,t=t.cylinder,e.cylinder=(n=this).getCylinderGraphics(t),e.position=new d.CallbackProperty(function(){var t=i.position.getValue(n._viewer.clock.currentTime),t=n._viewer.scene.globe.ellipsoid.cartesianToCartographic(t),e=d.Math.toDegrees(t.latitude),t=d.Math.toDegrees(t.longitude);return d.Cartesian3.fromDegrees(t,e,0)},!1),e.cylinder.length=new d.CallbackProperty(function(){var t=i.position.getValue(n._viewer.clock.currentTime);return 2*n._viewer.scene.globe.ellipsoid.cartesianToCartographic(t).height},!1),e},createFadeCylinderGraphics:function(t){var e;if((t=t||{})&&t.position)return(e=this.createGraphics()).position=t.position,t.material=new d.Scene.CircleFadeMaterialProperty({color:t.color||d.Color.fromCssColorString("#02ff00"),duration:t.duration||2e3}),e.cylinder=this.getCylinderGraphics(t),this._drawLayer.entities.add(e)},craeteRotateCylinderGraphics:function(t){var e;if(t&&t.position)return(e=this.createGraphics()).cylinder={HeightReference:d.HeightReference.RELATIVE_TO_GROUND,length:t.length||500,topRadius:t.topRadius||500,bottomRadius:t.bottomRadius||500,material:t.material||new d.ImageMaterialProperty({image:t.img||this.getDfSt(["graphic","craeteRotateCylinderGraphics"])||"static/data/images/file/cc2.png",transparent:!0,repeat:{x:1,y:-1}}),slices:t.slices||128},e.position=t.position,this.setGraphicsRotate({entity:e,position:this.transformCartesianToWGS84(t.position),rotateAmount:4}),this._graphicsLayer.entities.add(e)},craeteDynamicBlinkCircleGraphics:function(t){var e,i,n;if(t&&t.position)return e=this.createGraphics(),i=t.alp||1,n=t.flog||!0,e.position=t.position,e.ellipse={semiMinorAxis:t.semiMinorAxis||2e3,semiMajorAxis:t.semiMajorAxis||2e3,height:t.height||10,material:new d.ColorMaterialProperty(new d.CallbackProperty(function(){return n?(i-=.05)<=0&&(n=!1):1<=(i+=.05)&&(n=!0),d.Color.RED.withAlpha(i)},!1))},this._graphicsLayer.entities.add(e)},craeteDynamicCricleGraphics:function(i){if(i&&i.center){var n=this.createGraphics(),a=this,r=i.center,o=i.radius||800,s=i.rotateAmount||.05,l=0,c=i.height||1,h=i.scale||null,x=i.scale2||null,i=i.material||new d.ImageMaterialProperty({image:i.imge||this.getDfSt(["graphic","craeteDynamicCricleGraphics"])||"static/data/images/Textures/circle_bg.png",transparent:!0});n.position=new d.CallbackProperty(function(){return a.transformWGS84ToCartesian(r)},!1),n.orientation=new d.CallbackProperty(function(){return d.Transforms.headingPitchRollQuaternion(a.transformWGS84ToCartesian(r),new d.HeadingPitchRoll(d.Math.toRadians(0),d.Math.toRadians(0),d.Math.toRadians(0)))},!1);let t=o,e=!1;return n.ellipse={material:i,height:c,semiMajorAxis:new d.CallbackProperty(function(){return o},!1),semiMinorAxis:new d.CallbackProperty(function(){return o},!1),stRotation:new d.CallbackProperty(function(){return 0<s&&360<=(l+=s)&&(l=0),h&&((e=h<=o||o<=t?!e:e)?o+=2:o-=2),x&&(o<=x?o+=2:o=t),l},!1)},this._graphicsLayer.entities.add(n)}},craeteDynamicShadeWallGraphics:function(t){var e,i,n,a,r;if(t&&t.positions)return e=t.alp||1,i=t.num||20,n=t.color||d.Color.RED,a=t.speed||.003,(r=this.createGraphics()).wall={positions:t.positions,material:new d.ImageMaterialProperty({image:t.img||this.getDfSt(["graphic","craeteDynamicShadeWallGraphics"])||"static/data/images/Textures/fence.png",transparent:!0,color:new d.CallbackProperty(function(){return i%2==0?e-=a:e+=a,(e<=.1||1<=e)&&i++,n.withAlpha(e)},!1)})},this._graphicsLayer.entities.add(r)},createCustomDefBillboardGraphics:function(e){if(e&&e.position){var i=this,n=document.createElement("img");n.src=e.img||this.getDfSt(["graphic","createCustomDefBillboardGraphics"])||"static/data/images/file/div1.png";n.onload=function(){e.image=n;var t=i._graphicsLayer.entities.add({position:e.position,billboard:{image:function(t){var e,i;if(t.image)return(e=document.createElement("canvas")).width=t.width||150,e.height=t.height||80,(i=e.getContext("2d")).drawImage(t.image,0,0),t=t.text,i.font="15px bold 宋体",i.fillStyle="#f4fff0",i.fillText(t,55,36),e}(e),scaleByDistance:new d.NearFarScalar(150,.7,15e6,.5),verticalOrigin:d.VerticalOrigin.BOTTOM,pixelOffset:e.b_pixelOffset||new d.Cartesian2(80,-35),width:140,height:100,scale:e.b_scale||1.5,disableDepthTestDistance:Number.POSITIVE_INFINITY,imageSubRegion:{x:0,y:0,width:200,height:150}}});"function"==typeof e.callback&&e.callback(t)}}},craeteRotatePlaneGraphics:function(t){var e,i,n,a;if(t&&t.center&&t.positions)return e=this.createGraphics(),i=0,n=t.positions,a=n[0],e.position=new d.CallbackProperty(function(){return 0==i?(a=n[0],i+=1):i<n.length-1?(a=n[i],i+=1):i==n.length-1&&(a=n[i],i=0),a},!1),e.plane={plane:new d.Plane(d.Cartesian3.UNIT_Y,0),dimensions:t.dimensions||new d.Cartesian2(200,150),material:new d.ImageMaterialProperty({image:t.image})},this._graphicsLayer.entities.add(e)},createVideoPlaneGraphics:function(t){var e;if(t&&t.position)return(e=this.createGraphics()).position=t.position,e.plane={plane:new d.Plane(t.normal||d.Cartesian3.UNIT_Y,0),dimensions:t.dimensions||new d.Cartesian2(200,150),material:new d.ImageMaterialProperty({image:t.videoElement})},this._graphicsLayer.entities.add(e)},createGifBillboardGraphics:function(t){var e,i,n,a,r,o,s;if(l&&t&&t.position)return i=t.url,n=0,a=i,r=e=[],(o=document.createElement("img")).src=a,o.setAttribute("rel:animated_src",a),o.setAttribute("rel:auto_play","0"),document.body.appendChild(o),s=new l({gif:o}),new Promise(t=>{s.load(()=>{for(let t=1;t<=s.get_length();t++)s.move_to(t),r.push(s.get_canvas().toDataURL());t(r)})}),this._graphicsLayer.entities.add({position:t.position,billboard:{verticalOrigin:d.VerticalOrigin.BASELINE,image:new d.CallbackProperty(function(){return e.length?(n<6*(e.length-1)?n++:n=0,e[Math.floor(n/6)]):i},!1),scale:.2}})},setGraphicsRotate:function(t){var e,i,n,a;t&&t.entity&&t.rotateAmount&&(e=t.entity,i=t.rotateAmount,n=t.position,a=this,n.heading=0,n.pitch=0,n.roll=0,e.position=new d.CallbackProperty(function(){return a.transformWGS84ToCartesian(n)},!1),e.orientation=new d.CallbackProperty(function(){return 0<i&&(n.heading+=i,360===n.heading)&&(n.heading=0),d.Transforms.headingPitchRollQuaternion(a.transformWGS84ToCartesian(n),new d.HeadingPitchRoll(d.Math.toRadians(n.heading),d.Math.toRadians(n.pitch),d.Math.toRadians(n.roll)))},!1))},setGraphicsFloat:function(t){if(t&&t.entity&&t.maxHeiht)try{var e=t.entity,n=t.minHeiht||5,a=t.maxHeiht||100,r=t.cartesians,o=t.speed||.06,s=this,l=n,c=!1;r.length?e.positions=new d.CallbackProperty(function(){var t,e=s.transformCartesianArrayToWGS84Array(r);for(t in e){var i=e[t];(c=a<=n||n<=l?!c:c)?n+=o:n-=o,i.alt=n}return s.transformWGS84ArrayToCartesianArray(e)},!1):e.position=new d.CallbackProperty(function(){var t=s.transformCartesianToWGS84(r);return(c=a<=n||n<=l?!c:c)?n+=o:n-=o,t.alt=n,s.transformWGS84ToCartesian(t)},!1)}catch(t){console.log(t)}},createCanvasGraphics:function(a){a&&a.positions&&(this._graphicsLayer.entities.add({rectangle:{coordinates:a.positions,material:new d.ImageMaterialProperty({image:new d.CallbackProperty(function(){var t=0,e=document.createElement("canvas"),i=e.getContext("2d"),n=new Image;if(n.src=a.img||"../../images/ysCesium/logo.png",i.clearRect(0,0,a.cwidth,a.cheight),!(t<=a.cwidth))return t=0,t+=3,e;i.drawImage(n,t,0)},!1),transparent:!0})}}),"function"==typeof a.callback)&&a.callback()}};let p=null;function E(t,e,i){t&&(p=e,this._installMaterial())}function Y(){}E.prototype={addMaterialLineGraphics:function(t){var e;if(this._viewer&&t&&t.image)return this._initPolylineCustomMaterialProperty(t),(e=this.createGraphics()).polyline={positions:t.positions,material:new p.PolylineCustomMaterialProperty({color:t.color||p.Color.RED,duration:t.duration||500}),width:t.width},this._viewer.entities.add(e)},getCustomMaterialLine:function(t){if(this._viewer&&t&&t.image)return this._initPolylineCustomMaterialProperty(t)},_initPolylineCustomMaterialProperty(i){if(i){var t=p.Color,e=p.defaultValue,n=p.defined,a=Object.defineProperties,r=p.Event,o=p.createPropertyDescriptor,s=p.Property,l=p.Material,c=t.WHITE,h=i.MaterialType||"wallType"+parseInt(1e3*Math.random());const x=function(t){t=e(t,e.EMPTY_OBJECT),this._definitionChanged=new r,this._color=void 0,this._colorSubscription=void 0,this.color=t.color||p.Color.BLUE,this.duration=t.duration||1e3,this._time=void 0};return a(x.prototype,{isvarant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:o("color")}),x.prototype.getType=function(){return h},x.prototype.getValue=function(t,e){return(e=n(e)?e:{}).color=s.getValueOrClonedDefault(this._color,t,c,e.color),e.image=i.image,void 0===this._time&&(this._time=t.secondsOfDay),e.time=1e3*(t.secondsOfDay-this._time)/this.duration,e},x.prototype.equals=function(t){return this===t||t instanceof x&&s.equals(this._color,t._color)},l._materialCache.addMaterial(h,{fabric:{type:h,uniforms:{color:i.color||new p.Color(1,0,0,.5),image:i.image,time:i.color.time||0},source:this._getDynamicLineShader({get:!0})},translucent:function(){return!0}}),new x(i)}},addMaterialWallGraphics:function(t){var e;if(this._viewer&&t&&t.image)return this._initWallCustomMaterialProperty(t),(e=this.createGraphics()).wall={positions:t.positions,material:new p.Scene.WallLinkCustomMaterialProperty({color:t.color||p.Color.RED,duration:t.duration||500}),width:t.width},this._viewer.entities.add(e)},getCustomMaterialWall:function(t){if(this._viewer&&t&&t.image)return this._initWallCustomMaterialProperty(t)},_initWallCustomMaterialProperty(i){var n=p.Color,e=p.defaultValue,a=p.defined,t=Object.defineProperties,r=p.Event,o=p.createPropertyDescriptor,s=p.Property,l=p.Material,c=i.MaterialType||"wallType"+parseInt(1e3*Math.random());function h(t){t=e(t,e.EMPTY_OBJECT),this._definitionChanged=new r,this._color=void 0,this._colorSubscription=void 0,this.color=t.color||n.BLUE,this.duration=t.duration||3e3,this._time=(new Date).getTime()}return t(h.prototype,{isvarant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:o("color")}),h.prototype.getType=function(){return c},h.prototype.getValue=function(t,e){return(e=a(e)?e:{}).color=s.getValueOrClonedDefault(this._color,t,n.WHITE,e.color),e.image=i.image,e.time=((new Date).getTime()-this._time)%this.duration/this.duration,e},h.prototype.equals=function(t){return this===t||t instanceof h&&s.equals(this._color,t._color)},l._materialCache.addMaterial(c,{fabric:{type:c,uniforms:{color:new n(1,0,0,.5),image:i.image,time:0},source:this._getDirectionWallShader({get:!0,count:i.count,freely:i.freely,direction:i.direction})},translucent:function(){return!0}}),new(p.Scene.WallLinkCustomMaterialProperty=h)(i)},_installMaterial:function(){this._installWaveCircleMaterial(),this._installCircleFadeMaterial(),this._installCityLineMaterial(),this._installWarnMaterial(),this._installFlowMaterial()},_installWaveCircleMaterial:function(){var e=p.Color,i=p.defaultValue,t=Object.defineProperties,n=p.Event,a=p.Property,r=p.Material;function o(t){t=t||{},this._definitionChanged=new n,this._color=void 0,this._colorSubscription=void 0,this._duration=void 0,this._durationSubscription=void 0,this.color=i(t.color,e.fromBytes(0,255,255,255)),this.duration=i(t.duration,45),this.count=Math.max(i(t.count,2),1),this.gradient=i(t.gradient,.1),this.gradient<0?this.gradient=0:1<this.gradient&&(this.gradient=1)}t(o.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),o.prototype.getType=function(){return r.CircleWaveType},o.prototype.getValue=function(t,e){return(e=e||{}).color=a.getValueOrUndefined(this._color,t),e.duration=this._duration,e.count=this.count,e.gradient=this.gradient,e},o.prototype.equals=function(t){return this===t||t instanceof o&&p.Property.equals(this._color,t._color)},t(o.prototype,{color:p.createPropertyDescriptor("color"),duration:p.createPropertyDescriptor("duration")}),p.Scene.CircleWaveMaterialProperty=o,r.CircleWaveType="CircleWave",r._materialCache.addMaterial(r.CircleWaveType,{fabric:{type:r.CircleWaveType,uniforms:{color:new e(1,0,0,.7),duration:45,count:1,gradient:.1},source:this._getDynamicCircleShader({get:!0})},translucent:function(){return!0}})},_installCircleFadeMaterial:function(){var t=p.Color,e=p.defaultValue,i=Object.defineProperties,n=p.Event,a=p.Property,r=p.Material,o=new t(0,0,0,0);function s(t){t=e(t,e.EMPTY_OBJECT),this._definitionChanged=new n,this._color=void 0,this._colorSubscription=void 0,this.color=e(t.color,o),this._duration=t.duration||1e3,this._time=void 0}i(s.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),s.prototype.getType=function(){return r.CircleFadeMaterialType},s.prototype.getValue=function(t,e){return(e=e||{}).color=a.getValueOrClonedDefault(this._color,t,o,e.color),void 0===this._time&&(this._time=(new Date).getTime()),e.time=((new Date).getTime()-this._time)/this._duration,e},s.prototype.equals=function(t){return this===t||t instanceof s&&p.Property.equals(this._color,t._color)},i(s.prototype,{color:p.createPropertyDescriptor("color")}),p.Scene.CircleFadeMaterialProperty=s,r.CircleFadeMaterialType="CircleFadeMaterial",r._materialCache.addMaterial(r.CircleFadeMaterialType,{fabric:{type:r.CircleFadeMaterialType,uniforms:{color:new t(1,0,0,1),time:1},source:this._getCircleFadeShader({get:!0})},translucent:function(){return!0}})},_installCityLineMaterial:function(){var t=p.Color,e=p.defaultValue,i=p.defined,n=Object.defineProperties,a=p.Event,r=p.createPropertyDescriptor,o=p.Property,s=p.Material,l=t.WHITE;function c(t){t=e(t,e.EMPTY_OBJECT),this._definitionChanged=new a,this._color=void 0,this._colorSubscription=void 0,this.color=t.color||p.Color.BLUE,this.duration=t.duration||1e3,this._time=void 0,this._img=t.imgUrl||s.PolylineCityLinkImage}n(c.prototype,{isvarant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:r("color")}),c.prototype.getType=function(){return s.PolylineCityLinkType},c.prototype.getValue=function(t,e){return(e=i(e)?e:{}).color=o.getValueOrClonedDefault(this._color,t,l,e.color),e.image=this._img,void 0===this._time&&(this._time=t.secondsOfDay),e.time=1e3*(t.secondsOfDay-this._time)/this.duration,e},c.prototype.equals=function(t){return this===t||t instanceof c&&o.equals(this._color,t._color)},p.Scene.PolylineCityLinkMaterialProperty=c,s.PolylineCityLinkType="PolylineCityLink",s.PolylineCityLinkImage=this.getDfSt(["material","PolylineCityLinkMaterialProperty"])||"static/data/images/Textures/meteor_01.png",s._materialCache.addMaterial(s.PolylineCityLinkType,{fabric:{type:s.PolylineCityLinkType,uniforms:{color:new t(1,0,0,1),image:s.PolylineCityLinkImage,time:0},source:this._getDynamicLightLineShader({get:!0})},translucent:function(){return!0}})},_installWarnMaterial:function(){var i=p.Color,e=p.defaultValue,n=p.defined,t=Object.defineProperties,a=p.Event,r=p.createPropertyDescriptor,o=p.Property,s=p.Material;function l(t){t=e(t,e.EMPTY_OBJECT),this._definitionChanged=new a,this._color=void 0,this._colorSubscription=void 0,this.color=t.color||i.BLUE,this.duration=t.duration||3e3,this._time=(new Date).getTime()}t(l.prototype,{isvarant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),l.prototype.getType=function(){return s.WarnLinkType},l.prototype.getValue=function(t,e){return(e=n(e)?e:{}).color=o.getValueOrClonedDefault(this._color,t,i.WHITE,e.color),e.image=s.WarnLinkImage,e.time=((new Date).getTime()-this._time)%this.duration/this.duration,e},l.prototype.equals=function(t){return this===t||t instanceof l&&o.equals(this._color,t._color)},t(l.prototype,{color:r("color")}),p.Scene.WarnLinkMaterialProperty=l,s.WarnLinkType="WarnWallLinkType",s.WarnLinkImage=this.getDfSt(["material","WarnLinkMaterialProperty"])||"static/data/images/Textures/jsx2.png",s._materialCache.addMaterial(s.WarnLinkType,{fabric:{type:s.WarnLinkType,uniforms:{color:new i(1,0,0,.5),image:s.WarnLinkImage,time:0},source:this._getDirectionWallShader({get:!0,count:10,freely:"cross",direction:"-"})},translucent:function(){return!0}})},_installFlowMaterial:function(){var e=p.Color,i=p.defaultValue,t=Object.defineProperties,n=p.Event,a=p.createPropertyDescriptor,r=p.Property,o=p.Material;function s(t){t=i(t,i.EMPTY_OBJECT),this._definitionChanged=new n,this._color=void 0,this._colorSubscription=void 0,this.color=t.color||e.fromBytes(0,255,255,255),this._duration=void 0,this._durationSubscription=void 0,this.duration=i(t.duration,45)}t(s.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),s.prototype.getType=function(){return o.PolylineFlowType},s.prototype.getValue=function(t,e){return(e=e||{}).color=r.getValueOrClonedDefault(this._color,t,p.Color.WHITE,e.color),e.duration=this._duration,e},s.prototype.equals=function(t){return this===t||t instanceof s&&r.equals(this._color,t._color)},t(s.prototype,{color:a("color"),duration:a("duration")}),p.Scene.PolylineFlowMaterialProperty=s,o.PolylineFlowType="PolylineFlow",o._materialCache.addMaterial(o.PolylineFlowType,{fabric:{type:o.PolylineFlowType,uniforms:{color:new e(1,1,2,.7),duration:45},source:this._getFlowLineShader({get:!0})},translucent:function(){return!0}})}},Y.prototype={_getFlowLineShader:function(){return"uniform vec4 color;\n uniform float duration;\n \n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float t =fract(czm_frameNumber / duration);\n t *= 1.03;\n float alpha = smoothstep(t- 0.03, t, st.s) * step(-t, -st.s);\n alpha += 0.1;\n vec4 fragColor;\n fragColor.rgb = (color.rgb) / 0.5;\n fragColor = czm_gammaCorrect(fragColor);\n material.diffuse = fragColor.rgb;\n material.alpha = alpha;\n material.emission = fragColor.rgb;\n return material;\n }\n "},_getDynamicLineShader:function(t){if(t&&t.get)return"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n \n if(texture(image, vec2(0.0, 0.0)).a == 1.0){\n discard;\n }else{\n material.alpha = texture(image, vec2(1.0 - fract(time - st.s), st.t)).a * color.a;\n }\n \n material.diffuse = max(color.rgb * material.alpha * 3.0, color.rgb);\n \n return material;\n }\n "},_getDynamicLightLineShader:function(t){if(t&&t.get)return"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n \n vec4 colorImage = texture(image, vec2(fract(1.0 *st.s - time), fract(st.t)));\n \n vec4 fragColor;\n fragColor.rgb = (colorImage.rgb+color.rgb) / 1.0;\n fragColor = czm_gammaCorrect(fragColor);\n material.diffuse = colorImage.rgb;\n material.alpha = colorImage.a;\n material.emission = fragColor.rgb;\n \n return material;\n }\n "},_getDirectionWallShader:function(t){var e;if(t&&t.get)return e="czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n \n ","vertical"==t.freely?e+="vec4 colorImage = texture(image, vec2(fract(float("+t.count+")*st.t "+t.direction+" time), fract(st.s)));\n ":e+="vec4 colorImage = texture(image, vec2(fract(float("+t.count+")*st.s "+t.direction+" time), fract(st.t)));\n ",(e+="vec4 fragColor;\n fragColor.rgb = (colorImage.rgb+color.rgb) / 1.0;\n fragColor = czm_gammaCorrect(fragColor);\n ")+" material.diffuse = colorImage.rgb;\n material.alpha = colorImage.a;\n material.emission = fragColor.rgb;\n \n return material;\n }\n "},_getCircleFadeShader:function(t){if(t&&t.get)return"czm_material czm_getMaterial(czm_materialInput materialInput)\n \n {\n \n czm_material material = czm_getDefaultMaterial(materialInput);\n \n material.diffuse = 1.5 * color.rgb;\n \n vec2 st = materialInput.st;\n \n float dis = distance(st, vec2(0.5, 0.5));\n \n float per = fract(time);\n \n if(dis > per * 0.5){\n \n //material.alpha = 0.0;\n \n discard;\n \n }else {\n \n material.alpha = color.a * dis / per / 2.0;\n \n }\n \n return material;\n \n }"},_getDynamicCircleShader:function(t){if(t&&t.get)return"uniform vec4 color;\n uniform float duration;\n uniform float count;\n uniform float gradient;\n \n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n vec3 str = materialInput.str;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(czm_frameNumber / duration);\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis > 0.5){\n discard;\n } else {\n float perDis = 0.5 / count;\n float disNum;\n float bl = .0;\n for (int i = 0; i <= 10; i++) {\n if (float(i) <= count) {\n disNum = perDis * float(i) - dis + per / count;\n if (disNum > 0.0) {\n if (disNum < perDis) {\n bl = 1.0 - disNum / perDis;\n } else if (disNum - perDis < perDis) {\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl, gradient);\n }\n }\n }\n }\n return material;\n }\n "},_getRadarScanShader:function(t){if(t&&t.get)return"uniform sampler2D colorTexture;\n uniform sampler2D depthTexture;\n in vec2 v_textureCoordinates;\n uniform vec4 u_scanCenterEC;\n uniform vec3 u_scanPlaneNormalEC;\n uniform vec3 u_scanLineNormalEC;\n out vec4 myOutputColor;\n uniform float u_radius;\n uniform vec4 u_scanColor;\n \n vec4 toEye(in vec2 uv, in float depth){\n vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));\n vec4 posInCamera =czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera =posInCamera / posInCamera.w;\n return posInCamera;\n }\n \n bool isPointOnLineRight(in vec3 ptOnLine, in vec3 lineNormal, in vec3 testPt){\n vec3 v01 = testPt - ptOnLine;\n normalize(v01);\n vec3 temp = cross(v01, lineNormal);\n float d = dot(temp, u_scanPlaneNormalEC);\n return d > 0.5;\n }\n \n vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point){\n vec3 v01 = point -planeOrigin;\n float d = dot(planeNormal, v01) ;\n return (point - planeNormal * d);\n }\n \n float distancePointToLine(in vec3 ptOnLine, in vec3 lineNormal, in vec3 testPt){\n vec3 tempPt = pointProjectOnPlane(lineNormal, ptOnLine, testPt);\n return length(tempPt - ptOnLine);\n }\n \n float getDepth(in vec4 depth){\n float z_window = czm_unpackDepth(depth);\n z_window = czm_reverseLogDepth(z_window);\n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n return (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n }\n \n void main(){\n myOutputColor = texture(colorTexture, v_textureCoordinates);\n float depth = getDepth( texture(depthTexture, v_textureCoordinates));\n vec4 viewPos = toEye(v_textureCoordinates, depth);\n vec3 prjOnPlane = pointProjectOnPlane(u_scanPlaneNormalEC.xyz, u_scanCenterEC.xyz, viewPos.xyz);\n float dis = length(prjOnPlane.xyz - u_scanCenterEC.xyz);\n float twou_radius = u_radius * 2.0;\n if(dis < u_radius){\n float f0 = 1.0 -abs(u_radius - dis) / u_radius;\n f0 = pow(f0, 64.0);\n vec3 lineEndPt = vec3(u_scanCenterEC.xyz) + u_scanLineNormalEC * u_radius;\n float f = 0.0;\n if(isPointOnLineRight(u_scanCenterEC.xyz, u_scanLineNormalEC.xyz, prjOnPlane.xyz)){\n float dis1= length(prjOnPlane.xyz - lineEndPt);\n f = abs(twou_radius -dis1) / twou_radius;\n f = pow(f, float("+t.width+"));\n }\n if(float("+t.border+") > 0.0){\n myOutputColor = mix(myOutputColor, u_scanColor, f + f0);\n } else {\n myOutputColor = mix(myOutputColor, u_scanColor, f);\n }\n }\n }\n "},_getCircleScanShader:function(t){if(t&&t.get)return"uniform sampler2D colorTexture;\n uniform sampler2D depthTexture;\n in vec2 v_textureCoordinates;\n uniform vec4 u_scanCenterEC;\n uniform vec3 u_scanPlaneNormalEC;\n uniform float u_radius;\n out vec4 myOutputColor;\n uniform vec4 u_scanColor;\n \n vec4 toEye(in vec2 uv, in float depth){\n vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));\n vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera =posInCamera / posInCamera.w;\n return posInCamera;\n }\n \n vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point){\n vec3 v01 = point - planeOrigin;\n float d = dot(planeNormal, v01) ;\n return (point - planeNormal * d);\n }\n \n float getDepth(in vec4 depth){\n float z_window = czm_unpackDepth(depth);\n z_window = czm_reverseLogDepth(z_window);\n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n return (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n }\n \n void main(){\n myOutputColor = texture(colorTexture, v_textureCoordinates);\n float depth = getDepth(texture(depthTexture, v_textureCoordinates));\n vec4 viewPos = toEye(v_textureCoordinates, depth);\n vec3 prjOnPlane = pointProjectOnPlane(u_scanPlaneNormalEC.xyz, u_scanCenterEC.xyz, viewPos.xyz);\n float dis = length(prjOnPlane.xyz - u_scanCenterEC.xyz);\n if(dis < u_radius){\n float f = 1.0 - abs(u_radius - dis) / u_radius;\n f = pow(f, float("+t.border+"));\n myOutputColor = mix(myOutputColor, u_scanColor, f);\n }\n }\n "}};let _={},r=void 0;function b(t,e,i){t&&(this._viewer=t,_=e,r=i,_.Ion.defaultAccessToken="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmYzkwZWEwYy1mMmIwLTQwYjctOWJlOC00OWU4ZWU1YTZhOTkiLCJpZCI6MTIxODIsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NjA0OTUyNDN9.wagvw7GxUjxvHXO6m2jjX5Jh9lN0UyTJhNGEcSm2pgE",this._drawLayer=new _.CustomDataSource("drawLayer"),t&&t.dataSources.add(this._drawLayer),this.myname="BASE",this._installBaiduImageryProvider(),this._installGooGleImageryProvider(),this._installAmapImageryProvider(),this._installTencentImageryProvider(),this._installTdtImageryProvider(),this._installGroundSkyBox())}b.prototype={createGraphics:function(){return new _.Entity},getDfSt(t){if(r)return t=t.reduce((t,e)=>(t||r)[e],void 0),r.baseService+t},setOneSkyBox:function(){return new _.SkyBox({sources:{positiveX:this.getDfSt(["skyBox","one","positiveX"])||"static/data/images/SkyBox/00h+00.jpg",negativeX:this.getDfSt(["skyBox","one","negativeX"])||"static/data/images/SkyBox/12h+00.jpg",positiveY:this.getDfSt(["skyBox","one","positiveY"])||"static/data/images/SkyBox/06h+00.jpg",negativeY:this.getDfSt(["skyBox","one","negativeY"])||"static/data/images/SkyBox/18h+00.jpg",positiveZ:this.getDfSt(["skyBox","one","positiveZ"])||"static/data/images/SkyBox/06h+90.jpg",negativeZ:this.getDfSt(["skyBox","one","negativeZ"])||"static/data/images/SkyBox/06h-90.jpg"}})},setTwoSkyBox:function(){return new _.SkyBox({sources:{positiveX:this.getDfSt(["skyBox","two","negativeZ"])||"static/data/images/SkyBox/Version2_dark_px.jpg",negativeX:this.getDfSt(["skyBox","two","negativeX"])||"static/data/images/SkyBox/Version2_dark_mx.jpg",positiveY:this.getDfSt(["skyBox","two","positiveY"])||"static/data/images/SkyBox/Version2_dark_py.jpg",negativeY:this.getDfSt(["skyBox","two","negativeY"])||"static/data/images/SkyBox/Version2_dark_my.jpg",positiveZ:this.getDfSt(["skyBox","two","positiveZ"])||"static/data/images/SkyBox/Version2_dark_pz.jpg",negativeZ:this.getDfSt(["skyBox","two","negativeZ"])||"static/data/images/SkyBox/Version2_dark_mz.jpg"}})},setThreeSkyBox:function(){return new _.SkyBox({sources:{positiveX:this.getDfSt(["skyBox","three","negativeZ"])||"static/data/images/SkyBox/tycho2t3_80_pxs.jpg",negativeX:this.getDfSt(["skyBox","three","negativeX"])||"static/data/images/SkyBox/tycho2t3_80_mxs.jpg",positiveY:this.getDfSt(["skyBox","three","positiveY"])||"static/data/images/SkyBox/tycho2t3_80_pys.jpg",negativeY:this.getDfSt(["skyBox","three","negativeY"])||"static/data/images/SkyBox/tycho2t3_80_mys.jpg",positiveZ:this.getDfSt(["skyBox","three","positiveZ"])||"static/data/images/SkyBox/tycho2t3_80_pzs.jpg",negativeZ:this.getDfSt(["skyBox","three","negativeZ"])||"static/data/images/SkyBox/tycho2t3_80_mzs.jpg"}})},setOneGroundSkyBox:function(){return new _.Scene.GroundSkyBox({sources:{positiveX:this.getDfSt(["skyBox","nearOne","positiveX"])||"static/data/images/SkyBox/rightav9.jpg",negativeX:this.getDfSt(["skyBox","nearOne","negativeX"])||"static/data/images/SkyBox/leftav9.jpg",positiveY:this.getDfSt(["skyBox","nearOne","positiveY"])||"static/data/images/SkyBox/frontav9.jpg",negativeY:this.getDfSt(["skyBox","nearOne","negativeY"])||"static/data/images/SkyBox/backav9.jpg",positiveZ:this.getDfSt(["skyBox","nearOne","positiveZ"])||"static/data/images/SkyBox/topav9.jpg",negativeZ:this.getDfSt(["skyBox","nearOne","negativeZ"])||"static/data/images/SkyBox/bottomav9.jpg"}})},setTwoGroundSkyBox:function(){return new _.Scene.GroundSkyBox({sources:{positiveX:this.getDfSt(["skyBox","nearTwo","positiveX"])||"static/data/images/SkyBox/SunSetRight.png",negativeX:this.getDfSt(["skyBox","nearTwo","negativeX"])||"static/data/images/SkyBox/SunSetLeft.png",positiveY:this.getDfSt(["skyBox","nearTwo","positiveY"])||"static/data/images/SkyBox/SunSetFront.png",negativeY:this.getDfSt(["skyBox","nearTwo","negativeY"])||"static/data/images/SkyBox/SunSetBack.png",positiveZ:this.getDfSt(["skyBox","nearTwo","positiveZ"])||"static/data/images/SkyBox/SunSetUp.png",negativeZ:this.getDfSt(["skyBox","nearTwo","negativeZ"])||"static/data/images/SkyBox/SunSetDown.png"}})},setThreeGroundSkyBox:function(){return new _.Scene.GroundSkyBox({sources:{positiveX:this.getDfSt(["skyBox","nearThree","positiveX"])||"static/data/images/SkyBox/Right.jpg",negativeX:this.getDfSt(["skyBox","nearThree","negativeX"])||"static/data/images/SkyBox/Left.jpg",positiveY:this.getDfSt(["skyBox","nearThree","positiveY"])||"static/data/images/SkyBox/Front.jpg",negativeY:this.getDfSt(["skyBox","nearThree","negativeY"])||"static/data/images/SkyBox/Back.jpg",positiveZ:this.getDfSt(["skyBox","nearThree","positiveZ"])||"static/data/images/SkyBox/Up.jpg",negativeZ:this.getDfSt(["skyBox","nearThree","negativeZ"])||"static/data/images/SkyBox/Down.jpg"}})},setDarkEffect:function(t){return t=t||{},this._viewer.scene.postProcessStages.add(new _.PostProcessStage({name:"darkEffect",fragmentShader:"uniform sampler2D colorTexture;\nin vec2 v_textureCoordinates;\nuniform float scale;\nuniform vec3 offset;\nvoid main() {\n vec4 color = texture(colorTexture, v_textureCoordinates);\n out_FragColor = vec4(color.r*0.2,color.g * 0.4,color.b*0.6, 1.0);\n}\n",uniforms:{scale:1,offset:function(){return t.offset||new _.Cartesian3(.1,.2,.3)}}}))},setBlurBloom:function(t){if(this._viewer&&t)return this._viewer.scene.postProcessStages.add(new _.PostProcessStage({name:"blur_x_direction",fragmentShader:"uniform float height;\nuniform float width;\nuniform sampler2D colorTexture1;\n\nin vec2 v_textureCoordinates;\n\nconst int SAMPLES = 9;\nvoid main()\n{\nvec2 st = v_textureCoordinates;\nfloat wr = float(1.0 / width);\nfloat hr = float(1.0 / height);\nvec4 result = vec4(0.0);\nint count = 0;\nfor(int i = -SAMPLES; i <= SAMPLES; ++i){\nfor(int j = -SAMPLES; j <= SAMPLES; ++j){\nvec2 offset = vec2(float(i) * wr, float(j) * hr);\nresult += texture(colorTexture1, st + offset);\n}\n}\nresult = result / float(count);\nout_FragColor = result;\n}\n",uniforms:{width:t.width,height:t.height,colorTexture1:"Bright"}}))},setRainEffect:function(){if(this._viewer)return this._viewer.scene.postProcessStages.add(new _.PostProcessStage({name:"rainEffect",fragmentShader:"uniform sampler2D colorTexture;\n in vec2 v_textureCoordinates;\n \n float hash(float x){\n return fract(sin(x*23.3)*13.13);\n }\n \n void main(){\n float time = czm_frameNumber / 60.0;\n vec2 resolution = czm_viewport.zw;\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 c=vec3(.6,.7,.8);\n float a=-.4;\n float si=sin(a),co=cos(a);\n uv*=mat2(co,-si,si,co);\n uv*=length(uv+vec2(0,4.9))*.3+1.;\n float v=1.-sin(hash(floor(uv.x*100.))*2.);\n float b=clamp(abs(sin(20.*time*v+uv.y*(5./(2.+v))))-.95,0.,1.)*20.;\n c*=v*b;\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(c, 1), 0.2);\n }\n "}))},setSnowEffect:function(){if(this._viewer)return this._viewer.scene.postProcessStages.add(new _.PostProcessStage({name:"snowEffect",fragmentShader:"uniform sampler2D colorTexture;\n in vec2 v_textureCoordinates;\n float snow(vec2 uv,float scale){\n float time = czm_frameNumber / 60.0;\n float w=smoothstep(1.,0.,-uv.y*(scale/10.));\n if(w<.1)return 0.;\n uv+=time/scale;\n uv.y+=time*2./scale;\n uv.x+=sin(uv.y+time*.5)/scale;\n uv*=scale;\n vec2 s=floor(uv),f=fract(uv),p;\n float k=3.,d;\n p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7,3,6,5))*5.))-f;\n d=length(p);\n k=min(d,k);\n k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\n return k*w;\n }\n \n void main(){\n vec2 resolution = czm_viewport.zw;\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 finalColor=vec3(0);\n float c = 0.0;\n c+=snow(uv,30.)*.0;\n c+=snow(uv,20.)*.0;\n c+=snow(uv,15.)*.0;\n c+=snow(uv,10.);\n c+=snow(uv,8.);\n c+=snow(uv,6.);\n c+=snow(uv,5.);\n finalColor=(vec3(c));\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.3);\n \n }\n "}))},setFogEffect:function(){if(this._viewer)return this._viewer.scene.postProcessStages.add(new _.PostProcessStage({fragmentShader:"float getDistance(sampler2D depthTexture, vec2 texCoords) \n{ \n float depth = czm_unpackDepth(texture(depthTexture, texCoords)); \n if (depth == 0.0) { \n return czm_infinity; \n } \n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depth); \n return -eyeCoordinate.z / eyeCoordinate.w; \n} \nfloat interpolateByDistance(vec4 nearFarScalar, float distance) \n{ \n float startDistance = nearFarScalar.x; \n float startValue = nearFarScalar.y; \n float endDistance = nearFarScalar.z; \n float endValue = nearFarScalar.w; \n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0); \n return mix(startValue, endValue, t); \n} \nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor) \n{ \n return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a); \n} \nuniform sampler2D colorTexture; \nuniform sampler2D depthTexture; \nuniform vec4 fogByDistance; \nuniform vec4 fogColor; \nin vec2 v_textureCoordinates; \nvoid main(void) \n{ \n float distance = getDistance(depthTexture, v_textureCoordinates); \n vec4 sceneColor = texture(colorTexture, v_textureCoordinates); \n float blendAmount = interpolateByDistance(fogByDistance, distance); \n vec4 finalFogColor = vec4(fogColor.rgb, fogColor.a * blendAmount); \n out_FragColor = alphaBlend(finalFogColor, sceneColor); \n} \n",uniforms:{fogByDistance:new _.Cartesian4(10,0,200,.3),fogColor:_.Color.AZURE}}))},setDefSceneConfig:function(){this._viewer&&(this._viewer.scene.sun.show=!1,this._viewer.scene.moon.show=!1,this._viewer.scene.fxaa=!0,this._viewer.scene.globe.depthTestAgainstTerrain=!0,this._viewer.scene.undergroundMode=!1,this._viewer.scene.terrainProvider.isCreateSkirt=!1,this._viewer.scene.skyAtmosphere.show=!1,this._viewer.scene.globe.showGroundAtmosphere=!1,this._viewer.scene.globe.enableLighting=!0,this._viewer.scene.fog.enabled=!1,this._viewer.cesiumWidget.creditContainer.style.display="none")},setBloomLightScene:function(){this._viewer&&(this._viewer.scene.postProcessStages.bloom.enabled=!0,this._viewer.scene.postProcessStages.bloom.uniforms.contrast=119,this._viewer.scene.postProcessStages.bloom.uniforms.brightness=-.4,this._viewer.scene.postProcessStages.bloom.uniforms.glowOnly=!1,this._viewer.scene.postProcessStages.bloom.uniforms.delta=.9,this._viewer.scene.postProcessStages.bloom.uniforms.sigma=3.78,this._viewer.scene.postProcessStages.bloom.uniforms.stepSize=5,this._viewer.scene.postProcessStages.bloom.uniforms.isSelected=!1)},removePostProcessStage:function(t){t&&(Array.isArray(t)?t.forEach(t=>{this._viewer.scene.postProcessStages.contains(t)&&this._viewer.scene.postProcessStages.remove(t)}):this._viewer.scene.postProcessStages.contains(t)&&this._viewer.scene.postProcessStages.remove(t))},setView:function(t){var e;this._viewer&&t&&t.position&&(t.distance&&(e=new _.Cartesian3(0,t.distance,window.opt.distance),t.position=_.Cartesian3.add(t.position,e,new _.Cartesian3)),this._viewer.scene.camera.setView({destination:t.position,orientation:t.orientation||{heading:_.Math.toRadians(90),pitch:_.Math.toRadians(90),roll:_.Math.toRadians(0)}}))},flyTo:function(t){var e;this._viewer&&t&&t.position&&(t.distance&&(e=new _.Cartesian3(0,t.distance,t.distance),t.position=_.Cartesian3.add(t.position,e,new _.Cartesian3)),this._viewer.scene.camera.flyTo({destination:t.position,orientation:t.orientation||{heading:_.Math.toRadians(90),pitch:_.Math.toRadians(90),roll:_.Math.toRadians(0)},easingFunction:t.easingFunction||_.EasingFunction.LINEAR_NONE,duration:t.duration||3,complete:t.callback}))},transformCartesianToWGS84:function(t){if(this._viewer&&t)return t=_.Ellipsoid.WGS84.cartesianToCartographic(t),{lng:_.Math.toDegrees(t.longitude),lat:_.Math.toDegrees(t.latitude),alt:t.height}},transformWGS84ArrayToCartesianArray:function(t,e){var i;if(this._viewer&&t)return i=this,t?t.map(function(t){return i.transformWGS84ToCartesian(t,e)}):[]},transformWGS84ToCartesian:function(t,e){if(this._viewer)return t?_.Cartesian3.fromDegrees(t.lng||t.lon,t.lat,t.alt=e||t.alt,_.Ellipsoid.WGS84):_.Cartesian3.ZERO},transformCartesianArrayToWGS84Array:function(t){var e;if(this._viewer)return e=this,t?t.map(function(t){return e.transformCartesianToWGS84(t)}):[]},setCameraEotateHeading(l){if(l){let e=this._viewer,i=_.Cartesian3.fromDegrees(l.lng,l.lat,l.height),n=_.Math.toRadians(-30),a=12,r=5e3,t=_.JulianDate.fromDate(new Date),o=(e.clock.startTime=t.clone(),e.clock.currentTime=t.clone(),e.clock.clockRange=_.ClockRange.CLAMPED,e.clock.clockStep=_.ClockStep.SYSTEM_CLOCK,e.camera.heading),s=function(){var t=_.JulianDate.secondsDifference(e.clock.currentTime,e.clock.startTime),t=_.Math.toRadians(t*a)+o;e.scene.camera.setView({destination:i,orientation:{heading:t,pitch:n}}),e.scene.camera.moveBackward(r),0<=_.JulianDate.compare(e.clock.currentTime,e.clock.stopTime)&&e.clock.onTick.removeEventListener(s)};e.clock.onTick.addEventListener(s)}},transformWGS84ToCartographic:function(t){return t?_.Cartographic.fromDegrees(t.lng||t.lon,t.lat,t.alt):_.Cartographic.ZERO},getCatesian3FromPX:function(t){if(this._viewer&&t){var e,i,n=this._viewer.scene.pick(t),a=null,r=!1,o=!1;if((r=n instanceof _.Cesium3DTileFeature?!0:r)&&(a=this._viewer.scene.pickPosition(t))&&((e=_.Cartographic.fromCartesian(a)).height<0&&(e.height=0),s=_.Math.toDegrees(e.longitude),i=_.Math.toDegrees(e.latitude),e=e.height,a=this.transformWGS84ToCartesian({lng:s,lat:i,alt:e})),!n){var s=this._viewer.scene.camera.getPickRay(t);if(!s)return null;a=this._viewer.scene.globe.pick(s,this._viewer.scene),o=!0}return(a=r||o?a:this._viewer.scene.camera.pickEllipsoid(t,this._viewer.scene.globe.ellipsoid))?(i=this.transformCartesianToWGS84(a)).alt<0?this.transformWGS84ToCartesian(i,.1):a:!1}},getCameraPosition:function(){if(this._viewer){var t,e,i,n,a,r,o,s,l,c,h,x=this._viewer.scene.camera.pickEllipsoid(new _.Cartesian2(this._viewer.canvas.clientWidth/2,this._viewer.canvas.clientHeight/2));if(x)return t=180*(x=_.Ellipsoid.WGS84.cartesianToCartographic(x)).longitude/Math.PI,x=180*x.latitude/Math.PI,n=this._viewer.camera._direction,e=_.Math.toDegrees(n.x),i=_.Math.toDegrees(n.y),n=_.Math.toDegrees(n.z),a=this._viewer.camera.positionCartographic.height,r=_.Math.toDegrees(this._viewer.camera.heading),o=_.Math.toDegrees(this._viewer.camera.pitch),s=_.Math.toDegrees(this._viewer.camera.roll),c=(l=this._viewer.camera.computeViewRectangle()).west/Math.PI*180,h=l.north/Math.PI*180,c=(c+l.east/Math.PI*180)/2,h=(h+l.south/Math.PI*180)/2,{lon:t,lat:x,height:a,heading:r,pitch:o,roll:s,position:this._viewer.camera.position,cameraHeading:this._viewer.camera.heading,cameraPitch:this._viewer.camera.pitch,cameraRoll:this._viewer.camera.roll,center:{x:c,y:h},direction:new _.Cartesian3(e,i,n)}}},updateCameraState:function(t){this._viewer.scene._screenSpaceCameraController.enableRotate=t,this._viewer.scene._screenSpaceCameraController.enableTranslate=t,this._viewer.scene._screenSpaceCameraController.enableZoom=t,this._viewer.scene._screenSpaceCameraController.enableTilt=t,this._viewer.scene._screenSpaceCameraController.enableLook=t},bindHandelEvent:function({leftClick:e,mouseMove:i,doubleClick:n,leftDown:a,mouseWheel:r,leftUp:o}){var s;this._viewer&&(s=new _.ScreenSpaceEventHandler(this._viewer.canvas),e&&s.setInputAction(function(t){e(t,s)},_.ScreenSpaceEventType.LEFT_CLICK),i&&s.setInputAction(function(t){i(t,s)},_.ScreenSpaceEventType.MOUSE_MOVE),n&&s.setInputAction(function(t){n(t,s)},_.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),a&&s.setInputAction(function(t){a(t,s)},_.ScreenSpaceEventType.LEFT_DOWN),r&&s.setInputAction(function(t){r(t,s)},_.ScreenSpaceEventType.WHEEL),o)&&s.setInputAction(function(t){o(t,s)},_.ScreenSpaceEventType.LEFT_UP)},getHandelPosition:function(e){var i,n;this._viewer&&(i=new _.ScreenSpaceEventHandler(this._viewer.scene.canvas),n=this,i.setInputAction(function(t){t=n._viewer.scene.camera.pickEllipsoid(t.endPosition,n._viewer.scene.globe.ellipsoid);"function"==typeof e&&e(n.transformCartesianToWGS84(t),i)},_.ScreenSpaceEventType.MOUSE_MOVE))},saveSceneImages:function(){var t,e;this._viewer&&(e=this._viewer.scene.canvas.toDataURL("image/png").replace("image/png","image/octet-stream"),t=document.createElement("a"),e=function(t){for(var t=t.split(","),e=t[0].match(/:(.*?);/)[1],i=atob(t[1]),n=i.length,a=new Uint8Array(n);n--;)a[n]=i.charCodeAt(n);return new Blob([a],{type:e})}(e),e=URL.createObjectURL(e),t.download="scene.png",t.href=e,t.click())},_installAmapImageryProvider:function(){_.Scene.AmapImageryProvider=function(t){return t.url="img"===t.style?"https://webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}":"http://webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}",t.subdomains||(t.subdomains=["01","02","03","04"]),new _.UrlTemplateImageryProvider(t)}},_installTdtImageryProvider:function(){_.Scene.TdtImageryProvider=function(t){return new _.UrlTemplateImageryProvider({url:"http://t{s}.tianditu.gov.cn/{layer}_c/wmts?service=WMTS&version=1.0.0&request=GetTile&tilematrix={TileMatrix}&layer={layer}&style={style}&tilerow={TileRow}&tilecol={TileCol}&tilematrixset={TileMatrixSet}&format=tiles&tk={key}".replace(/\{layer\}/g,t.style||"vec").replace(/\{key\}/g,t.key||""),style:"default",format:"tiles",tileMatrixSetID:"c",matrixSet:"c",wrapX:!0,crossOrigin:"anonymous",subdomains:[...Array(6).keys()].map(t=>(t+1).toString()),tileMatrixLabels:[...Array(18).keys()].map(t=>(t+1).toString()),tilingScheme:new _.GeographicTilingScheme,maximumLevel:18})}},_installTencentImageryProvider:function(){_.Scene.TencentImageryProvider=function(t){return t.layer="img",t.url="https://p2.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=229",t.subdomains||(t.subdomains=["0","1","2"]),t.customTags={sx:function(t,e,i,n){return e>>4},sy:function(t,e,i,n){return(1<<n)-i>>4}},new _.UrlTemplateImageryProvider(t)}},_installGooGleImageryProvider:function(){_.Scene.GoogleImageryProvider=function(t){return t.url="img"===t.style?"http://mt{s}.google.cn/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali":"ter"===t.style?"http://mt{s}.google.cn/vt/lyrs=t@131,r@227000000&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}&s=Galile":"http://mt{s}.google.cn/vt/lyrs=m@207000000&hl=zh-CN&gl=CN&src=app&x={x}&y={y}&z={z}&s=Galile",t.subdomains||(t.subdomains=["1","2","3","4","5"]),new _.UrlTemplateImageryProvider(t)}},_installBaiduImageryProvider:function(){var e="http://api{s}.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&scale=1&customid={style}";function t(t){e=t.temp_url||e,this._url=e,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=18,this._minimumLevel=1,this._tilingScheme=new _.WebMercatorTilingScheme({rectangleSouthwestInMeters:new _.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new _.Cartesian2(33554054,33746824)}),this._rectangle=this._tilingScheme.rectangle,this._credit=void 0,this._style=t.style||"normal"}Object.defineProperties(t.prototype,{url:{get:function(){return this._url}},token:{get:function(){return this._token}},tileWidth:{get:function(){if(this.ready)return this._tileWidth;throw new _.DeveloperError("tileWidth must not be called before the imagery provider is ready.")}},tileHeight:{get:function(){if(this.ready)return this._tileHeight;throw new _.DeveloperError("tileHeight must not be called before the imagery provider is ready.")}},maximumLevel:{get:function(){if(this.ready)return this._tileHeight;throw new _.DeveloperError("tileHeight must not be called before the imagery provider is ready.")}},minimumLevel:{get:function(){if(this.ready)return 0;throw new _.DeveloperError("minimumLevel must not be called before the imagery provider is ready.")}},tilingScheme:{get:function(){if(this.ready)return this._tilingScheme;throw new _.DeveloperError("tilingScheme must not be called before the imagery provider is ready.")}},rectangle:{get:function(){if(this.ready)return this._rectangle;throw new _.DeveloperError("rectangle must not be called before the imagery provider is ready.")}},ready:{get:function(){return!!this._url}},credit:{get:function(){return this._credit}}}),t.prototype.requestImage=function(t,e,i){var n,a;if(this.ready)return n=this._tilingScheme.getNumberOfXTilesAtLevel(i),a=this._tilingScheme.getNumberOfYTilesAtLevel(i),t=this._url.replace("{x}",t-n/2).replace("{y}",a/2-e-1).replace("{z}",i).replace("{s}",1).replace("{style}",this._style),_.ImageryProvider.loadImage(this,t);throw new _.DeveloperError("requestImage must not be called before the imagery provider is ready.")},_.Scene.BaiduImageryProvider=t},_installGroundSkyBox:function(){var o=_.BoxGeometry,s=_.Cartesian3,e=_.defaultValue,l=_.defined,i=_.destroyObject,c=_.DeveloperError,h=_.GeometryPipeline,t=_.Matrix3,x=_.Matrix4,d=_.Transforms,u=_.VertexFormat,p=_.BufferUsage,g=_.CubeMap,n=_.DrawCommand,m=_.loadCubeMap,f=_.RenderState,v=_.VertexArray,y=_.BlendingState,b=_.SceneMode,C=_.ShaderProgram,w=_.ShaderSource;function a(t){this.sources=t.sources,this._sources=void 0,this.show=e(t.show,!0),this._command=new n({modelMatrix:x.clone(x.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}l(x.getRotation)||(x.getRotation=x.getMatrix3);var I=new t;a.prototype.update=function(t,e){var i=this;if(this.show&&(t.mode===b.SCENE3D||t.mode===b.MORPHING)&&t.passes.render){var n=t.context;if(this._sources!==this.sources){this._sources=this.sources;var a=this.sources;if(!(l(a.positiveX)&&l(a.negativeX)&&l(a.positiveY)&&l(a.negativeY)&&l(a.positiveZ)&&l(a.negativeZ)))throw new c("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof a.positiveX!=typeof a.negativeX||typeof a.positiveX!=typeof a.positiveY||typeof a.positiveX!=typeof a.negativeY||typeof a.positiveX!=typeof a.positiveZ||typeof a.positiveX!=typeof a.negativeZ)throw new c("this.sources properties must all be the same type.");"string"==typeof a.positiveX?m(n,this._sources).then(function(t){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=t}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new g({context:n,source:a}))}var r=this._command;if(r.modelMatrix=d.eastNorthUpToFixedFrame(t.camera._positionWC),l(r.vertexArray)||(r.uniformMap={u_cubeMap:function(){return i._cubeMap},u_rotateMatrix:function(){return x.getRotation(r.modelMatrix,I)}},a=o.createGeometry(o.fromDimensions({dimensions:new s(2,2,2),vertexFormat:u.POSITION_ONLY})),t=this._attributeLocations=h.createAttributeLocations(a),r.vertexArray=v.fromGeometry({context:n,geometry:a,attributeLocations:t,bufferUsage:p._DRAW}),r.renderState=f.fromCache({blending:y.ALPHA_BLEND})),l(r.shaderProgram)&&this._useHdr===e||(a=new w({defines:[e?"HDR":""],sources:["uniform samplerCube u_cubeMap;\n in vec3 v_texCoord;\n void main()\n {\n vec4 color = texture(u_cubeMap, normalize(v_texCoord));\n out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);\n }\n "]}),r.shaderProgram=C.fromCache({context:n,vertexShaderSource:"in vec3 position;\n out vec3 v_texCoord;\n uniform mat3 u_rotateMatrix;\n void main()\n {\n vec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position.xyz;\n }\n ",fragmentShaderSource:a,attributeLocations:this._attributeLocations}),this._useHdr=e),l(this._cubeMap))return r}},a.prototype.isDestroyed=function(){return!1},a.prototype.destroy=function(){var t=this._command;return t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),i(this)},_.Scene.GroundSkyBox=a},removeHandlerByName(t=[]){t.forEach(t=>{this._viewer.screenSpaceEventHandler.removeInputAction(_.ScreenSpaceEventType[t])})}};let I={};function z(t,e){t&&(this._viewer=t,I=e)}z.prototype={splitCartesians3:function(t){for(var e=[],i=0;i<t.length;i+=3){var n=new I.Cartesian3(t[i],t[i+1],t[i+2]);e.push(n)}return e.push(e[0]),e},getLinkedPointList:function(t,e,i,n){if(this._viewer){var a=[],r=I.Cartographic.fromCartesian(t),o=I.Cartographic.fromCartesian(e),s=180*r.longitude/Math.PI,r=180*r.latitude/Math.PI,l=180*o.longitude/Math.PI,o=180*o.latitude/Math.PI,c=Math.sqrt((s-l)*(s-l)+(r-o)*(r-o))*i,h=I.Cartesian3.clone(t),x=I.Cartesian3.clone(e),d=I.Cartesian3.distance(h,I.Cartesian3.ZERO),u=I.Cartesian3.distance(x,I.Cartesian3.ZERO);if(I.Cartesian3.normalize(h,h),I.Cartesian3.normalize(x,x),0!=I.Cartesian3.distance(h,x)){var p=I.Cartesian3.angleBetween(h,x);a.push(t);for(var g=1;g<n-1;g++){var m=+g/(n-1),f=1-m,v=Math.sin(f*p)/Math.sin(p),y=Math.sin(m*p)/Math.sin(p),v=I.Cartesian3.multiplyByScalar(h,v,new I.Cartesian3),y=I.Cartesian3.multiplyByScalar(x,y,new I.Cartesian3),v=I.Cartesian3.add(v,y,new I.Cartesian3),y=m*Math.PI,f=d*f+u*m+Math.sin(y)*c,v=I.Cartesian3.multiplyByScalar(v,f,v);a.push(v)}a.push(e)}return a}},getPositionsAngle:function(t){var e,i,n,a;if(t)return i=t.position1,a=t.position2,n=I.Transforms.eastNorthUpToFixedFrame(i),n=I.Matrix4.inverse(n,new I.Matrix4),i=I.Matrix4.multiplyByPoint(n,i,new I.Cartesian3),n=I.Matrix4.multiplyByPoint(n,a,new I.Cartesian3),"pitch"===t.type?e=Math.atan2(n.z-i.z,n.x-i.x):"heading "===t.type&&(e=Math.atan2(n.y-i.y,n.x-i.x)),(a=e*(180/Math.PI))<0&&(a+=360),a},getPositionsArea:function(n){let t=0;if(n){let e=0,i=I.Ellipsoid.WGS84;n.push(n[0]);for(let t=1;t<n.length;t++){var a=i.cartographicToCartesian(this.transformWGS84ToCartographic(n[t-1])),r=i.cartographicToCartesian(this.transformWGS84ToCartographic(n[t]));e+=a.x*r.y-r.x*a.y}t=Math.abs(e).toFixed(2)}return t},getPolygonArea:function(t){if(this._viewer){for(var e=function(t,e){var i=t.lat*radiansPerDegree,t=t.lon*radiansPerDegree,n=e.lat*radiansPerDegree,e=e.lon*radiansPerDegree,i=-Math.atan2(Math.sin(t-e)*Math.cos(n),Math.cos(i)*Math.sin(n)-Math.sin(i)*Math.cos(n)*Math.cos(t-e));return i<0&&(i+=2*Math.PI),i*degreesPerRadian},i=0,n=0;n<t.length-2;n++){var a=(n+1)%t.length,r=(n+2)%t.length,o=(o=t[n],s=t[a],l=t[r],c=void 0,(c=e(s,o)-e(s,l))<0&&(c+=360),c);i+=this.getPositionsDistance(positions[n],positions[a])*this.getPositionsDistance(positions[a],positions[r])*Math.abs(Math.sin(o))}return(i/1e6).toFixed(4)}var o,s,l,c},getPointDistance:function(t,e){var i;if(this._viewer)return t=I.Cartographic.fromCartesian(t),e=I.Cartographic.fromCartesian(e),(i=new I.EllipsoidGeodesic).setEndPoints(t,e),i=i.surfaceDistance,Math.sqrt(Math.pow(i,2)+Math.pow(e.height-t.height,2))},getPositionDistance:function(e){let i=0;for(let t=0;t<e.length-1;t++){var n=this.transformWGS84ToCartographic(e[t]),a=this.transformWGS84ToCartographic(e[t+1]),r=new I.EllipsoidGeodesic,r=(r.setEndPoints(n,a),r.surfaceDistance),r=Math.sqrt(Math.pow(r,2)+Math.pow(a.height-n.height,2));i+=r}return i.toFixed(3)},getIntersectObj:function(t,e,i=[],n=!1){if(this._viewer)return e=I.Cartesian3.normalize(I.Cartesian3.subtract(e,t,new I.Cartesian3),new I.Cartesian3),t=new I.Ray(t,e),e=[],n?e=this._viewer.scene.drillPickFromRay(t,10,i):(n=this._viewer.scene.pickFromRay(t,i),I.defined(n)&&(e=[n])),e},getPointOnEllipsoid:function(t,e,i,n,a,r,o,s,l,c){var h,x,d,u;if(this._viewer)return h=new I.Cartesian3,x=new I.Cartesian3,d=new I.Quaternion,u=new I.Matrix3,e=t+e,I.Cartesian3.multiplyByScalar(n,Math.cos(e),h),I.Cartesian3.multiplyByScalar(i,Math.sin(e),x),I.Cartesian3.add(h,x,h),n=Math.cos(t),n*=n,i=Math.sin(t),i*=i,e=r/Math.sqrt(o*n+a*i)/s,I.Quaternion.fromAxisAngle(h,e,d),I.Matrix3.fromQuaternion(d,u),I.Matrix3.multiplyByVector(u,l,c),I.Cartesian3.normalize(c,c),I.Cartesian3.multiplyByScalar(c,s,c),c},raisePositionsToHeight:function(t,e,i){if(this._viewer){for(var n=new I.Cartesian3,a=new I.Cartesian3,r=new I.Cartesian3,o=new I.Cartesian3,s=e.ellipsoid,l=e.height,c=e.extrudedHeight,e=i?t.length/3*2:t.length/3,h=new Float64Array(3*e),x=t.length,d=i?x:0,u=0;u<x;u+=3){var p=u+1,g=u+2,m=I.Cartesian3.fromArray(t,u,n),f=(s.scaleToGeodeticSurface(m,m),I.Cartesian3.clone(m,a)),v=s.geodeticSurfaceNormal(m,o),y=I.Cartesian3.multiplyByScalar(v,l,r);I.Cartesian3.add(m,y,m),i&&(I.Cartesian3.multiplyByScalar(v,c,y),I.Cartesian3.add(f,y,f),h[u+d]=f.x,h[p+d]=f.y,h[g+d]=f.z),h[u]=m.x,h[p]=m.y,h[g]=m.z}return h}},computeEllipseEdgePositions:function(t){if(this._viewer){for(var e=new I.Cartesian3,i=new I.Cartesian3,n=new I.Cartesian3,a=new I.Cartesian3,r=t.semiMinorAxis,o=t.semiMajorAxis,s=t.rotation,l=t.center,t=t.granularity&&"number"==typeof t.granularity?t.granularity:Math.PI/180,c=((t=t>Math.PI/12?Math.PI/12:t)<Math.PI/180&&(t=Math.PI/180),r*r),h=o*o,x=o*r,d=I.Cartesian3.magnitude(l),u=I.Cartesian3.normalize(l,e),p=I.Cartesian3.cross(I.Cartesian3.UNIT_Z,l,i),p=I.Cartesian3.normalize(p,p),g=I.Cartesian3.cross(u,p,n),m=Math.ceil(2*I.Math.PI/t),f=t,v=a,y=0,b=[],C=0;C<m;C++)v=this.getPointOnEllipsoid(C*f,s,g,p,c,x,h,d,u,v),b[y++]=v.x,b[y++]=v.y,b[y++]=v.z;o={};return o.numPts=m,o.outerPositions=b,o}},computeSectorEdgePositions:function(t){if(this._viewer){for(var e=new I.Cartesian3,i=new I.Cartesian3,n=new I.Cartesian3,a=new I.Cartesian3,r=t.semiMinorAxis,o=t.semiMajorAxis,s=t.rotation,l=t.angle||2*Math.PI,c=t.center,t=t.granularity&&"number"==typeof t.granularity?t.granularity:Math.PI/180,h=((t=t>Math.PI/12?Math.PI/12:t)<Math.PI/180&&(t=Math.PI/180),r*r),x=o*o,d=o*r,u=I.Cartesian3.magnitude(c),p=I.Cartesian3.normalize(c,e),g=I.Cartesian3.cross(I.Cartesian3.UNIT_Z,c,i),g=I.Cartesian3.normalize(g,g),m=I.Cartesian3.cross(p,g,n),f=Math.ceil(l/t),v=t,y=a,b=0,C=[],w=0;w<f;w++)y=this.getPointOnEllipsoid(w*v,s,m,g,h,d,x,u,p,y),C[b++]=y.x,C[b++]=y.y,C[b++]=y.z;o={};return o.numPts=f,o.outerPositions=C,o}},computeLonlatPointsTerrainData:function(t,e){if(this._viewer){for(var i=[],n=0;n<t.length;n++)i.push(I.Cartographic.fromDegrees(t[n].lon,t[n].lat));this._viewer.scene.clampToHeightMostDetailed(i).then(function(t){e(t)})}},computeCartographicPointsTerrainData:function(t,a){if(this._viewer&&!(t.length<=0)){for(var e=[],i=0;i<t.length;i++)e.push(I.Cartesian3.fromRadians(t[i].longitude,t[i].latitude,t[i].height));var n=this._viewer.scene.clampToHeightMostDetailed(e),r=this;n.then(function(t){for(var e=[],i=r._viewer.scene.globe.ellipsoid,n=0;n<t.length;n++)e.push(i.cartesianToCartographic(t[n]));a(e)}).catch(function(t){console.log(t)})}},_checkLonDegree:function(t){return!(180<t||t<-180)},_checkLatDegree:function(t){return!(90<t||t<-90)},computeInterpolateLineLonlat:function(t,e){if(!t||!e)return null;if(t.lon||!t.lat||!e.lon||!e.lat)return null;if(!(this._checkLonDegree(t.lon)&&this._checkLonDegree(e.lon)&&this._checkLatDegree(t.lat)&&this._checkLatDegree(e.lat)))return null;var i=[],n=(i.push([t.lon,t.lat]),Math.sqrt(Math.pow(e.lon-t.lon,2)+Math.pow(e.lat-t.lat,2)));if(n<=1e-5)i.push([e.lon,e.lat]);else for(var a=n/1e-5,r=(e.lon-t.lon)/a,o=(e.lat-t.lat)/a,s=0;s<a;s++){var l=t.lon+(s+1)*r,c=t.lat+(s+1)*o;i.push([l,c])}return i},computeInterpolateLineCartographic:function(t,e,i){if(!t||!e)return null;if(!(t.longitude&&t.latitude&&e.longitude&&e.latitude))return null;var n=[],a=(n.push(new I.Cartographic(t.longitude,t.latitude)),Math.sqrt(Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2))),i=i&&"number"==typeof i?i:1e-5*Math.PI/180;if(a<=i)n.push(new I.Cartographic(e.longitude,e.latitude));else{for(var r=a/i,o=(e.longitude-t.longitude)/r,s=(e.latitude-t.latitude)/r,l=0;l<r;l++){var c=t.longitude+(l+1)*o,h=t.latitude+(l+1)*s;n.push(new I.Cartographic(c,h))}n.push(new I.Cartographic(e.longitude,e.latitude,e.height))}return n},computeInterpolateLineHeightCartographic:function(t,e){if(!t||!e)return null;if(!(t.longitude&&t.latitude&&e.longitude&&e.latitude))return null;var i=[],n=(i.push(new I.Cartographic(t.longitude,t.latitude,t.height)),Math.sqrt(Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2)));if(!(n<=1e-5*Math.PI/180))for(var a=n/1e-5*Math.PI/180,r=(e.longitude-t.longitude)/a,o=(e.latitude-t.latitude)/a,s=(e.height-t.height)/a,l=0;l<a;l++){var c=t.longitude+(l+1)*r,h=t.latitude+(l+1)*o,x=t.height+(l+1)*s;i.push(new I.Cartographic(c,h,x))}return i.push(new I.Cartographic(e.longitude,e.latitude,e.height)),i},computeInterpolate2IndexLineHeightCartographic:function(t,e,i,n){if(!t||!e)return null;if(!(t.longitude&&t.latitude&&e.longitude&&e.latitude))return null;var a=[];a.push(new I.Cartographic(t.longitude,t.latitude,t.height));for(var r=(e.longitude-t.longitude)/i,o=(e.latitude-t.latitude)/i,s=(e.height-t.height)/i,l=0;l<n;l++){var c=t.longitude+(l+1)*r,h=t.latitude+(l+1)*o,x=t.height+(l+1)*s;a.push(new I.Cartographic(c,h,x))}return a},computeInterpolateIndexLineHeightCartographic:function(t,e,i,n){var a,r;return t&&e&&t.longitude&&t.latitude&&e.longitude&&e.latitude?(a=(e.longitude-t.longitude)/i,r=(e.latitude-t.latitude)/i,e=(e.height-t.height)/i,i=t.longitude+n*a,a=t.latitude+n*r,r=t.height+n*e,new I.Cartographic(i,a,r)):null}};let F=null;function L(t,e,i){t&&(this._viewer=t,F=e,this._installPrimitives())}L.prototype={_installPrimitives:function(){this._installProbingPrimitive(),this._installTexturePrimitive(),this._installWaterPrimitive(),this._installPointsPrimitive(),this._installShadowPrimitive(),this._installArrowPolylinePrimitive(),this._installXyzAxisPrimitive(),this._installTetrahedronPrimitive(),this._installCustomPrimitive()},_installCustomPrimitive:function(){},_installTetrahedronPrimitive:function(){try{var i=F.Cartesian3,n=F.ComponentDatatype,o=F.PrimitiveType,a=F.BoundingSphere,r=F.GeometryAttribute,s=F.GeometryPipeline,l=F.Geometry,c=F.defined,h=F.RenderState,x=F.ShaderSource,d=F.ShaderProgram,u=F.DrawCommand,p=F.Pass,g=F.Appearance,m=F.BufferUsage,e=F.Color,f=F.VertexArray,v=(F.buildModuleUrl,F.Matrix4),y=F.Matrix3,b=F.Texture,t=F.Resource,C=F.Transforms,w=F.defaultValue,I=this._viewer,_=this.getDfSt(["primitive","TetrahedronPrimitive"])||"static/data/images/Textures/fence.png",A=function(t){this.show=!0,this._command=void 0,this._enuMatrix=void 0,this._scaleMatrix=void 0,this._localPosition=t.position,this._createCommand=G,this._angle=0,this._distance=w(t.distance,1),this._setInterval=void 0,this._viewer=I,this._speed=w(t.speed,1),this._color=w(t.color,new e(1,1,0,.8)),this._scale=w(t.scale,new i(10,10,15)),this._texture=void 0,this._imageUrl=_,this._modelMatrix=V(this),this._height=R(this),S(this)};A.prototype.update=function(t){this.show&&(c(this._command)||(this._command=this._createCommand(t.context,this)),c(this._command))&&t.commandList.push(this._command)},A.prototype.isDestroyed=function(){return!1},A.prototype.destroy=function(){return c(this._command)&&(this._command.shaderProgram=this._command.shaderProgram&&this._command.shaderProgram.destroy()),destroyObject(this)},A.prototype.startAnimate=function(){let e=this;this._setInterval=setInterval(function(){e._angle=e._angle+.01,0<Math.sin(e._angle)?e._height=.01:e._height=-.01;var t=new F.Cartesian3(0,0,e._height),t=(v.multiplyByTranslation(e._modelMatrix,t,e._modelMatrix),v.fromRotationTranslation(y.fromRotationZ(F.Math.toRadians(e._speed))));v.multiply(e._modelMatrix,t,e._modelMatrix)},5)},A.prototype.closeAnimate=function(){clearInterval(this._setInterval)};const G=function(t,e){var i=M(),n=Z(),a=g.getDefaultRenderState(!1,!0,void 0),a=h.fromCache(a),i=new x({sources:[i]}),n=new x({sources:[n]}),r={color:function(){return e._color},myImage:function(){return c(e._texture)?e._texture:e._viewer.scene.context.defaultTexture}},i=d.fromCache({context:t,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:{position:0,textureCoordinates:1}});return new u({vertexArray:P(t),primitiveType:o.TRIANGLES,renderState:a,shaderProgram:i,uniformMap:r,owner:this,pass:p.TRANSLUCENT,modelMatrix:e._modelMatrix})},P=function(t){var e=W(),e=new l({attributes:{position:new r({componentDatatype:n.FLOAT,componentsPerAttribute:3,values:e.positions}),textureCoordinates:new r({componentDatatype:n.FLOAT,componentsPerAttribute:2,values:e.sts})},indices:e.indices,primitiveType:o.TRIANGLES,boundingSphere:a.fromVertices(e.positions)}),e=s.computeNormal(e);return f.fromGeometry({context:t,geometry:e,attributeLocations:{position:0,textureCoordinates:1},bufferUsage:m.STATIC_DRAW})},W=function(){var t=new Float64Array(15),e=(t[0]=0,t[1]=1,t[2]=0,t[3]=-1,t[4]=0,t[5]=0,t[6]=0,t[7]=-1,t[8]=0,t[9]=1,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=-1,new Uint16Array(18));return e[0]=4,e[1]=2,e[2]=3,e[3]=4,e[4]=3,e[5]=0,e[6]=4,e[7]=0,e[8]=1,e[9]=4,e[10]=1,e[11]=2,e[12]=1,e[13]=2,e[14]=3,e[15]=1,e[16]=3,e[17]=0,{indices:e,positions:t,sts:new Float32Array([0,0,1,0,1,1,0,1,.5,.5])}},M=function(){return"#version 300 es\n in vec3 position;\n in vec3 normal;\n in vec2 st;\n in float batchId;\n out vec3 v_positionEC;\n out vec3 v_normalEC;\n out vec2 v_st;\n out vec4 v_pickColor;\n void main()\n {\n v_positionEC = (czm_modelView * vec4(position, 1.0)).xyz;\n v_normalEC = czm_normal * normal;\n v_st = st;\n // v_pickColor = czm_batchTable_pickColor(batchId);\n gl_Position = czm_modelViewProjection * vec4(position, 1.0);\n }\n "},Z=function(){return"#version 300 es\n precision mediump float;\n in vec3 v_positionEC;\n in vec3 v_normalEC;\n in vec2 v_st;\n uniform vec4 color;\n in vec4 v_pickColor;\n uniform sampler2D myImage;\n void main()\n {\n vec3 positionToEyeEC = -v_positionEC;\n vec3 normalEC = normalize(v_normalEC);\n #ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n #endif\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n vec2 st = materialInput.st;\n czm_material material = czm_getDefaultMaterial(materialInput);\n float dt_a11 = fract(czm_frameNumber / 100.0) * 3.14159265 * 2.0;\n float dt_a12 = sin(dt_a11);\n float vst=smoothstep(0.7, 1.0, dt_a12)+0.4;\n vec4 colorImage = texture(myImage, vec2(fract(st.s- czm_frameNumber*0.003), st.t));\n material.alpha =mix(0.1,1.0,clamp((1.0-st.t) * color.a,0.0,1.0)) +(1.0-sign(st.t-czm_frameNumber*0.001))*0.2*(1.0-colorImage.r)+0.4;\n material.diffuse =(1.0-colorImage.a)*vec3(1.0,2.0,1.0)+colorImage.rgb*vec3(1.0,2.0,1.0);\n #ifdef FLAT\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n #else\n out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n #endif\n }\n "},S=function(i){t.createIfNeeded(i._imageUrl).fetchImage().then(function(t){var e=i._viewer.scene.context,e=c(t.internalFormat)?new b({context:e,pixelFormat:t.internalFormat,width:t.naturalWidth,height:t.naturalHeight,source:{arrayBufferView:t.bufferView}}):new b({context:e,source:t});i._texture=e})},V=function(t){var e=C.eastNorthUpToFixedFrame(t._localPosition),i=v.fromScale(t._scale),n=v.multiply(e,i,new v);return t._scaleMatrix=i,t._enuMatrix=e,n},R=function(t){var e=i.fromElements(0,0,t._distance,new F.Cartesian3),e=F.Matrix4.multiplyByPoint(t._enuMatrix,e,new i),e=v.multiplyByPoint(t._viewer.scene.camera._viewMatrix,e,new i),t=v.multiplyByPoint(t._viewer.scene.camera.frustum.projectionMatrix,e,new i);return i.normalize(t,new i).z};F.Scene.TetrahedronPrimitive=A}catch(i){console.log(i)}},_installXyzAxisPrimitive:function(){function t(t){this._viewer=t.viewer,this._model=t.model,this._matrix=t.matrix,this._radius=void 0,this._layer=new F.CustomDataSource("xyz-axis"),this._viewer.dataSources.add(this._layer),this._handler=new F.ScreenSpaceEventHandler(this._viewer.scene.canvas),this._xyzState=!1,this._xyzPid=void 0,this._builds()}t.prototype={_builds(){this._createAxisXYZ(),this._bindHandler()},remove(){this._layer._primitives.removeAll(),this._handler.distory()},_createAxisXYZ:function(){this._model.readyPromise.then(t=>{var e=F.Matrix4.getTranslation(t.modelMatrix,new F.Cartesian3),t=t.boundingSphere,i=t.radius,n=new F.ArrowPolylinePrimitive({id:"axisZ",color:F.Color.RED,position:e,width:3,headWidth:5,length:2*i+50,headLength:10}),a=new F.ArrowPolylinePrimitive({id:"axisX",color:F.Color.GREEN,position:e,width:3,headWidth:5,length:2*i+50,headLength:10}),e=new F.ArrowPolylinePrimitive({id:"axisY",color:F.Color.BLUE,position:e,width:3,headWidth:5,length:2*i+50,headLength:10}),i=F.Matrix3.fromRotationY(F.Math.toRadians(90)),i=(this._rotationX=F.Matrix4.fromRotationTranslation(i),F.Matrix4.multiply(a.geometryInstances[0].modelMatrix,this._rotationX,a.geometryInstances[0].modelMatrix),F.Matrix4.multiply(a.geometryInstances[1].modelMatrix,this._rotationX,a.geometryInstances[1].modelMatrix),F.Matrix3.fromRotationX(F.Math.toRadians(90)));this._rotationY=F.Matrix4.fromRotationTranslation(i),F.Matrix4.multiply(e.geometryInstances[0].modelMatrix,this._rotationY,e.geometryInstances[0].modelMatrix),F.Matrix4.multiply(e.geometryInstances[1].modelMatrix,this._rotationY,e.geometryInstances[1].modelMatrix),this._layer._primitives.add(n),this._layer._primitives.add(a),this._layer._primitives.add(e),this._radius=t.radius,this._createAxisSphere()})},_createAxisSphere:function(){var e=[];for(let t=0;t<=360;t+=3){const i=Math.sin(F.Math.toRadians(t)),n=Math.cos(F.Math.toRadians(t)),a=this._radius*n,r=this._radius*i;e.push(new F.Cartesian3(a,r,0))}var t=this._createAxisSpheres("axisSphereZ",e,this._matrix,F.Color.RED);this._layer._primitives.add(t);const i=this._createAxisSpheres("axisSphereY",e,this._matrix,F.Color.GREEN),n=(this._layer._primitives.add(i),F.Matrix4.multiply(i.geometryInstances.modelMatrix,this._rotationY,i.geometryInstances.modelMatrix),this._createAxisSpheres("axisSphereX",e,this._matrix,F.Color.BLUE));this._layer._primitives.add(n),F.Matrix4.multiply(n.geometryInstances.modelMatrix,this._rotationX,n.geometryInstances.modelMatrix)},_createAxisSpheres:function(t,e,i,n){e=new F.PolylineGeometry({positions:e,width:10}),e=new F.GeometryInstance({geometry:e,id:t,attributes:{color:F.ColorGeometryInstanceAttribute.fromColor(n)}});return new F.Primitive({geometryInstances:e,appearance:new F.PolylineColorAppearance({translucent:!1}),modelMatrix:i})},_updateAxis(i){if(this._layer){var n=this._layer._primitives._primitives;for(let t=1,e=n.length;t<e;t++){var a=n[t],r=F.Matrix4.fromTranslation(new F.Cartesian3(i.x,i.y,i.z));F.Matrix4.multiply(a.modelMatrix,r,a.modelMatrix)}}var t=F.Matrix4.fromTranslation(new F.Cartesian3(i.x,i.y,i.z));F.Matrix4.multiply(this._model.modelMatrix,t,this._model.modelMatrix)},_updateAxisSphere(i){if(this._layer){var n=this._layer._primitives._primitives;for(let t=1,e=n.length;t<e;t++){var a=n[t],r=F.Matrix4.fromRotationTranslation(i);F.Matrix4.multiply(a.modelMatrix,r,a.modelMatrix)}}var t=F.Matrix4.fromRotationTranslation(i);F.Matrix4.multiply(this._model.modelMatrix,t,this._model.modelMatrix)},_bindHandler(){this._handler.setInputAction(t=>{if(this._xyzState&&this._xyzPid)switch(this._xyzPid){case"axisX-line":this._updateAxis({x:-1,y:0,z:0});break;case"axisY-line":this._updateAxis({x:0,y:-1,z:0});break;case"axisZ-line":this._updateAxis({x:0,y:0,z:-1});break;case"axisX-arrow":this._updateAxis({x:1,y:0,z:0});break;case"axisY-arrow":this._updateAxis({x:0,y:1,z:0});break;case"axisZ-arrow":this._updateAxis({x:0,y:0,z:1});break;case"axisSphereX":this._updateAxisSphere(F.Matrix3.fromRotationX(F.Math.toRadians(1)));break;case"axisSphereY":this._updateAxisSphere(F.Matrix3.fromRotationY(F.Math.toRadians(1)));break;case"axisSphereZ":this._updateAxisSphere(F.Matrix3.fromRotationZ(F.Math.toRadians(1)))}},F.ScreenSpaceEventType.MOUSE_MOVE),this._handler.setInputAction(t=>{t=viewer.scene.pick(t.position);t&&t.id&&(this._xyzPid=t.id,this._xyzState=!0)},F.ScreenSpaceEventType.LEFT_DOWN),this._handler.setInputAction(()=>{this._xyzState=!1,this._xyzPid=void 0},F.ScreenSpaceEventType.LEFT_UP)}},F.Scene.XyzAxisPrimitive=t},_installArrowPolylinePrimitive:function(){F.Scene.ArrowPolylinePrimitive=function(t={}){this._color=t.color||F.Color.RED,this._width=t.width||3,this._headWidth=t.headWidth||2*this._width,this._length=t.length||300,this._headLength=t.headLength||10,this._inverse=t.inverse||!1,this.position=t.position;var t=t.id,e=F.CylinderGeometry.createGeometry(new F.CylinderGeometry({length:this._length,topRadius:this._width,bottomRadius:this._width})),i=F.CylinderGeometry.createGeometry(new F.CylinderGeometry({length:this._headLength,topRadius:0,bottomRadius:this._headWidth}));let n=(this._length+this._headLength)/2;this._inverse&&(n=-n);var a=i,r=[0,0,n],o=new F.Cartesian3;r.length?(o.x=r[0],o.y=r[1],o.z=r[2]):F.Cartesian3.clone(r,o);for(let t=0;t<a.attributes.position.values.length;t+=3)a.attributes.position.values[t]+=o.x,a.attributes.position.values[t+1]+=o.y,a.attributes.position.values[t+2]+=o.z;return new F.Primitive({modelMatrix:F.Transforms.eastNorthUpToFixedFrame(this.position),geometryInstances:[new F.GeometryInstance({id:t+"-line",geometry:e}),new F.GeometryInstance({id:t+"-arrow",geometry:i})],appearance:new F.MaterialAppearance({material:F.Material.fromType("Color",{color:this._color})})})}},_installShadowPrimitive:function(){function t(t){var e=(t=F.defaultValue(t,F.defaultValue.EMPTY_OBJECT)).scene;if(!F.defined(e))throw new F.DeveloperError("scene is required.");var i=(this._scene=e)._context;if(!F.defined(i))throw new F.DeveloperError("context is required.");if(!F.defined(t.viewerPosition))throw new F.DeveloperError("this view position is required.");this._viewerPosition=t.viewerPosition,this._positions=void 0,this._indices=void 0,this._drawLineCommand=void 0,this._depthCamera=new F.Camera(e),this._depthCamera.position=this._viewerPosition,this._direction=0,this._pitch=0,this._horizontalFov=F.defaultValue(t.horizontalFov,60),this._verticalFov=F.defaultValue(t.verticalFov,45),this._cameraUpdated=!1,this._targetPoint=this._viewerPosition.clone();e=new F.Cartesian3(0,0,100),t=F.Transforms.eastNorthUpToFixedFrame(this._viewerPosition);F.Matrix4.multiplyByPoint(t,e,this._targetPoint),this._distance=100,this._cameraUpdated=!1,this._modelMatrix=new F.Matrix4,this._shadowMap=new F.ShadowMap({context:i,enabled:!0,lightCamera:this._depthCamera,cascadesEnabled:!1}),this.show=!0,this._invisiblyColor=F.Color.RED,this._visiblyColor=F.Color.GREEN,this._shadowMap.useCustomColor=!0,this.shadowMap._customColor={invisibly:F.Color.RED,visibly:F.Color.GREEN},this._initialize=function(){this._positions=new Float32Array(633),this._indices=new Uint16Array(408);var t=this._indices,e=0;t[e++]=0,t[e++]=1,t[e++]=0,t[e++]=21,t[e++]=0,t[e++]=85,t[e++]=0,t[e++]=105;for(var i=0,n=0;n<5;++n){i++;for(var a=0;a<20;++a)t[e++]=i++,t[e++]=i}i++;for(var r=0;r<20;++r)for(var o=0;o<5;++o)t[e++]=i,t[e++]=5+i++;this._initialized=!0},this._debugLightFrustum=void 0,this._debugShow=!0}Object.defineProperties(t.prototype,{shadowMap:{get:function(){return this._shadowMap}},debugLightFrustum:{get:function(){return this._debugLightFrustum}},debugShow:{get:function(){return this._debugShow},set:function(t){this.shadowMap.debugShow=t,this._debugShow=t}},invisiblyColor:{get:function(){return this._invisiblyColor},set:function(t){this._invisiblyColor=t,this.shadowMap._customColor.invisibly=t}},visiblyColor:{get:function(){return this._visiblyColor},set:function(t){this._visiblyColor=t,this.shadowMap._customColor.visibly=t}},viewerPosition:{get:function(){return this._viewerPosition},set:function(t){this._viewerPosition=t,this._cameraUpdated=!1}},direction:{get:function(){return this._direction},set:function(t){this._direction=t,this._cameraUpdated=!1}},pitch:{get:function(){return this._pitch},set:function(t){this._pitch=t,this._cameraUpdated=!1}},horizontalFov:{get:function(){return this._horizontalFov},set:function(t){this._horizontalFov=t,this._cameraUpdated=!1,this._hintLineUpdated=!1}},verticalFov:{get:function(){return this._verticalFov},set:function(t){this._verticalFov=t,this._cameraUpdated=!1,this._hintLineUpdated=!1}},distance:{get:function(){return this._distance},set:function(t){this._distance=t,this._cameraUpdated=!1}}}),t.prototype.setDebugFrustumEffect=function(e,i){var t,n;this.debugShow&&(t=this.debugLightFrustum._planesPrimitives,n=this.debugLightFrustum._outlinePrimitives,t.forEach(function(t){t.show=e}),n.forEach(function(t){t.show=i}))},t.prototype.update=function(t){var e;this.show&&(this._cameraUpdated||(this._updateCamera(),this.debugShow&&!F.defined(this.debugLightFrustum)&&(this._debugLightFrustum=new F.DebugCameraPrimitive({camera:this._depthCamera,color:F.Color.YELLOW,updateOnChange:!0}),this.setDebugFrustumEffect(!1,!0))),e=t.frustumSplits[1],t.frustumSplits[1]=this._distance,this._debugLightFrustum.update(t),t.frustumSplits[1]=e,t.shadowMaps.push(this.shadowMap))},t.prototype._updateCamera=function(){this._depthCamera.frustum.near=.001*this._distance,this._depthCamera.frustum.far=this._distance,this._depthCamera.frustum.fov=F.Math.toRadians(Math.max(this._horizontalFov,this._verticalFov)),this._depthCamera.frustum.aspectRatio=this._horizontalFov/this._verticalFov,this._depthCamera.setView({destination:this._viewerPosition,orientation:{heading:F.Math.toRadians(this._direction),pitch:F.Math.toRadians(this._pitch)}}),this._modelMatrix=this._depthCamera.inverseViewMatrix,this._cameraUpdated=!0},t.prototype.setPoseByTargetPoint=function(t){this.distance=F.Cartesian3.distance(this._viewerPosition,t);var e=new F.Cartesian3,i=F.Transforms.eastNorthUpToFixedFrame(this._viewerPosition);F.Matrix4.inverse(i,i),F.Matrix4.multiplyByPoint(i,t,e),F.Cartesian3.normalize(e,e),this.direction=F.Math.toDegrees(Math.atan2(e.x,e.y)),this.pitch=F.Math.toDegrees(Math.asin(e.z))},t.prototype._updateHintLine=function(t){var e,i=this._positions,n=F.Math.toRadians(this._horizontalFov),a=F.Math.toRadians(this._verticalFov),r=Math.tan(.5*n),a=Math.tan(.5*a),o=-(r=this._distance*r),a=-(e=this._distance*a),o=new F.Cartesian3(o,a,-this._distance),a=new F.Cartesian3(r,e,0),r=(F.Matrix4.multiplyByPoint(this._modelMatrix,o,o),F.Matrix4.multiplyByPoint(this._modelMatrix,a,a),F.BoundingSphere.fromCornerPoints(o,a));if(t.cullingVolume.computeVisibility(r)!==Intersect.OUTSIDE){this._valid=!0;var s=0;i[s++]=0,i[s++]=0,i[s++]=0;for(var l,c=Math.PI-.5*n,h=n/4,x=0;x<5;++x)for(var d=c+x*h,u=e/(this._distance/Math.cos(d)),p=-(v=Math.atan(u)),g=v/10,m=0;m<21;++m)l=p+m*g,i[s++]=this._distance*Math.cos(l)*Math.sin(d),i[s++]=this._distance*Math.sin(l),i[s++]=this._distance*Math.cos(l)*Math.cos(d);for(var h=n/20,f=0;f<21;++f){d=c+f*h;for(var v,u=e/(this._distance/Math.cos(d)),p=-(v=Math.atan(u)),g=v/2,y=0;y<5;++y)l=p+y*g,i[s++]=this._distance*Math.cos(l)*Math.sin(d),i[s++]=this._distance*Math.sin(l),i[s++]=this._distance*Math.cos(l)*Math.cos(d)}var b,C=t.context,o=F.Buffer.createIndexBuffer({context:C,typedArray:new Uint32Array(this._indices),usage:F.BufferUsage.STATIC_DRAW,indexDatatype:IndexDatatype.UNSIGNED_INT}),a=F.Buffer.createVertexBuffer({context:C,typedArray:F.ComponentDatatype.createTypedArray(F.ComponentDatatype.FLOAT,this._positions),usage:F.BufferUsage.STATIC_DRAW}),n=[],t=(n.push({index:0,vertexBuffer:a,componentDatatype:F.ComponentDatatype.FLOAT,componentsPerAttribute:3,normalize:!1}),new F.VertexArray({context:C,attributes:n,indexBuffer:o}));F.defined(this._drawLineCommand)?(this._drawLineCommand.vertexArray.destroy(),this._drawLineCommand.vertexArray=t,this._drawLineCommand.modelMatrix=this._modelMatrix,this._drawLineCommand.boundingVolume=r):(a=F.ShaderProgram.fromCache({context:C,vertexShaderSource:"ttribute vec3 position;\n uniform mat4 u_modelViewMatrix;\n void main()\n {\n gl_Position = czm_projection* u_modelViewMatrix* vec4(position.xyz,1.0);\n }\n ",fragmentShaderSource:"uniform vec4 u_bgColor;\n void main()\n {\n out_FragColor = u_bgColor;\n }\n "}),n=F.RenderState.fromCache({depthTest:{enabled:!0}}),o={u_bgColor:function(){return b._lineColor},u_modelViewMatrix:function(){return C.uniformState.modelView}},(b=this)._drawLineCommand=new F.DrawCommand({boundingVolume:r,modelMatrix:b._modelMatrix,primitiveType:F.PrimitiveType.LINES,vertexArray:t,shaderProgram:a,castShadows:!1,receiveShadows:!1,uniformMap:o,renderState:n,pass:F.Pass.OPAQUE})),this._hintLineUpdated=!0}else this._valid=!1},F.Scene.ShadowPrimitive=t},_installPointsPrimitive:function(){function t(t){t&&t.viewer&&t.Cartesians&&(this._vertexShader=this.getVSPolylie(),this._fragmentShader=this.getFSPolyline(),this._geometry=null,this._appearance=null,this._viewer=t.viewer,this.build(t))}t.prototype={build:function(t){if(t.Cartesians&&2<=t.Cartesians.length){var e=[],i=[],n=[];if(t.Colors&&t.Colors.length===4*t.Cartesians.length){for(var a=0;a<t.Cartesians.length;a++)e.push(t.Cartesians[a].x),e.push(t.Cartesians[a].y),e.push(t.Cartesians[a].z);i=t.Colors}else for(var r=0;r<t.Cartesians.length;r++)e.push(t.Cartesians[r].x),e.push(t.Cartesians[r].y),e.push(t.Cartesians[r].z),i.push(0),i.push(0),i.push(1),i.push(1);for(var o=0;o<t.Cartesians.length;o++)n.push(o);this.positionArr=new Float64Array(e),this.colorArr=new Float32Array(i),this.indiceArr=new Uint16Array(n)}else{var s=F.Cartesian3.fromDegrees(0,0,-10),l=F.Cartesian3.fromDegrees(0,.001,-10);this.positionArr=new Float64Array([s.x,s.y,s.z,l.x,l.y,l.z]),this.colorArr=new Float32Array([0,0,1,1,0,0,1,1]),this.indiceArr=new Uint16Array([0,1])}this._geometry=this.createGeometry(this.positionArr,this.colorArr,this.indiceArr),this._appearance=this.createAppearence(this._fragmentShader,this._vertexShader),this.primitive=this._viewer.scene.primitives.add(new F.Primitive({geometryInstances:new F.GeometryInstance({geometry:this._geometry}),appearance:this._appearance,asynchronous:!1}))},getVSPolylie:function(){return"in vec3 position3DHigh; in vec3 position3DLow; in vec4 color; out vec4 v_color; in float batchId; void main() { vec4 p = czm_computePosition(); v_color =color; p = czm_modelViewProjectionRelativeToEye * p; gl_Position = p; gl_PointSize=4.0; } "},getFSPolyline:function(){return"in vec4 v_color; void main() { float d = distance(gl_PointCoord, vec2(0.5,0.5)); if(d < 0.5){ out_FragColor = v_color; }else{ discard; } } "},createAppearence:function(t,e){return new F.Appearance({renderState:{blending:F.BlendingState.PRE_MULTIPLIED_ALPHA_BLEND,depthTest:{enabled:!0},depthMask:!0},fragmentShaderSource:t,vertexShaderSource:e})},createGeometry:function(t,e,i){return new F.Geometry({attributes:{position:new F.GeometryAttribute({componentDatatype:F.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:t}),color:new F.GeometryAttribute({componentDatatype:F.ComponentDatatype.FLOAT,componentsPerAttribute:4,values:e})},indices:i,primitiveType:F.PrimitiveType.POINTS,boundingSphere:F.BoundingSphere.fromVertices(t)})},remove:function(){null!=this.primitive&&(this._viewer.scene.primitives.remove(this.primitive),this.primitive=null)},updateCartesianPosition:function(t){if(null!=this.primitive&&(this._viewer.scene.primitives.remove(this.primitive),!(t&&t.length<2))){if(t.length===this.positionArr.length/3){var e=t[0],i=t[1];this.positionArr=new Float64Array([e.x,e.y,e.z,i.x,i.y,i.z]),this._geometry=this.createGeometry(this.positionArr,this.colorArr,this.indiceArr)}else{for(var n=[],a=[],r=[],o=0;o<t.length;o++)n.push(t[o].x),n.push(t[o].y),n.push(t[o].z),a.push(0),a.push(0),a.push(1),a.push(1);for(var s=0;s<t.length;s++)r.push(s);this.positionArr=new Float64Array(n),this.colorArr=new Float32Array(a),this.indiceArr=new Uint16Array(r),geometry=this.createGeometry(this.positionArr,this.colorArr,this.indiceArr),appearance=this.createAppearence(this._fragmentShader,this._vertexShader)}this.primitive=this._viewer.scene.primitives.add(new F.Primitive({geometryInstances:new F.GeometryInstance({geometry:this._geometry}),appearance:this._appearance,asynchronous:!1}))}},updateCartesianPositionColor:function(t,e){if(e.length===4*t.length&&null!=this.primitive&&(viewer.scene.primitives.remove(this.primitive),!(t&&t.length<2))){if(t.length===this.positionArr.length/3){var i=t[0],n=t[1];this.positionArr=new Float64Array([i.x,i.y,i.z,n.x,n.y,n.z]),this.colorArr=new Float32Array(e),geometry=CreateGeometry(this.positionArr,this.colorArr,this.indiceArr)}else{for(var a=[],r=[],o=0;o<t.length;o++)a.push(t[o].x),a.push(t[o].y),a.push(t[o].z);for(o=0;o<t.length;o++)r.push(o);this.positionArr=new Float64Array(a),this.colorArr=new Float32Array(e),this.indiceArr=new Uint16Array(r),this._geometry=this.createGeometry(this.positionArr,this.colorArr,this.indiceArr),this._appearance=this.createAppearence(this._fragmentShader,this._vertexShader)}this.primitive=viewer.scene.primitives.add(new F.Primitive({geometryInstances:new F.GeometryInstance({geometry:this._geometry}),appearance:this._appearance,asynchronous:!1}))}}},F.Scene.PointsPrimitive=t},_installWaterPrimitive:function(){function t(t){this._positions=t.positions,this._url=t.img||this.getDfSt(["primitive","WaterPrimitive"])||"static/data/images/Textures/waterNormals.jpg",this._frequency=t.frequency||1e3,this._animationSpeed=t.animationSpeed||.01,this._amplitude=t.amplitude||10,this._extrudedHeight=t.extrudedHeight||0,this._fs=this.getFS()}t.prototype.build=function(){this._geometry=this._createGeometry(),this._appearance=this._createAppearence(),this.primitive=this._viewer.scene.primitives.add(new F.Primitive({allowPicking:!1,geometryInstances:new F.GeometryInstance({geometry:this._geometry}),appearance:this._appearance,asynchronous:!1}))},t.prototype._createAppearence=function(){return new F.EllipsoidSurfaceAppearance({material:new F.Material({fabric:{type:"Water",uniforms:{normalMap:this._url,frequency:this._frequency,animationSpeed:this._animationSpeed,amplitude:this._amplitude}}}),fragmentShaderSource:this._fs})},t.prototype._createGeometry=function(){return new F.PolygonGeometry({polygonHierarchy:new F.PolygonHierarchy(F.Cartesian3.fromDegreesArrayHeights(this._positions)),extrudedHeight:this._extrudedHeight,perPositionHeight:!0})},t.prototype.getFS=function(){return"in vec3 v_positionMC;\n in vec3 v_positionEC;\n in vec2 v_st;\n \n void main()\n {\n czm_materialInput materialInput;\n vec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));\n #ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n #endif\n materialInput.s = v_st.s;\n materialInput.st = v_st;\n materialInput.str = vec3(v_st, 0.0);\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);\n vec3 positionToEyeEC = -v_positionEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getMaterial(materialInput);\n #ifdef FLAT\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n #else\n out_FragColor = czm_phong(normalize(positionToEyeEC), material);\n out_FragColor.a = 0.5;\n #endif\n }\n "},L.prototype.updateDegreesPosition=function(t,e){null==this.primitive||(this._viewer.scene.primitives.remove(this.primitive),t&&t.length<3)||(t=this._createGeometry(t,e||0),this.primitive=this._viewer.scene.primitives.add(new F.Primitive({allowPicking:!1,geometryInstances:new F.GeometryInstance({geometry:t}),appearance:this._appearance,asynchronous:!1})))},F.Scene.WaterPrimitive=t},_installTexturePrimitive:function(){function t(t){this._vertexShader=this.getVS(),this._fragmentShader=this.getFS(),this._materialShader=this.getMS(),this._url=t.url,this._cartesians=t.cartesians,this._id=t.id||""}t.prototype.build=function(){for(var t=[],e=0;e<this._cartesians.length;e++)t.push(this._cartesians[e].x),t.push(this._cartesians[e].y),t.push(this._cartesians[e].z);this._positionArr=new Float32Array(t),this._sts=new Uint8Array([0,0,1,0,1,1,0,1]),this._indiceArr=new Uint16Array([0,1,2,0,2,3]),this._geometry=this._createGeometry(),this._appearance=this._createAppearence(),this.primitive=this._viewer.scene.primitives.add(new F.Primitive({geometryInstances:new F.GeometryInstance({geometry:this._geometry,id:this._id}),appearance:this._appearance,asynchronous:!1}))},t.prototype._createGeometry=function(){var t=new F.GeometryAttribute({componentDatatype:F.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:this._sts});return new F.Geometry({attributes:{position:new F.GeometryAttribute({componentDatatype:F.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:this._positions}),st:t},indices:this._indices,primitiveType:F.PrimitiveType.TRIANGLES,boundingSphere:F.BoundingSphere.fromVertices(positions)})},t.prototype._createAppearence=function(){return new F.Appearance({material:new F.Material({fabric:{uniforms:{image:this._url},source:this._materialShader}}),aboveGround:!0,faceForward:!0,flat:!0,translucent:!1,renderState:{blending:F.BlendingState.PRE_MULTIPLIED_ALPHA_BLEND,depthTest:{enabled:!0},depthMask:!0},fragmentShaderSource:this._fragmentShader,vertexShaderSource:this._vertexShader})},t.prototype.getVS=function(){return"in vec3 position3DHigh; in vec3 position3DLow; in vec2 st; in float batchId; out vec2 v_st; void main() { vec4 p = czm_computePosition(); v_st=st; p = czm_modelViewProjectionRelativeToEye * p; gl_Position = p; } "},t.prototype.getFS=function(){return"in vec2 v_st; void main() { czm_materialInput materialInput; czm_material material=czm_getMaterial(materialInput,v_st); vec4 color=vec4(material.diffuse + material.emission,material.alpha); if(color.x==1.0&&color.y==1.0&&color.z==1.0&&color.w==1.0) color=vec4(vec3(0.0,0.0,0.0),0.0); out_FragColor =color; } "},t.prototype.getMS=function(){return"czm_material czm_getMaterial(czm_materialInput materialInput,vec2 v_st) { vec4 color = texture(image, v_st); czm_material material = czm_getDefaultMaterial(materialInput); material.diffuse= color.rgb; material.alpha=color.a; return material; } "},F.Scene.TexturePrimitive=t},_installProbingPrimitive:function(){var e={color:new F.Color(1,0,1,.8),repeat:30,offset:0,thickness:.3,center:F.Cartesian3.fromDegrees(116.39,39.9),length:4e5,bottom:1e3,top:0},i=this._viewer;function t(t){this._viewer=i,this._length=t.length||e.length,this._center=t.center||e.center,this._color=t.color||e.color,this._repeat=t.repeat||e.repeat,this._offset=t.offset||e.offset,this._thickness=t.thickness||e.thickness,this._bottom=t.bottom||e.bottom,this._top=t.top||e.top,this._radar=void 0,this.build()}t.prototype.build=function(){var t=new F.CylinderGeometry({length:this._length,topRadius:this._top,bottomRadius:this._bottom,vertexFormat:F.MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat}),t=new F.GeometryInstance({geometry:t,modelMatrix:this.getModelMatrix()}),e=new F.MaterialAppearance({material:this.getMaterial(),faceForward:!1,closed:!0}),i=this;this._radar=this._viewer.scene.primitives.add(new F.Primitive({geometryInstances:[t],appearance:e})),this._viewer.scene.preUpdate.addEventListener(function(){var t=i._radar.appearance.material.uniforms.offset;1<(t-=.001)&&(t=0),i._radar.appearance.material.uniforms.offset=t})},t.prototype.getModelMatrix=function(){return F.Matrix4.multiplyByTranslation(F.Transforms.eastNorthUpToFixedFrame(this._center),new F.Cartesian3(0,0,.5*this._length),new F.Matrix4)},t.prototype.updateModelMatrix=function(){},t.prototype.getMaterial=function(){return new F.Material({fabric:{type:"radarPrimitive",uniforms:{color:this._color,repeat:this._repeat,offset:this._offset,thickness:this._thickness},source:"uniform vec4 color; \n uniform float repeat; \n uniform float offset; \n uniform float thickness;\n\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n float sp = 1.0/repeat;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5));\n float m = mod(dis + offset, sp);\n float a = step(sp*(1.0-thickness), m); \n\n material.diffuse = color.rgb;\n material.alpha = a * color.a;\n return material;\n }"},translucent:!1})},t.prototype.remove=function(){this._radar&&this._viewer.scene.primitives.remove(this._radar)},F.Scene.ProbingPrimitive=t}};let x=null;function U(t,e,i){t&&(x=e,this._drawLayer=new x.CustomDataSource("drawLayer"),this.$graphics=new y(t,e),t)&&t.dataSources.add(this._drawLayer)}U.prototype={drawPointGraphics:function(e){var i,n,t,a,r,o;(e=e||{}).style=e.style||{image:this.getDfSt(["drawPointGraphics"])||"static/data/images/file/location4.png",width:35,height:40,clampToGround:!0,scale:1,pixelOffset:new x.Cartesian2(0,-20)},this._viewer&&e&&(t=new x.Entity,a=[],r=this,(o=new x.ScreenSpaceEventHandler(this._viewer.scene.canvas)).setInputAction(function(t){t=r._viewer.scene.camera.pickEllipsoid(t.position,r._viewer.scene.globe.ellipsoid);t&&t.x&&(i=t,a.push(t))},x.ScreenSpaceEventType.LEFT_CLICK),o.setInputAction(function(t){o.destroy(),o=null,"function"==typeof e.callback&&e.callback(r.transformCartesianArrayToWGS84Array(a),n)},x.ScreenSpaceEventType.RIGHT_CLICK),t.billboard=e.style,t.position=new x.CallbackProperty(function(){return i},!1),n=this._drawLayer.entities.add(t))},drawLineGraphics:function(e){if(e=e||{},this._viewer&&e){var i,n=[],t=new x.Entity,a=this,r=new x.ScreenSpaceEventHandler(this._viewer.scene.canvas);r.setInputAction(function(t){t=a.getCatesian3FromPX(t.position);t&&t.x&&(0==n.length&&n.push(t.clone()),e.measure&&o(t),2==n.length&&"straightLine"===e.type&&(r.destroy(),r=null,"function"==typeof e.callback)&&e.callback(a.transformCartesianArrayToWGS84Array(n),i),n.push(t))},x.ScreenSpaceEventType.LEFT_CLICK),r.setInputAction(function(t){t=a.getCatesian3FromPX(t.endPosition);2<=n.length&&t&&t.x&&(n.pop(),n.push(t))},x.ScreenSpaceEventType.MOUSE_MOVE),r.setInputAction(function(t){r.destroy(),r=null;t=a.getCatesian3FromPX(t.position);e.measure&&o(t),"function"==typeof e.callback&&e.callback(a.transformCartesianArrayToWGS84Array(n),i)},x.ScreenSpaceEventType.RIGHT_CLICK),t.polyline={width:e.width||5,material:e.material||x.Color.BLUE.withAlpha(.8),clampToGround:e.clampToGround||!1,clampToS3M:e.clampToS3M||!1},t.polyline.positions=new x.CallbackProperty(function(){return n},!1),i=this._drawLayer.entities.add(t);const o=function(t){var e=new x.Entity;e.position=t,e.point={pixelSize:10,outlineColor:x.Color.BLUE,outlineWidth:5},e.label={text:(a.getPositionDistance(a.transformCartesianArrayToWGS84Array(n))/1e3).toFixed(4)+"公里",show:!0,showBackground:!0,font:"14px monospace",horizontalOrigin:x.HorizontalOrigin.LEFT,verticalOrigin:x.VerticalOrigin.BOTTOM,pixelOffset:new x.Cartesian2(-20,-80)},a._drawLayer.entities.add(e)}}},drawPolygonGraphics:function(i){if((i=i||{}).style=i.style||{width:3,material:x.Color.BLUE.withAlpha(.8),clampToGround:!0},this._viewer&&i){var n=[],e=new x.PolygonHierarchy,a=new x.Entity,r=this,o=null,s=new x.ScreenSpaceEventHandler(this._viewer.scene.canvas);s.setInputAction(function(t){t=r.getCatesian3FromPX(t.position);t&&t.x&&(0==n.length&&(e.positions.push(t.clone()),n.push(t.clone())),n.push(t.clone()),e.positions.push(t.clone()),o||(a.polyline=i.style,a.polyline.positions=new x.CallbackProperty(function(){return n},!1),a.polygon={hierarchy:new x.CallbackProperty(function(){return e},!1),material:x.Color.WHITE.withAlpha(.1),clampToGround:i.clampToGround||!1},a.clampToS3M=!0,o=r._drawLayer.entities.add(a)))},x.ScreenSpaceEventType.LEFT_CLICK),s.setInputAction(function(t){t=r.getCatesian3FromPX(t.endPosition);2<=n.length&&t&&t.x&&(n.pop(),n.push(t),e.positions.pop(),e.positions.push(t))},x.ScreenSpaceEventType.MOUSE_MOVE),s.setInputAction(function(){var t,e;s.destroy(),n.push(n[0]),i.height&&(a.polygon.extrudedHeight=i.height,a.polygon.material=x.Color.BLUE.withAlpha(.5)),i.measure&&(t=n[0],(e=new x.Entity).position=t,e.point={pixelSize:10,outlineColor:x.Color.BLUE,outlineWidth:5},e.label={text:(r.getPositionsArea(r.transformCartesianArrayToWGS84Array(n))/1e6).toFixed(4)+"平方公里",show:!0,showBackground:!0,font:"14px monospace",horizontalOrigin:x.HorizontalOrigin.LEFT,verticalOrigin:x.VerticalOrigin.BOTTOM,pixelOffset:new x.Cartesian2(-20,-50)},r._drawLayer.entities.add(e)),"function"==typeof i.callback&&i.callback(r.transformCartesianArrayToWGS84Array(n),o)},x.ScreenSpaceEventType.RIGHT_CLICK)}},drawRectangleGraphics:function(e){var i,n,t,a,r,o;(e=e||{}).style=e.style||{width:3,material:x.Color.BLUE.withAlpha(.5),clampToGround:!0},this._viewer&&e&&(n=[],t=new x.Entity,a=new x.Rectangle,r=this,(o=new x.ScreenSpaceEventHandler(this._viewer.scene.canvas)).setInputAction(function(t){t=r.getCatesian3FromPX(t.position);t&&t.x&&(0==n.length?n.push(t.clone()):(o.destroy(),n.push(t.clone()),a=x.Rectangle.fromCartesianArray([...n,t],x.Ellipsoid.WGS84),"function"==typeof e.callback&&e.callback(r.transformCartesianArrayToWGS84Array(n),i)))},x.ScreenSpaceEventType.LEFT_CLICK),o.setInputAction(function(t){t=r.getCatesian3FromPX(t.endPosition);t&&(a=x.Rectangle.fromCartesianArray([...n,t],x.Ellipsoid.WGS84))},x.ScreenSpaceEventType.MOUSE_MOVE),t.rectangle=e.style,e.height&&(t.rectangle.extrudedHeight=e.height),t.rectangle.coordinates=new x.CallbackProperty(function(){return a},!1),i=this._drawLayer.entities.add(t))},drawCircleGraphics:function(e){if((e=e||{}).style=e.style||{width:3,material:x.Color.BLUE.withAlpha(.5),clampToGround:!0},this._viewer&&e){var i,n=void 0,a=new x.Entity,r=this,o=1,s=new x.ScreenSpaceEventHandler(this._viewer.scene.canvas);const l=function(t,e){var t=x.Cartographic.fromCartesian(t),e=x.Cartographic.fromCartesian(e),i=new x.EllipsoidGeodesic,i=(i.setEndPoints(t,e),i.surfaceDistance);o=Math.sqrt(Math.pow(i,2)+Math.pow(e.height-t.height,2))};s.setInputAction(function(t){t=r.getCatesian3FromPX(t.position);t&&t.x&&(n?(l(n,t),s.destroy(),"function"==typeof e.callback&&e.callback({center:n,radius:o},i)):(n=t,a.ellipse=e.style,a.ellipse.semiMajorAxis=new x.CallbackProperty(function(){return o},!1),a.ellipse.semiMinorAxis=new x.CallbackProperty(function(){return o},!1),a.position=new x.CallbackProperty(function(){return n},!1),a.point={pixelSize:5,outlineColor:x.Color.RED,outlineWidth:3},e.height&&(a.ellipse.extrudedHeight=e.height),i=r._drawLayer.entities.add(a)))},x.ScreenSpaceEventType.LEFT_CLICK),s.setInputAction(function(t){t=r._viewer.scene.camera.pickEllipsoid(t.endPosition,r._viewer.scene.globe.ellipsoid);n&&t&&t.x&&l(n,t)},x.ScreenSpaceEventType.MOUSE_MOVE)}},drawTrianglesGraphics:function(e){if((e=e||{}).style=e.style||{width:3,material:x.Color.BLUE.withAlpha(.5)},this._viewer&&e){var i=new x.Entity,n=new x.Entity,a=new x.Entity,r=[],o=[],s=[],l=this,c=new x.ScreenSpaceEventHandler(this._viewer.scene.canvas);c.setInputAction(function(t){t=l.getCatesian3FromPX(t.position);if(!t)return!1;0==r.length?(r.push(t.clone()),r.push(t.clone()),o.push(t.clone()),o.push(t.clone())):(c.destroy(),"function"==typeof e.callback&&e.callback({e:i,e2:n,e3:a}))},x.ScreenSpaceEventType.LEFT_CLICK),c.setInputAction(function(t){var e,i,t=l.getCatesian3FromPX(t.endPosition);t&&0<r.length&&(r.pop(),r.push(t.clone()),e=r,i=x.Cartographic.fromCartesian(e[0]),e=x.Cartographic.fromCartesian(e[1]),i=x.Cartesian3.fromDegrees(x.Math.toDegrees(i.longitude),x.Math.toDegrees(i.latitude),e.height),o.pop(),o.push(i.clone()),s.pop(),s.pop(),s.push(t.clone()),s.push(i.clone()))},x.ScreenSpaceEventType.MOUSE_MOVE),i.polyline={positions:new x.CallbackProperty(function(){return r},!1),...e.style},i.position=new x.CallbackProperty(function(){return r[0]},!1),i.point={pixelSize:5,outlineColor:x.Color.BLUE,outlineWidth:5},i.label={text:new x.CallbackProperty(function(){return"直线:"+l.getPositionDistance(l.transformCartesianArrayToWGS84Array(r))+"米"},!1),show:!0,showBackground:!0,font:"14px monospace",horizontalOrigin:x.HorizontalOrigin.LEFT,verticalOrigin:x.VerticalOrigin.BOTTOM,pixelOffset:new x.Cartesian2(50,-100)},n.polyline={positions:new x.CallbackProperty(function(){return o},!1),...e.style},n.position=new x.CallbackProperty(function(){return s[1]},!1),n.point={pixelSize:5,outlineColor:x.Color.BLUE,outlineWidth:5},n.label={text:new x.CallbackProperty(function(){return"高度:"+(e=o[1],!(t=o[0])&&!e||x.Cartesian3.equals(t,e)?0:(t=x.Cartographic.fromCartesian(t),(x.Cartographic.fromCartesian(e).height-t.height).toFixed(2)))+"米";var t,e},!1),show:!0,showBackground:!0,font:"14px monospace",horizontalOrigin:x.HorizontalOrigin.LEFT,verticalOrigin:x.VerticalOrigin.BOTTOM,pixelOffset:new x.Cartesian2(-20,100)},a.polyline={positions:new x.CallbackProperty(function(){return s},!1),...e.style},a.position=new x.CallbackProperty(function(){return r[1]},!1),a.point={pixelSize:5,outlineColor:x.Color.BLUE,outlineWidth:5},a.label={text:new x.CallbackProperty(function(){return"水平距离:"+l.getPositionDistance(l.transformCartesianArrayToWGS84Array(s))+"米"},!1),show:!0,showBackground:!0,font:"14px monospace",horizontalOrigin:x.HorizontalOrigin.LEFT,verticalOrigin:x.VerticalOrigin.BOTTOM,pixelOffset:new x.Cartesian2(-150,-20)},this._drawLayer.entities.add(a),this._drawLayer.entities.add(n),this._drawLayer.entities.add(i)}},drawWallGraphics:function(n){var a;(n=n||{}).style=n.style||{material:x.Color.BLUE.withAlpha(.5),outline:!0,outlineColor:x.Color.WHITE},this._viewer&&n&&(a=this).drawPolygonGraphics({callback:function(t,e){var i=a._drawLayer.entities.add({wall:{positions:a.transformWGS84ArrayToCartesianArray(t),...n.style}});"function"==typeof n.callback&&n.callback(t,i)}})},drawEllipsoidGraphics:function(n){var a;(n=n||{}).style=n.style||{},this._viewer&&n&&(a=this).drawCircleGraphics({callback:function(t,e){var i=a.createGraphics(),e=(i.ellipsoid=a.$graphics.getEllipsoidGraphics({radii:t.radius}),i.position=t.center,a._drawLayer.entities.remove(e),a._drawLayer.entities.add(i));"function"==typeof n.callback&&n.callback({center:t.center,radius:t.radius},e)}})},drawCylinderGraphics:function(n){var a;(n=n||{}).style=n.style||{},this._viewer&&n&&(a=this).drawCircleGraphics({callback:function(t,e){var i=a._drawLayer.entities.add({position:t.center,cylinder:{length:2*t.radius||n.length,topRadius:n.topRadius||t.radius,bottomRadius:n.bottomRadius||t.radius,material:x.Color.BLUE.withAlpha(.5),outline:!0,outlineColor:x.Color.WHITE}});a._drawLayer.entities.remove(e),"function"==typeof n.callback&&n.callback({center:t.center,radius:t.radius},i)}})},drawCorridorGraphics:function(n){var a;(n=n||{}).style=n.style||{},this._viewer&&n&&(a=this).drawLineGraphics({callback:function(t,e){var i=a.createGraphics(),e=(i.corridor={positions:a.transformWGS84ArrayToCartesianArray(t),height:n.height||1,width:n.width||100,cornerType:x.CornerType.BEVELED,extrudedHeight:n.extrudedHeight||1,material:x.Color.BLUE.withAlpha(.5),outline:!0,outlineColor:x.Color.WHITE},a._drawLayer.entities.remove(e),a._drawLayer.entities.add(i));"function"==typeof n.callback&&n.callback(t,e)}})},drawPolylineVolumeGraphics:function(a){(a=a||{}).style=a.style||{};const r=a.circleRadius||20,o=a.arms||7,s=a.rOuter||150,l=a.rInner||75;var c;this._viewer&&a&&(c=this).drawLineGraphics({callback:function(t,e){var i=c.createGraphics(),n="fivePoint"===a.shape?c.computeStar2d(o,s,l):c.computeCircleShap(r),n=(i.polylineVolume={positions:c.transformWGS84ArrayToCartesianArray(t),shape:n,cornerType:x.CornerType.MITERED,material:a.color||x.Color.RED},c._drawLayer.entities.remove(e),c._drawLayer.entities.add(i));"function"==typeof a.callback&&a.callback(t,n)}})},removeAll(){this._drawLayer.entities.removeAll()}};let H={};function Q(t,e){t&&(this._viewer=t,H=e)}Q.prototype={mathDistance2d:function(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))},getCirclePoints2d:function(t,e,i,n){for(var a=[],r=Math.PI/180*Math.round(360/n),o=0;o<n;o++){var s=e+t*Math.sin(r*o),l=i+t*Math.cos(r*o);a.unshift({x:s,y:l})}return a},wholeDistance2d:function(i){let n=0;return i&&Array.isArray(i)&&0<i.length&&i.forEach((t,e)=>{e<i.length-1&&(n+=this.mathDistance2d(t,i[e+1]))}),n},getBaseLength2d:function(t){return Math.pow(this.wholeDistance2d(t),.99)},computeStar2d(t,e,i){for(var n=Math.PI/t,a=2*t,r=new Array(a),o=0;o<a;o++){var s=o%2==0?e:i;r[o]=new H.Cartesian2(Math.cos(o*n)*s,Math.sin(o*n)*s)}return r},computeCircleShap(e){var i=[];for(let t=0;t<360;t++){var n=H.Math.toRadians(t);i.push(new H.Cartesian2(e*Math.cos(n),e*Math.sin(n)))}return i},mid2d:function(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]},getCircleCenterOfThreePoints2d:function(t,e,i){var n=[(t[0]+e[0])/2,(t[1]+e[1])/2],e=[n[0]-t[1]+e[1],n[1]+t[0]-e[0]],a=[(t[0]+i[0])/2,(t[1]+i[1])/2],t=[a[0]-t[1]+i[1],a[1]+t[0]-i[0]];return this.getIntersectPoint2d(n,e,a,t)},getIntersectPoint2d:function(t,e,i,n){return t[1]===e[1]?[(n[0]-i[0])/(n[1]-i[1])*(t[1]-i[1])+i[0],t[1]]:i[1]===n[1]?[(e[0]-t[0])/(e[1]-t[1])*(i[1]-t[1])+t[0],i[1]]:(e=(e[0]-t[0])/(e[1]-t[1]),n=(n[0]-i[0])/(n[1]-i[1]),[e*(i=(e*t[1]-t[0]-n*i[1]+i[0])/(e-n))-e*t[1]+t[0],i])},getAzimuth2d:function(t,e){let i,n=Math.asin(Math.abs(e[1]-t[1])/this.mathDistance2d(t,e));return e[1]>=t[1]&&e[0]>=t[0]?i=n+Math.PI:e[1]>=t[1]&&e[0]<t[0]?i=2*Math.PI-n:e[1]<t[1]&&e[0]<t[0]?i=n:e[1]<t[1]&&e[0]>=t[0]&&(i=Math.PI-n),i},getAngleOfThreePoints2d:function(t,e,i){t=this.getAzimuth2d(e,t)-this.getAzimuth2d(e,i);return t<0?t+2*Math.PI:t},isClockWise2d:function(t,e,i){return(i[1]-t[1])*(e[0]-t[0])>(e[1]-t[1])*(i[0]-t[0])},getPointOnLine2d:function(t,e,i){return[e[0]+t*(i[0]-e[0]),e[1]+t*(i[1]-e[1])]},getCubicValue2d:function(t,e,i,n,a){var[r,o]=[1-(t=Math.max(Math.min(t,1),0)),t*t],s=o*t,l=r*r,c=l*r;return[c*e[0]+3*l*t*i[0]+3*r*o*n[0]+s*a[0],c*e[1]+3*l*t*i[1]+3*r*o*n[1]+s*a[1]]},getThirdPoint2d:function(t,e,i,n,a){t=this.getAzimuth2d(t,e),a=a?t+i:t-i,t=n*Math.cos(a),i=n*Math.sin(a);return[e[0]+t,e[1]+i]},inherits2d:function(t,a){function e(){}e.prototype=a.prototype,t.superClass_=a.prototype,t.prototype=new e,(t.prototype.constructor=t).base=function(t,e,i){var n=Array.prototype.slice.call(arguments,2);return a.prototype[e].apply(t,n)}},getArcPoints2d:function(e,i,n,t){var[a,r,o,s]=[null,null,[],t-n],s=s<0?s+2*Math.PI:s;for(let t=0;t<=100;t++){var l=n+s*t/100,a=e[0]+i*Math.cos(l),r=e[1]+i*Math.sin(l);o.push([a,r])}return o},getBisectorNormals2d:function(t,e,i,n){let a=this.getNormal2d(e,i,n),[r,o,s,l,c]=[null,null,null,null,null],h=Math.sqrt(a[0]*a[0]+a[1]*a[1]),x=a[0]/h,d=a[1]/h,u=this.mathDistance2d(e,i),p=this.mathDistance2d(i,n);return o=(c=1e-4<h?this.isClockWise(e,i,n)?(s=t*u,l=i[0]-s*d,c=i[1]+s*x,r=[l,c],s=t*p,l=i[0]+s*d,i[1]-s*x):(s=t*u,l=i[0]+s*d,c=i[1]-s*x,r=[l,c],s=t*p,l=i[0]-s*d,i[1]+s*x):(l=i[0]+t*(e[0]-i[0]),c=i[1]+t*(e[1]-i[1]),r=[l,c],l=i[0]+t*(n[0]-i[0]),i[1]+t*(n[1]-i[1])),[l,c]),[r,o]},getNormal2d:function(t,e,i){var n=t[0]-e[0],t=t[1]-e[1],a=Math.sqrt(n*n+t*t),a=(n/=a,t/=a,i[0]-e[0]),i=i[1]-e[1],e=Math.sqrt(a*a+i*i);return[n+(a/=e),t+(i/=e)]},getLeftMostControlPoint2d:function(t,e){let[i,n,a,r,o]=[t[0],t[1],t[2],null,null],s=this.getBisectorNormals2d(0,i,n,a)[0],l=this.getNormal2d(i,n,a);var c,h,x,d,u;return o=1e-4<Math.sqrt(l[0]*l[0]+l[1]*l[1])?(t=this.mid2d(i,n),x=i[0]-t[0],c=i[1]-t[1],x=2*(c=-(h=2/this.mathDistance2d(i,n))*c)*(h=h*x),d=s[0]-t[0],u=s[1]-t[1],r=t[0]+(c*c-h*h)*d+x*u,t[1]+x*d+(h*h-c*c)*u):(r=i[0]+e*(n[0]-i[0]),i[1]+e*(n[1]-i[1])),[r,o]},getRightMostControlPoint2d:function(t,e){let i=t.length,n=t[i-3],a=t[i-2],r=t[i-1],o=this.getBisectorNormals2d(0,n,a,r)[1],s=this.getNormal2d(n,a,r),l=Math.sqrt(s[0]*s[0]+s[1]*s[1]),[c,h]=[null,null];var x,d,u,p,g;return h=1e-4<l?(t=this.mid2d(a,r),u=r[0]-t[0],x=r[1]-t[1],u=2*(x=-(d=2/this.mathDistance2d(a,r))*x)*(d=d*u),p=o[0]-t[0],g=o[1]-t[1],c=t[0]+(x*x-d*d)*p+u*g,t[1]+u*p+(d*d-x*x)*g):(c=r[0]+e*(a[0]-r[0]),r[1]+e*(a[1]-r[1])),[c,h]},getCurvePoints2d:function(e,i){let t=this.getLeftMostControlPoint2d(i,e),[n,a,r,o,s]=[null,null,null,[t],[]];for(let t=0;t<i.length-2;t++){[n,a,r]=[i[t],i[t+1],i[t+2]];var l=this.getBisectorNormals2d(e,n,a,r);o=o.concat(l)}var c=this.getRightMostControlPoint2d(i,e);c&&o.push(c);for(let e=0;e<i.length-1;e++){n=i[e],a=i[e+1],s.push(n);for(let t=0;t<100;t++){var h=this.getCubicValue2d(t/100,n,o[2*e],o[2*e+1],a);s.push(h)}s.push(a)}return s},getBezierPoints2d:function(a){if(a.length<=2)return a;var t=[],r=a.length-1;for(let n=0;n<=1;n+=.01){let[e,i]=[0,0];for(let t=0;t<=r;t++){var o=this.getBinomialFactor2d(r,t),s=Math.pow(n,t),l=Math.pow(1-n,r-t);e+=o*s*l*a[t][0],i+=o*s*l*a[t][1]}t.push([e,i])}return t.push(a[r]),t},getFactorial2d:function(e){let i=1;switch(e){case e<=1:i=1;break;case 2===e:i=2;break;case 3===e:i=6;break;case 24===e:i=24;break;case 5===e:i=120;break;default:for(let t=1;t<=e;t++)i*=t}return i},getBinomialFactor2d:function(t,e){return this.getFactorial2d(t)/(this.getFactorial2d(e)*this.getFactorial2d(t-e))},getQBSplinePoints2d:function(r){if(r.length<=2)return r;var[o,t]=[2,[]],e=r.length-o-1;t.push(r[0]);for(let a=0;a<=e;a++)for(let n=0;n<=1;n+=.05){let[e,i]=[0,0];for(let t=0;t<=o;t++){var s=this.getQuadricBSplineFactor2d(t,n);e+=s*r[a+t][0],i+=s*r[a+t][1]}t.push([e,i])}return t.push(r[r.length-1]),t},getQuadricBSplineFactor2d:function(t,e){let i=0;return 0===t?i=Math.pow(e-1,2)/2:1===t?i=(-2*Math.pow(e,2)+2*e+1)/2:2===t&&(i=Math.pow(e,2)/2),i}};let C=null;function J(t,e){t&&(this._viewer=t,C=e)}J.prototype={setCircleScanEffect:function(t){var e,i,n,a,r,o,s,l,c,h,x;if(t&&t.position)return e=t.id||"CircleScan"+parseInt(1e3*Math.random()),l=t.position,i=t.radius,n=t.color||C.Color.RED,a=t.duration||1500,r=this,o=t.circleMode||"CircleScan",t=t.border||4,x=l,s=new C.Cartesian4(x.x,x.y,x.z,1),x=this.transformCartesianToWGS84(l),l=this.transformWGS84ToCartesian({lng:x.lng,lat:x.lat,alt:x.alt+500}),c=new C.Cartesian4(l.x,l.y,l.z,1),h=(new Date).getTime(),x=new C.PostProcessStage({name:e,fragmentShader:this._getCircleScanShader({get:!0,border:t}),uniforms:{u_scanCenterEC:function(){return C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,s,new C.Cartesian4)},u_scanPlaneNormalEC:function(){var t=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,s,new C.Cartesian4),e=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,c,new C.Cartesian4),i=new C.Cartesian3;return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,C.Cartesian3.normalize(i,i),i},u_radius:function(){return"CircleScan"==o?i*(((new Date).getTime()-h)%a)/a:i},u_scanColor:n}}),this._viewer.scene.postProcessStages.add(x),x},setRadarScanEffect:function(t){var e,i,n,a,r,o,s,l,c,h,x,d,u,p,g,m,f,v,y;if(t&&t.position)return e=t.id||"radarScan"+parseInt(1e3*Math.random()),c=t.position,i=t.radius,n=t.color||C.Color.RED,a=t.duration||1500,r=this,o=t.border||1,t=t.width||3,y=c,s=new C.Cartesian4(y.x,y.y,y.z,1),y=this.transformCartesianToWGS84(c),c=this.transformWGS84ToCartesian({lng:y.lng,lat:y.lat,alt:y.alt+500}),l=new C.Cartesian4(c.x,c.y,c.z,1),c=this.transformWGS84ToCartesian({lng:y.lng+.001,lat:y.lat,alt:y.alt}),h=new C.Cartesian4(c.x,c.y,c.z,1),x=(new Date).getTime(),d=new C.Quaternion,u=new C.Matrix3,p=new C.Cartesian4,g=new C.Cartesian4,m=new C.Cartesian4,f=new C.Cartesian3,v=new C.Cartesian3,y=new C.PostProcessStage({name:e,fragmentShader:this._getRadarScanShader({border:o,width:t,get:!0}),uniforms:{u_scanCenterEC:function(){return C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,s,p)},u_scanPlaneNormalEC:function(){var t=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,s,p),e=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,l,g);return f.x=e.x-t.x,f.y=e.y-t.y,f.z=e.z-t.z,C.Cartesian3.normalize(f,f),f},u_scanLineNormalEC:function(){var t=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,s,p),e=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,l,g),i=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,h,m),e=(f.x=e.x-t.x,f.y=e.y-t.y,f.z=e.z-t.z,C.Cartesian3.normalize(f,f),v.x=i.x-t.x,v.y=i.y-t.y,v.z=i.z-t.z,((new Date).getTime()-x)%a/a);return C.Quaternion.fromAxisAngle(f,e*C.Math.PI*2,d),C.Matrix3.fromQuaternion(d,u),C.Matrix3.multiplyByVector(u,v,v),C.Cartesian3.normalize(v,v),v},u_radius:i,u_scanColor:n}}),this._viewer.scene.postProcessStages.add(y),y},lighitCentrumScanEffect:function(e){var i=this.createLightScan_getCirclePoints(e.circle[0],e.circle[1],e.circle[2],e.circle[3]),n=this.createLightScan_entityCList(this._viewer,i,e);for(let t=0;t<n.length;t++)t!==n.length-1?this.createLightScan_changeOnePosition(e,n[t],[i[t].x,i[t].y,i[t+1].x,i[t+1].y]):this.createLightScan_changeOnePosition(e,n[t],[i[t].x,i[t].y,i[0].x,i[0].y]);return n},createLightScan_getCirclePoints:function(t,e,i,n){let a=[],r=Math.PI/180*Math.round(360/n),o=0;for(;o<n;o++){var s=e+t*Math.sin(r*o),l=i+t*Math.cos(r*o);a.unshift({x:s,y:l})}return a},createLightScan_changeOnePosition:function(e,t,i){const n=e.positionList;let a,r,o,s,l,c,h=0,x=0;function d(t){a=n[t+1][0]-n[t][0],r=n[t+1][1]-n[t][1],o=a/e.number,s=r/e.number,x=0}d(h),t.polygon.hierarchy=new C.CallbackProperty(function(){return Math.abs(l)>=Math.abs(a)&&Math.abs(c)>=Math.abs(r)&&((h+=1)===n.length-1&&(h=0),i[0]=i[0]+l,i[1]=i[1]+c,i[2]=i[2]+l,i[3]=i[3]+c,d(h)),l=x*o,c=x*s,x++,new C.PolygonHierarchy(C.Cartesian3.fromDegreesArrayHeights([e.observer[0],e.observer[1],e.observer[2],i[0]+l,i[1]+c,0,i[2]+l,i[3]+c,0]))},!1)},createLightScan_entityCList:function(e,i,n){var a=n.observer[0],r=n.observer[1],o=n.observer[2],s=[];for(let t=0;t<i.length;t++){var l=t===i.length-1?new C.PolygonHierarchy(C.Cartesian3.fromDegreesArrayHeights([a,r,o,i[t].x,i[t].y,0,i[0].x,i[0].y,0])):new C.PolygonHierarchy(C.Cartesian3.fromDegreesArrayHeights([a,r,o,i[t].x,i[t].y,0,i[t+1].x,i[t+1].y,0])),l=e.entities.add({name:"三角形",polygon:{hierarchy:l,outline:!1,perPositionHeight:!0,material:n.material}});s.push(l)}return s}};for(var O=["RGVwdGhGdW5jdGlvbg==","TEVTUw==","Q3VsbEZhY2U=","QkFDSw==","dW5pZm9ybU1hcA==","cHJvamVjdGlvbk1hdHJpeA==","dW5pZm9ybVN0YXRl","cHJvamVjdGlvbg==","bW9kZWxWaWV3TWF0cml4","bW9kZWxWaWV3","c2hpbmluZXNz","ZW1pc3Npb24=","c3BlY3VsYXI=","aXNMaW5l","cGlja2Vk","cGlja2VkQ29sb3I=","bm9ybWFsTWF0cml4","Z2xvd1Bvd2Vy","ZXh0ZW5kMkNhcnRlc2lhbkFycmF5","UmFkYXJQcmltaXRpdmU=","X2FuZ2xl","YW5nbGU=","X3JhZGl1cw==","X3RvcFNob3c=","dG9w","X3RvcE91dGxpbmU=","dG9wT3V0bGluZQ==","dXBkYXRlR3JvdW5kQ2lyY2xlUmFkaXVz","X2dyb3VuZF9yYWRpdXM=","X3RyYWNrZWRFbnRpdHlQb3NpdGlvbg==","ZGlzdGFuY2U=","UG9seWxpbmVEYXNoTWF0ZXJpYWxQcm9wZXJ0eQ==","Q1lBTg==","bWF0cml4","Z2V0SGVhZGluZ1BpdGNoUm9sbEZvckxpbmU=","Z2V0VG9wR2VvbWV0cnk=","Z2V0VG9wT3V0bGluZUdlb21ldHJ5","X3RvcEdlb21ldHJ5","X3RvcE91dGxpbmVHZW9tZXRyeQ==","ZWxsaXBzZQ==","CnZhcnlpbmcgdmVjMyB2X3Bvc2l0aW9uOwp2YXJ5aW5nIHZlYzMgdl9ub3JtYWw7CnVuaWZvcm0gZmxvYXQgcGlja2VkOwp1bmlmb3JtIHZlYzQgIHBpY2tlZENvbG9yOwp1bmlmb3JtIHZlYzQgIGRlZmF1bHRDb2xvcjsKdW5pZm9ybSBmbG9hdCBzcGVjdWxhcjsKdW5pZm9ybSBmbG9hdCBzaGluaW5lc3M7CnVuaWZvcm0gdmVjMyAgZW1pc3Npb247CnZhcnlpbmcgdmVjMiB2X3N0Owp1bmlmb3JtIGJvb2wgaXNMaW5lOwp1bmlmb3JtIGZsb2F0IGdsb3dQb3dlcjsKdm9pZCBtYWluKCkgewogICAgdmVjMyBwb3NpdGlvblRvRXllRUM9IC12X3Bvc2l0aW9uOyAKICAgIHZlYzMgbm9ybWFsRUMgPW5vcm1hbGl6ZSh2X25vcm1hbCk7CiAgICB2ZWM0IGNvbG9yPWRlZmF1bHRDb2xvcjsKICAgIGlmKHBpY2tlZCE9MC4wKXsKICAgICAgICBjb2xvciA9IHBpY2tlZENvbG9yOwogICAgfQogICAgLy9pZih2X3N0Lng8MC41KXsKICAgIC8vICAgIGNvbG9yLmEgPTAuNzUtdl9zdC54OyAKICAgIC8vfQogICAgLy9lbHNlICB7CiAgICAvLyAgICBjb2xvci5hID12X3N0LngtMC4yNTsgCiAgICAvL30KICAgIGN6bV9tYXRlcmlhbCBtYXRlcmlhbDsKICAgIG1hdGVyaWFsLnNwZWN1bGFyID0gc3BlY3VsYXI7CiAgICBtYXRlcmlhbC5zaGluaW5lc3MgPSBzaGluaW5lc3M7CiAgICBtYXRlcmlhbC5ub3JtYWwgPSAgbm9ybWFsRUM7CiAgICBtYXRlcmlhbC5lbWlzc2lvbiA9ZW1pc3Npb247Ly92ZWMzKDAuMiwwLjIsMC4yKTsKICAgIG1hdGVyaWFsLmRpZmZ1c2UgPSBjb2xvci5yZ2IgOwogICAgaWYoaXNMaW5lKXsKICAgICAgICBtYXRlcmlhbC5hbHBoYSA9IDEuMDsgCiAgICB9CiAgICBlbHNlewogICAgICAgIG1hdGVyaWFsLmFscGhhID0gIGNvbG9yLmE7IAogICAgfQogICAgICAgIC8vZmxvYXQgZ2xvdyA9IGdsb3dQb3dlciAvIGFicyh2X3N0LnQgICkgLSAoZ2xvd1Bvd2VyIC8gMC41KTsgCiAgICAgICAgLy8gCiAgICAgICAgLy9tYXRlcmlhbC5lbWlzc2lvbiA9IG1heCh2ZWMzKGdsb3cgLSAxLjAgKyBjb2xvci5yZ2IpLCBjb2xvci5yZ2IpOyAKICAgICAgICAvL2lmKGlzTGluZSkKICAgICAgICAvLyAgICBtYXRlcmlhbC5hbHBoYSA9IGNsYW1wKDAuMCwgMS4wLCBnbG93KSAqIGNvbG9yLmE7IAogICAgICAgICAKICAgIGlmKHZfc3QueD09MC4wKXsgCiAgICAgICAgICBnbF9GcmFnQ29sb3IgPWNvbG9yIDsKICAgIH1lbHNlIHsgCiAgICAgICAgZ2xfRnJhZ0NvbG9yID0gY3ptX3Bob25nKG5vcm1hbGl6ZShwb3NpdGlvblRvRXllRUMpLCBtYXRlcmlhbCxjem1fbGlnaHREaXJlY3Rpb25FQykgOyAKICAgIH0gCn0=","CiNpZmRlZiBHTF9FUwogICBwcmVjaXNpb24gaGlnaHAgZmxvYXQ7CiNlbmRpZgoKYXR0cmlidXRlIHZlYzMgcG9zaXRpb247CmF0dHJpYnV0ZSB2ZWMyIHN0OwphdHRyaWJ1dGUgdmVjMyBub3JtYWw7CnVuaWZvcm0gbWF0NCBtb2RlbFZpZXdNYXRyaXg7CnVuaWZvcm0gbWF0MyBub3JtYWxNYXRyaXg7CnVuaWZvcm0gbWF0NCBwcm9qZWN0aW9uTWF0cml4Owp2YXJ5aW5nIHZlYzMgdl9wb3NpdGlvbjsKdmFyeWluZyB2ZWMzIHZfbm9ybWFsOwp2YXJ5aW5nIHZlYzIgdl9zdDsKCnZhcnlpbmcgdmVjMyB2X2xpZ2h0MERpcmVjdGlvbjsKCnZvaWQgbWFpbih2b2lkKSAKewogICAgdmVjNCBwb3MgPSAgbW9kZWxWaWV3TWF0cml4ICogdmVjNCggcG9zaXRpb24sMS4wKTsKICAgIHZfbm9ybWFsID0gIG5vcm1hbE1hdHJpeCAqICBub3JtYWw7CiAgICB2X3N0ID0gc3Q7CiAgICB2X3Bvc2l0aW9uID0gcG9zLnh5ejsKICAgIHZfbGlnaHQwRGlyZWN0aW9uID0gbWF0MyggbW9kZWxWaWV3TWF0cml4KSAqIHZlYzMoMS4wLDEuMCwxLjApOwogICAgZ2xfUG9zaXRpb24gPSAgcHJvamVjdGlvbk1hdHJpeCAqIHBvczsKfQ==","VFJBTlNMVUNFTlQ=","TElORV9TVFJJUA==","UmVjdGFuZ3VsYXJTZW5zb3JQcmltaXRpdmU=","b2JqZWN0","ZXhwb3J0cw==","YW1k","Q2VzaXVtR2VvbWV0cnk=","Y2FsbA==","ZGVmYXVsdA==","Y29tYmluZQ==","ZGVzdHJveU9iamVjdA==","RGV2ZWxvcGVyRXJyb3I=","QnVmZmVy","U2hhZGVyU291cmNl","TWF0ZXJpYWw=","VmVydGV4Rm9ybWF0","SnVsaWFuRGF0ZQ==","Qm94R2VvbWV0cnk=","RWxsaXBzb2lkR2VvbWV0cnk=","YXRhbg==","YXNpbg==","RU1QVFlfT0JKRUNU","c2xpY2U=","bW9kZWxNYXRyaXg=","X2NvbXB1dGVkTW9kZWxNYXRyaXg=","X2NvbXB1dGVkU2NhblBsYW5lTW9kZWxNYXRyaXg=","UE9TSVRJVkVfSU5GSU5JVFk=","eEhhbGZBbmdsZQ==","X3hIYWxmQW5nbGU=","eUhhbGZBbmdsZQ==","X3lIYWxmQW5nbGU=","V0hJVEU=","c2hvd1NlY3RvckxpbmVz","c2hvd1NlY3RvclNlZ21lbnRMaW5lcw==","c2hvd0xhdGVyYWxTdXJmYWNlcw==","bWF0ZXJpYWw=","ZnJvbVR5cGU=","Q29sb3JUeXBl","X21hdGVyaWFs","X3RyYW5zbHVjZW50","bGF0ZXJhbFN1cmZhY2VNYXRlcmlhbA==","X2xhdGVyYWxTdXJmYWNlTWF0ZXJpYWw=","X2xhdGVyYWxTdXJmYWNlVHJhbnNsdWNlbnQ=","c2hvd0RvbWVTdXJmYWNlcw==","ZG9tZVN1cmZhY2VNYXRlcmlhbA==","X2RvbWVTdXJmYWNlTWF0ZXJpYWw=","c2hvd0RvbWVMaW5lcw==","c2hvd0ludGVyc2VjdGlvbg==","aW50ZXJzZWN0aW9uQ29sb3I=","aW50ZXJzZWN0aW9uV2lkdGg=","c2hvd1Rocm91Z2hFbGxpcHNvaWQ=","X3Nob3dUaHJvdWdoRWxsaXBzb2lk","c2hvd1NjYW5QbGFuZQ==","c2NhblBsYW5lQ29sb3I=","c2NhblBsYW5lTW9kZQ==","aG9yaXpvbnRhbA==","c2NhblBsYW5lUmF0ZQ==","X3NjYW5lUGxhbmVYSGFsZkFuZ2xl","X3NjYW5lUGxhbmVZSGFsZkFuZ2xl","X3RpbWU=","bm93","X2JvdW5kaW5nU3BoZXJl","X2JvdW5kaW5nU3BoZXJlV0M=","X3NlY3RvckZyb250Q29tbWFuZA==","X3NlY3RvckJhY2tDb21tYW5k","X3NlY3RvclZB","X3NlY3RvckxpbmVDb21tYW5k","X3NlY3RvckxpbmVWQQ==","X3NlY3RvclNlZ21lbnRMaW5lQ29tbWFuZA==","X3NlY3RvclNlZ21lbnRMaW5lVkE=","X2RvbWVGcm9udENvbW1hbmQ=","X2RvbWVCYWNrQ29tbWFuZA==","X2RvbWVWQQ==","X2RvbWVMaW5lQ29tbWFuZA==","X2RvbWVMaW5lVkE=","X3NjYW5QbGFuZUZyb250Q29tbWFuZA==","X3NjYW5QbGFuZUJhY2tDb21tYW5k","X3NjYW5SYWRpYWxDb21tYW5k","X2NvbG9yQ29tbWFuZHM=","X2Zyb250RmFjZVJT","X2JhY2tGYWNlUlM=","X3Nw","X3VuaWZvcm1z","X3NjYW5Vbmlmb3Jtcw==","aGFsZkFuZ2xlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIHplcm8u","dGhpcy5yYWRpdXMgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gemVyby4=","bXVsdGlwbHlCeVVuaWZvcm1TY2FsZQ==","dHJhbnNmb3Jt","aXNUcmFuc2x1Y2VudA==","c2Vjb25kc0RpZmZlcmVuY2U=","bWF4","ZnJvbVJvdGF0aW9uWA==","ZnJvbVJvdGF0aW9uWQ==","bXVsdGlwbHlCeU1hdHJpeDM=","cGFzc2Vz","cmVuZGVy","em95","em94","bWFw","bXVsdGlwbHlCeVZlY3Rvcg==","cmV2ZXJzZQ==","Y29uY2F0","YXBwbHk=","Y3JlYXRlVmVydGV4QnVmZmVy","QllURVNfUEVSX0VMRU1FTlQ=","UE9TSVRJT05fT05MWQ==","RWxsaXBzb2lkT3V0bGluZUdlb21ldHJ5","UElfT1ZFUl9UV08=","X3NjYW5QbGFuZVZB","c2hhZGVyU291cmNl","dW5pZm9ybQ==","X3BpY2tTUA==","X3NjYW5lUGxhbmVTUA==","RlJPTlQ=","X3BpY2tSUw==","dV9ub3JtYWxEaXJlY3Rpb24=","cGFzcw==","dV90eXBl","Q2hlY2s=","R2VvbWV0cnlBdHRyaWJ1dGVz","SW5kZXhEYXRhdHlwZQ==","cm91bmQ=","c3RhY2tQYXJ0aXRpb25z","c2xpY2VQYXJ0aXRpb25z","dHlwZU9m","bnVtYmVy","dmVydGV4Rm9ybWF0","REVGQVVMVA==","X3N0YWNrUGFydGl0aW9ucw==","X3NsaWNlUGFydGl0aW9ucw==","X3ZlcnRleEZvcm1hdA==","ZnJvbURpbWVuc2lvbnM=","Z3JlYXRlclRoYW5PckVxdWFscw==","Y3JlYXRlVHlwZWRBcnJheQ==","VFdPX1BJ","dGltZUVuZA==","Q29uaWNBcmNTZW5zb3JHZW9tZXRyeQ==","c3ViZGl2aXNpb25z","b3B0aW9ucy5zdGFja1BhcnRpdGlvbnMgY2Fubm90IGJlIGxlc3MgdGhhbiAx","b3B0aW9ucy5zbGljZVBhcnRpdGlvbnMgY2Fubm90IGJlIGxlc3MgdGhhbiAw","b3B0aW9ucy5zdWJkaXZpc2lvbnMgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gemVyby4=","X3N1YmRpdmlzaW9ucw==","Q29uaWNBcmNTZW5zb3JPdXRsaW5lR2VvbWV0cnk=","RXZlbnQ=","Y3JlYXRlTWF0ZXJpYWxQcm9wZXJ0eURlc2NyaXB0b3I=","Y3JlYXRlUHJvcGVydHlEZXNjcmlwdG9y","X2FuZ2xlU3Vic2NyaXB0aW9u","X3JhZGl1c1N1YnNjcmlwdGlvbg==","X3N0YWNr","X3N0YWNrU3Vic2NyaXB0aW9u","X3NsaWNl","X3NsaWNlU3Vic2NyaXB0aW9u","X2NvbG9y","X2NvbG9yU3Vic2NyaXB0aW9u","X3Nob3dTdWJzY3JpcHRpb24=","X2ZpbGw=","X2ZpbGxTdWJzY3JpcHRpb24=","X21hdGVyaWFsU3Vic2NyaXB0aW9u","X291dGxpbmVTdWJzY3JpcHRpb24=","X291dGxpbmVDb2xvcg==","X291dGxpbmVDb2xvclN1YnNjcmlwdGlvbg==","X291dGxpbmVXaWR0aA==","X291dGxpbmVXaWR0aFN1YnNjcmlwdGlvbg==","X3NoYWRvd3M=","X3NoYWRvd3NTdWJzY3JpcHRpb24=","X2Rpc3RhbmNlRGlzcGxheUNvbmRpdGlvbg==","X2Rpc3RhbmNlRGlzcGxheUNvbmRpdGlvblN1YnNjcmlwdGlvbg==","X2RlZmluaXRpb25DaGFuZ2Vk","X2dhemU=","X2dhemVTdWJzY3JpcHRpb24=","bWVyZ2U=","c3RhY2s=","ZmlsbA==","b3V0bGluZUNvbG9y","b3V0bGluZVdpZHRo","c2hhZG93cw==","ZGlzdGFuY2VEaXNwbGF5Q29uZGl0aW9u","Z2F6ZQ==","c291cmNlIGlzIHJlcXVpcmVkLg==","Q29uaWNBcmNTZW5zb3JHcmFwaGljcw==","a2V5cw==","UmVjdGFuZ3VsYXJTZW5zb3JHcmFwaGljcw==","UmVjdGFuZ3VsYXJTZW5zb3JWaXN1YWxpemVy","Q29uaWNBcmNTZW5zb3JDb2xsZWN0aW9u","RGF0YVNvdXJjZURpc3BsYXk=","ZGVmYXVsdFZpc3VhbGl6ZXJzQ2FsbGJhY2s=","YXR0cmlidXRlIHZlYzQgcG9zaXRpb247DQphdHRyaWJ1dGUgdmVjMyBub3JtYWw7DQoNCnZhcnlpbmcgdmVjMyB2X3Bvc2l0aW9uOw0KdmFyeWluZyB2ZWMzIHZfcG9zaXRpb25XQzsNCnZhcnlpbmcgdmVjMyB2X3Bvc2l0aW9uRUM7DQp2YXJ5aW5nIHZlYzMgdl9ub3JtYWxFQzsNCg0Kdm9pZCBtYWluKCkNCnsNCiAgICBnbF9Qb3NpdGlvbiA9IGN6bV9tb2RlbFZpZXdQcm9qZWN0aW9uICogcG9zaXRpb247DQogICAgdl9wb3NpdGlvbiA9IHZlYzMocG9zaXRpb24pOw0KICAgIHZfcG9zaXRpb25XQyA9IChjem1fbW9kZWwgKiBwb3NpdGlvbikueHl6Ow0KICAgIHZfcG9zaXRpb25FQyA9IChjem1fbW9kZWxWaWV3ICogcG9zaXRpb24pLnh5ejsNCiAgICB2X25vcm1hbEVDID0gY3ptX25vcm1hbCAqIG5vcm1hbDsNCn0=","I2lmZGVmIEdMX09FU19zdGFuZGFyZF9kZXJpdmF0aXZlcw0KI2V4dGVuc2lvbiBHTF9PRVNfc3RhbmRhcmRfZGVyaXZhdGl2ZXMgOiBlbmFibGUNCiNlbmRpZg0KDQp1bmlmb3JtIGJvb2wgdV9zaG93SW50ZXJzZWN0aW9uOw0KdW5pZm9ybSBib29sIHVfc2hvd1Rocm91Z2hFbGxpcHNvaWQ7DQoNCnVuaWZvcm0gZmxvYXQgdV9yYWRpdXM7DQp1bmlmb3JtIGZsb2F0IHVfeEhhbGZBbmdsZTsNCnVuaWZvcm0gZmxvYXQgdV95SGFsZkFuZ2xlOw0KdW5pZm9ybSBmbG9hdCB1X25vcm1hbERpcmVjdGlvbjsNCnVuaWZvcm0gZmxvYXQgdV90eXBlOw0KDQp2YXJ5aW5nIHZlYzMgdl9wb3NpdGlvbjsNCnZhcnlpbmcgdmVjMyB2X3Bvc2l0aW9uV0M7DQp2YXJ5aW5nIHZlYzMgdl9wb3NpdGlvbkVDOw0KdmFyeWluZyB2ZWMzIHZfbm9ybWFsRUM7DQoNCnZlYzQgZ2V0Q29sb3IoZmxvYXQgc2Vuc29yUmFkaXVzLCB2ZWMzIHBvaW50RUMpDQp7DQogICAgY3ptX21hdGVyaWFsSW5wdXQgbWF0ZXJpYWxJbnB1dDsNCg0KICAgIHZlYzMgcG9pbnRNQyA9IChjem1faW52ZXJzZU1vZGVsVmlldyAqIHZlYzQocG9pbnRFQywgMS4wKSkueHl6Ow0KICAgIG1hdGVyaWFsSW5wdXQuc3QgPSBzZW5zb3IyZFRleHR1cmVDb29yZGluYXRlcyhzZW5zb3JSYWRpdXMsIHBvaW50TUMpOw0KICAgIG1hdGVyaWFsSW5wdXQuc3RyID0gcG9pbnRNQyAvIHNlbnNvclJhZGl1czsNCg0KICAgIHZlYzMgcG9zaXRpb25Ub0V5ZUVDID0gLXZfcG9zaXRpb25FQzsNCiAgICBtYXRlcmlhbElucHV0LnBvc2l0aW9uVG9FeWVFQyA9IHBvc2l0aW9uVG9FeWVFQzsNCg0KICAgIHZlYzMgbm9ybWFsRUMgPSBub3JtYWxpemUodl9ub3JtYWxFQyk7DQogICAgbWF0ZXJpYWxJbnB1dC5ub3JtYWxFQyA9IHVfbm9ybWFsRGlyZWN0aW9uICogbm9ybWFsRUM7DQoNCiAgICBjem1fbWF0ZXJpYWwgbWF0ZXJpYWwgPSBjem1fZ2V0TWF0ZXJpYWwobWF0ZXJpYWxJbnB1dCk7DQoNCiAgICByZXR1cm4gbWl4KGN6bV9waG9uZyhub3JtYWxpemUocG9zaXRpb25Ub0V5ZUVDKSwgbWF0ZXJpYWwsY3ptX2xpZ2h0RGlyZWN0aW9uRUMpLCB2ZWM0KG1hdGVyaWFsLmRpZmZ1c2UsIG1hdGVyaWFsLmFscGhhKSwgMC40KTsNCg0KfQ0KDQpib29sIGlzT25Cb3VuZGFyeShmbG9hdCB2YWx1ZSwgZmxvYXQgZXBzaWxvbikNCnsNCiAgICBmbG9hdCB3aWR0aCA9IGdldEludGVyc2VjdGlvbldpZHRoKCk7DQogICAgZmxvYXQgdG9sZXJhbmNlID0gd2lkdGggKiBlcHNpbG9uOw0KDQojaWZkZWYgR0xfT0VTX3N0YW5kYXJkX2Rlcml2YXRpdmVzDQogICAgZmxvYXQgZGVsdGEgPSBtYXgoYWJzKGRGZHgodmFsdWUpKSwgYWJzKGRGZHkodmFsdWUpKSk7DQogICAgZmxvYXQgcGl4ZWxzID0gd2lkdGggKiBkZWx0YTsNCiAgICBmbG9hdCB0ZW1wID0gYWJzKHZhbHVlKTsNCiAgICAvLyBUaGVyZSBhcmUgYSBjb3VwbGUgdGhpbmdzIGdvaW5nIG9uIGhlcmUuDQogICAgLy8gRmlyc3Qgd2UgdGVzdCB0aGUgdmFsdWUgYXQgdGhlIGN1cnJlbnQgZnJhZ21lbnQgdG8gc2VlIGlmIGl0IGlzIHdpdGhpbiB0aGUgdG9sZXJhbmNlLg0KICAgIC8vIFdlIGFsc28gd2FudCB0byBjaGVjayBpZiB0aGUgdmFsdWUgb2YgYW4gYWRqYWNlbnQgcGl4ZWwgaXMgd2l0aGluIHRoZSB0b2xlcmFuY2UsDQogICAgLy8gYnV0IHdlIGRvbid0IHdhbnQgdG8gYWRtaXQgcG9pbnRzIHRoYXQgYXJlIG9idmlvdXNseSBub3Qgb24gdGhlIHN1cmZhY2UuDQogICAgLy8gRm9yIGV4YW1wbGUsIGlmIHdlIGFyZSBsb29raW5nIGZvciAidmFsdWUiIHRvIGJlIGNsb3NlIHRvIDAsIGJ1dCB2YWx1ZSBpcyAxIGFuZCB0aGUgYWRqYWNlbnQgdmFsdWUgaXMgMiwNCiAgICAvLyB0aGVuIHRoZSBkZWx0YSB3b3VsZCBiZSAxIGFuZCAidGVtcCAtIGRlbHRhIiB3b3VsZCBiZSAiMSAtIDEiIHdoaWNoIGlzIHplcm8gZXZlbiB0aG91Z2ggbmVpdGhlciBvZg0KICAgIC8vIHRoZSBwb2ludHMgaXMgY2xvc2UgdG8gemVyby4NCiAgICByZXR1cm4gdGVtcCA8IHRvbGVyYW5jZSAmJiB0ZW1wIDwgcGl4ZWxzIHx8IChkZWx0YSA8IDEwLjAgKiB0b2xlcmFuY2UgJiYgdGVtcCAtIGRlbHRhIDwgdG9sZXJhbmNlICYmIHRlbXAgPCBwaXhlbHMpOw0KI2Vsc2UNCiAgICByZXR1cm4gYWJzKHZhbHVlKSA8IHRvbGVyYW5jZTsNCiNlbmRpZg0KfQ0KDQp2ZWM0IHNoYWRlKGJvb2wgaXNPbkJvdW5kYXJ5KQ0Kew0KICAgIGlmICh1X3Nob3dJbnRlcnNlY3Rpb24gJiYgaXNPbkJvdW5kYXJ5KQ0KICAgIHsNCiAgICAgICAgcmV0dXJuIGdldEludGVyc2VjdGlvbkNvbG9yKCk7DQogICAgfQ0KICAgIGlmKHVfdHlwZSA9PSAxLjApew0KICAgICAgICByZXR1cm4gZ2V0TGluZUNvbG9yKCk7DQogICAgfQ0KICAgIHJldHVybiBnZXRDb2xvcih1X3JhZGl1cywgdl9wb3NpdGlvbkVDKTsNCn0NCg0KZmxvYXQgZWxsaXBzb2lkU3VyZmFjZUZ1bmN0aW9uKHZlYzMgcG9pbnQpDQp7DQogICAgdmVjMyBzY2FsZWQgPSBjem1fZWxsaXBzb2lkSW52ZXJzZVJhZGlpICogcG9pbnQ7DQogICAgcmV0dXJuIGRvdChzY2FsZWQsIHNjYWxlZCkgLSAxLjA7DQp9DQoNCnZvaWQgbWFpbigpDQp7DQogICAgdmVjMyBzZW5zb3JWZXJ0ZXhXQyA9IGN6bV9tb2RlbFszXS54eXo7ICAgICAgLy8gKDAuMCwgMC4wLCAwLjApIGluIG1vZGVsIGNvb3JkaW5hdGVzDQogICAgdmVjMyBzZW5zb3JWZXJ0ZXhFQyA9IGN6bV9tb2RlbFZpZXdbM10ueHl6OyAgLy8gKDAuMCwgMC4wLCAwLjApIGluIG1vZGVsIGNvb3JkaW5hdGVzDQoNCiAgICAvL3ZlYzMgcGl4RGlyID0gbm9ybWFsaXplKHZfcG9zaXRpb24pOw0KICAgIGZsb2F0IHBvc2l0aW9uWCA9IHZfcG9zaXRpb24ueDsNCiAgICBmbG9hdCBwb3NpdGlvblkgPSB2X3Bvc2l0aW9uLnk7DQogICAgZmxvYXQgcG9zaXRpb25aID0gdl9wb3NpdGlvbi56Ow0KDQogICAgdmVjMyB6RGlyID0gdmVjMygwLjAsIDAuMCwgMS4wKTsNCiAgICB2ZWMzIGxpbmVYID0gdmVjMyhwb3NpdGlvblgsIDAgLHBvc2l0aW9uWik7DQogICAgdmVjMyBsaW5lWSA9IHZlYzMoMCwgcG9zaXRpb25ZLCBwb3NpdGlvblopOw0KICAgIGZsb2F0IHJlc1ggPSBkb3Qobm9ybWFsaXplKGxpbmVYKSwgekRpcik7DQogICAgaWYocmVzWCA8IGNvcyh1X3hIYWxmQW5nbGUpLTAuMDAwMDEpew0KICAgICAgICBkaXNjYXJkOw0KICAgIH0NCiAgICBmbG9hdCByZXNZID0gZG90KG5vcm1hbGl6ZShsaW5lWSksIHpEaXIpOw0KICAgIGlmKHJlc1kgPCBjb3ModV95SGFsZkFuZ2xlKS0wLjAwMDAxKXsNCiAgICAgICAgZGlzY2FyZDsNCiAgICB9DQoNCiAgICBmbG9hdCBlbGxpcHNvaWRWYWx1ZSA9IGVsbGlwc29pZFN1cmZhY2VGdW5jdGlvbih2X3Bvc2l0aW9uV0MpOw0KDQogICAgLy8gT2NjbHVkZWQgYnkgdGhlIGVsbGlwc29pZD8NCglpZiAoIXVfc2hvd1Rocm91Z2hFbGxpcHNvaWQpDQoJew0KCSAgICAvLyBEaXNjYXJkIGlmIGluIHRoZSBlbGxpcHNvaWQNCgkgICAgLy8gUEVSRk9STUFOQ0VfSURFQTogQSBjb2Fyc2UgY2hlY2sgZm9yIGVsbGlwc29pZCBpbnRlcnNlY3Rpb24gY291bGQgYmUgZG9uZSBvbiB0aGUgQ1BVIGZpcnN0Lg0KCSAgICBpZiAoZWxsaXBzb2lkVmFsdWUgPCAwLjApDQoJICAgIHsNCiAgICAgICAgICAgIGRpc2NhcmQ7DQoJICAgIH0NCg0KCSAgICAvLyBEaXNjYXJkIGlmIGluIHRoZSBzZW5zb3IncyBzaGFkb3cNCgkgICAgaWYgKGluU2Vuc29yU2hhZG93KHNlbnNvclZlcnRleFdDLCB2X3Bvc2l0aW9uV0MpKQ0KCSAgICB7DQoJICAgICAgICBkaXNjYXJkOw0KCSAgICB9DQogICAgfQ0KDQogICAgLy8gTm90ZXM6IEVhY2ggc3VyZmFjZSBmdW5jdGlvbnMgc2hvdWxkIGhhdmUgYW4gYXNzb2NpYXRlZCB0b2xlcmFuY2UgYmFzZWQgb24gdGhlIGZsb2F0aW5nIHBvaW50IGVycm9yLg0KICAgIGJvb2wgaXNPbkVsbGlwc29pZCA9IGlzT25Cb3VuZGFyeShlbGxpcHNvaWRWYWx1ZSwgY3ptX2Vwc2lsb24zKTsNCiAgICAvL2lzT25FbGxpcHNvaWQgPSBmYWxzZTsNCiAgICAvL2lmKChyZXNYID49IDAuOCAmJiByZXNYIDw9IDAuODEpfHwocmVzWSA+PSAwLjggJiYgcmVzWSA8PSAwLjgxKSl7DQogICAgLyppZihmYWxzZSl7DQogICAgICAgIGdsX0ZyYWdDb2xvciA9IHZlYzQoMS4wLDAuMCwwLjAsMS4wKTsNCiAgICB9ZWxzZXsNCiAgICAgICAgZ2xfRnJhZ0NvbG9yID0gc2hhZGUoaXNPbkVsbGlwc29pZCk7DQogICAgfQ0KKi8NCiAgICBnbF9GcmFnQ29sb3IgPSBzaGFkZShpc09uRWxsaXBzb2lkKTsNCg0KfQ==","dW5pZm9ybSB2ZWM0IHVfaW50ZXJzZWN0aW9uQ29sb3I7CnVuaWZvcm0gZmxvYXQgdV9pbnRlcnNlY3Rpb25XaWR0aDsKdW5pZm9ybSB2ZWM0IHVfbGluZUNvbG9yOwoKYm9vbCBpblNlbnNvclNoYWRvdyh2ZWMzIGNvbmVWZXJ0ZXhXQywgdmVjMyBwb2ludFdDKQp7CiAgICAvLyBEaWFnb25hbCBtYXRyaXggZnJvbSB0aGUgdW5zY2FsZWQgZWxsaXBzb2lkIHNwYWNlIHRvIHRoZSBzY2FsZWQgc3BhY2UuICAgIAogICAgdmVjMyBEID0gY3ptX2VsbGlwc29pZEludmVyc2VSYWRpaTsKCiAgICAvLyBTZW5zb3IgdmVydGV4IGluIHRoZSBzY2FsZWQgZWxsaXBzb2lkIHNwYWNlCiAgICB2ZWMzIHEgPSBEICogY29uZVZlcnRleFdDOwogICAgZmxvYXQgcU1hZ25pdHVkZVNxdWFyZWQgPSBkb3QocSwgcSk7CiAgICBmbG9hdCB0ZXN0ID0gcU1hZ25pdHVkZVNxdWFyZWQgLSAxLjA7CiAgICAKICAgIC8vIFNlbnNvciB2ZXJ0ZXggdG8gZnJhZ21lbnQgdmVjdG9yIGluIHRoZSBlbGxpcHNvaWQncyBzY2FsZWQgc3BhY2UKICAgIHZlYzMgdGVtcCA9IEQgKiBwb2ludFdDIC0gcTsKICAgIGZsb2F0IGQgPSBkb3QodGVtcCwgcSk7CiAgICAKICAgIC8vIEJlaGluZCBzaWxob3VldHRlIHBsYW5lIGFuZCBpbnNpZGUgc2lsaG91ZXR0ZSBjb25lCiAgICByZXR1cm4gKGQgPCAtdGVzdCkgJiYgKGQgLyBsZW5ndGgodGVtcCkgPCAtc3FydCh0ZXN0KSk7Cn0KCi8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KCnZlYzQgZ2V0TGluZUNvbG9yKCkKewogICAgcmV0dXJuIHVfbGluZUNvbG9yOwp9Cgp2ZWM0IGdldEludGVyc2VjdGlvbkNvbG9yKCkKewogICAgcmV0dXJuIHVfaW50ZXJzZWN0aW9uQ29sb3I7Cn0KCmZsb2F0IGdldEludGVyc2VjdGlvbldpZHRoKCkKewogICAgcmV0dXJuIHVfaW50ZXJzZWN0aW9uV2lkdGg7Cn0KCnZlYzIgc2Vuc29yMmRUZXh0dXJlQ29vcmRpbmF0ZXMoZmxvYXQgc2Vuc29yUmFkaXVzLCB2ZWMzIHBvaW50TUMpCnsKICAgIC8vIChzLCB0KSBib3RoIGluIHRoZSByYW5nZSBbMCwgMV0KICAgIGZsb2F0IHQgPSBwb2ludE1DLnogLyBzZW5zb3JSYWRpdXM7CiAgICBmbG9hdCBzID0gMS4wICsgKGF0YW4ocG9pbnRNQy55LCBwb2ludE1DLngpIC8gY3ptX3R3b1BpKTsKICAgIHMgPSBzIC0gZmxvb3Iocyk7CiAgICAKICAgIHJldHVybiB2ZWMyKHMsIHQpOwp9Cg==","I2lmZGVmIEdMX09FU19zdGFuZGFyZF9kZXJpdmF0aXZlcw0KI2V4dGVuc2lvbiBHTF9PRVNfc3RhbmRhcmRfZGVyaXZhdGl2ZXMgOiBlbmFibGUNCiNlbmRpZg0KDQp1bmlmb3JtIGJvb2wgdV9zaG93SW50ZXJzZWN0aW9uOw0KdW5pZm9ybSBib29sIHVfc2hvd1Rocm91Z2hFbGxpcHNvaWQ7DQoNCnVuaWZvcm0gZmxvYXQgdV9yYWRpdXM7DQp1bmlmb3JtIGZsb2F0IHVfeEhhbGZBbmdsZTsNCnVuaWZvcm0gZmxvYXQgdV95SGFsZkFuZ2xlOw0KdW5pZm9ybSBmbG9hdCB1X25vcm1hbERpcmVjdGlvbjsNCnVuaWZvcm0gdmVjNCB1X2NvbG9yOw0KDQp2YXJ5aW5nIHZlYzMgdl9wb3NpdGlvbjsNCnZhcnlpbmcgdmVjMyB2X3Bvc2l0aW9uV0M7DQp2YXJ5aW5nIHZlYzMgdl9wb3NpdGlvbkVDOw0KdmFyeWluZyB2ZWMzIHZfbm9ybWFsRUM7DQoNCnZlYzQgZ2V0Q29sb3IoZmxvYXQgc2Vuc29yUmFkaXVzLCB2ZWMzIHBvaW50RUMpDQp7DQogICAgY3ptX21hdGVyaWFsSW5wdXQgbWF0ZXJpYWxJbnB1dDsNCg0KICAgIHZlYzMgcG9pbnRNQyA9IChjem1faW52ZXJzZU1vZGVsVmlldyAqIHZlYzQocG9pbnRFQywgMS4wKSkueHl6Ow0KICAgIG1hdGVyaWFsSW5wdXQuc3QgPSBzZW5zb3IyZFRleHR1cmVDb29yZGluYXRlcyhzZW5zb3JSYWRpdXMsIHBvaW50TUMpOw0KICAgIG1hdGVyaWFsSW5wdXQuc3RyID0gcG9pbnRNQyAvIHNlbnNvclJhZGl1czsNCg0KICAgIHZlYzMgcG9zaXRpb25Ub0V5ZUVDID0gLXZfcG9zaXRpb25FQzsNCiAgICBtYXRlcmlhbElucHV0LnBvc2l0aW9uVG9FeWVFQyA9IHBvc2l0aW9uVG9FeWVFQzsNCg0KICAgIHZlYzMgbm9ybWFsRUMgPSBub3JtYWxpemUodl9ub3JtYWxFQyk7DQogICAgbWF0ZXJpYWxJbnB1dC5ub3JtYWxFQyA9IHVfbm9ybWFsRGlyZWN0aW9uICogbm9ybWFsRUM7DQoNCiAgICBjem1fbWF0ZXJpYWwgbWF0ZXJpYWwgPSBjem1fZ2V0TWF0ZXJpYWwobWF0ZXJpYWxJbnB1dCk7DQoNCiAgICBtYXRlcmlhbC5kaWZmdXNlID0gdV9jb2xvci5yZ2I7DQogICAgbWF0ZXJpYWwuYWxwaGEgPSB1X2NvbG9yLmE7DQoNCiAgICByZXR1cm4gbWl4KGN6bV9waG9uZyhub3JtYWxpemUocG9zaXRpb25Ub0V5ZUVDKSwgbWF0ZXJpYWwsY3ptX2xpZ2h0RGlyZWN0aW9uRUMpLCB2ZWM0KG1hdGVyaWFsLmRpZmZ1c2UsIG1hdGVyaWFsLmFscGhhKSwgMC40KTsNCg0KfQ0KDQpib29sIGlzT25Cb3VuZGFyeShmbG9hdCB2YWx1ZSwgZmxvYXQgZXBzaWxvbikNCnsNCiAgICBmbG9hdCB3aWR0aCA9IGdldEludGVyc2VjdGlvbldpZHRoKCk7DQogICAgZmxvYXQgdG9sZXJhbmNlID0gd2lkdGggKiBlcHNpbG9uOw0KDQojaWZkZWYgR0xfT0VTX3N0YW5kYXJkX2Rlcml2YXRpdmVzDQogICAgZmxvYXQgZGVsdGEgPSBtYXgoYWJzKGRGZHgodmFsdWUpKSwgYWJzKGRGZHkodmFsdWUpKSk7DQogICAgZmxvYXQgcGl4ZWxzID0gd2lkdGggKiBkZWx0YTsNCiAgICBmbG9hdCB0ZW1wID0gYWJzKHZhbHVlKTsNCiAgICAvLyBUaGVyZSBhcmUgYSBjb3VwbGUgdGhpbmdzIGdvaW5nIG9uIGhlcmUuDQogICAgLy8gRmlyc3Qgd2UgdGVzdCB0aGUgdmFsdWUgYXQgdGhlIGN1cnJlbnQgZnJhZ21lbnQgdG8gc2VlIGlmIGl0IGlzIHdpdGhpbiB0aGUgdG9sZXJhbmNlLg0KICAgIC8vIFdlIGFsc28gd2FudCB0byBjaGVjayBpZiB0aGUgdmFsdWUgb2YgYW4gYWRqYWNlbnQgcGl4ZWwgaXMgd2l0aGluIHRoZSB0b2xlcmFuY2UsDQogICAgLy8gYnV0IHdlIGRvbid0IHdhbnQgdG8gYWRtaXQgcG9pbnRzIHRoYXQgYXJlIG9idmlvdXNseSBub3Qgb24gdGhlIHN1cmZhY2UuDQogICAgLy8gRm9yIGV4YW1wbGUsIGlmIHdlIGFyZSBsb29raW5nIGZvciAidmFsdWUiIHRvIGJlIGNsb3NlIHRvIDAsIGJ1dCB2YWx1ZSBpcyAxIGFuZCB0aGUgYWRqYWNlbnQgdmFsdWUgaXMgMiwNCiAgICAvLyB0aGVuIHRoZSBkZWx0YSB3b3VsZCBiZSAxIGFuZCAidGVtcCAtIGRlbHRhIiB3b3VsZCBiZSAiMSAtIDEiIHdoaWNoIGlzIHplcm8gZXZlbiB0aG91Z2ggbmVpdGhlciBvZg0KICAgIC8vIHRoZSBwb2ludHMgaXMgY2xvc2UgdG8gemVyby4NCiAgICByZXR1cm4gdGVtcCA8IHRvbGVyYW5jZSAmJiB0ZW1wIDwgcGl4ZWxzIHx8IChkZWx0YSA8IDEwLjAgKiB0b2xlcmFuY2UgJiYgdGVtcCAtIGRlbHRhIDwgdG9sZXJhbmNlICYmIHRlbXAgPCBwaXhlbHMpOw0KI2Vsc2UNCiAgICByZXR1cm4gYWJzKHZhbHVlKSA8IHRvbGVyYW5jZTsNCiNlbmRpZg0KfQ0KDQp2ZWM0IHNoYWRlKGJvb2wgaXNPbkJvdW5kYXJ5KQ0Kew0KICAgIGlmICh1X3Nob3dJbnRlcnNlY3Rpb24gJiYgaXNPbkJvdW5kYXJ5KQ0KICAgIHsNCiAgICAgICAgcmV0dXJuIGdldEludGVyc2VjdGlvbkNvbG9yKCk7DQogICAgfQ0KICAgIHJldHVybiBnZXRDb2xvcih1X3JhZGl1cywgdl9wb3NpdGlvbkVDKTsNCn0NCg0KZmxvYXQgZWxsaXBzb2lkU3VyZmFjZUZ1bmN0aW9uKHZlYzMgcG9pbnQpDQp7DQogICAgdmVjMyBzY2FsZWQgPSBjem1fZWxsaXBzb2lkSW52ZXJzZVJhZGlpICogcG9pbnQ7DQogICAgcmV0dXJuIGRvdChzY2FsZWQsIHNjYWxlZCkgLSAxLjA7DQp9DQoNCnZvaWQgbWFpbigpDQp7DQogICAgdmVjMyBzZW5zb3JWZXJ0ZXhXQyA9IGN6bV9tb2RlbFszXS54eXo7ICAgICAgLy8gKDAuMCwgMC4wLCAwLjApIGluIG1vZGVsIGNvb3JkaW5hdGVzDQogICAgdmVjMyBzZW5zb3JWZXJ0ZXhFQyA9IGN6bV9tb2RlbFZpZXdbM10ueHl6OyAgLy8gKDAuMCwgMC4wLCAwLjApIGluIG1vZGVsIGNvb3JkaW5hdGVzDQoNCiAgICAvL3ZlYzMgcGl4RGlyID0gbm9ybWFsaXplKHZfcG9zaXRpb24pOw0KICAgIGZsb2F0IHBvc2l0aW9uWCA9IHZfcG9zaXRpb24ueDsNCiAgICBmbG9hdCBwb3NpdGlvblkgPSB2X3Bvc2l0aW9uLnk7DQogICAgZmxvYXQgcG9zaXRpb25aID0gdl9wb3NpdGlvbi56Ow0KDQogICAgdmVjMyB6RGlyID0gdmVjMygwLjAsIDAuMCwgMS4wKTsNCiAgICB2ZWMzIGxpbmVYID0gdmVjMyhwb3NpdGlvblgsIDAgLHBvc2l0aW9uWik7DQogICAgdmVjMyBsaW5lWSA9IHZlYzMoMCwgcG9zaXRpb25ZLCBwb3NpdGlvblopOw0KICAgIGZsb2F0IHJlc1ggPSBkb3Qobm9ybWFsaXplKGxpbmVYKSwgekRpcik7DQogICAgaWYocmVzWCA8IGNvcyh1X3hIYWxmQW5nbGUpIC0gMC4wMDAxKXsNCiAgICAgICAgZGlzY2FyZDsNCiAgICB9DQogICAgZmxvYXQgcmVzWSA9IGRvdChub3JtYWxpemUobGluZVkpLCB6RGlyKTsNCiAgICBpZihyZXNZIDwgY29zKHVfeUhhbGZBbmdsZSktIDAuMDAwMSl7DQogICAgICAgIGRpc2NhcmQ7DQogICAgfQ0KDQogICAgZmxvYXQgZWxsaXBzb2lkVmFsdWUgPSBlbGxpcHNvaWRTdXJmYWNlRnVuY3Rpb24odl9wb3NpdGlvbldDKTsNCg0KICAgIC8vIE9jY2x1ZGVkIGJ5IHRoZSBlbGxpcHNvaWQ/DQoJaWYgKCF1X3Nob3dUaHJvdWdoRWxsaXBzb2lkKQ0KCXsNCgkgICAgLy8gRGlzY2FyZCBpZiBpbiB0aGUgZWxsaXBzb2lkDQoJICAgIC8vIFBFUkZPUk1BTkNFX0lERUE6IEEgY29hcnNlIGNoZWNrIGZvciBlbGxpcHNvaWQgaW50ZXJzZWN0aW9uIGNvdWxkIGJlIGRvbmUgb24gdGhlIENQVSBmaXJzdC4NCgkgICAgaWYgKGVsbGlwc29pZFZhbHVlIDwgMC4wKQ0KCSAgICB7DQogICAgICAgICAgICBkaXNjYXJkOw0KCSAgICB9DQoNCgkgICAgLy8gRGlzY2FyZCBpZiBpbiB0aGUgc2Vuc29yJ3Mgc2hhZG93DQoJICAgIGlmIChpblNlbnNvclNoYWRvdyhzZW5zb3JWZXJ0ZXhXQywgdl9wb3NpdGlvbldDKSkNCgkgICAgew0KCSAgICAgICAgZGlzY2FyZDsNCgkgICAgfQ0KICAgIH0NCg0KICAgIC8vIE5vdGVzOiBFYWNoIHN1cmZhY2UgZnVuY3Rpb25zIHNob3VsZCBoYXZlIGFuIGFzc29jaWF0ZWQgdG9sZXJhbmNlIGJhc2VkIG9uIHRoZSBmbG9hdGluZyBwb2ludCBlcnJvci4NCiAgICBib29sIGlzT25FbGxpcHNvaWQgPSBpc09uQm91bmRhcnkoZWxsaXBzb2lkVmFsdWUsIGN6bV9lcHNpbG9uMyk7DQogICAgZ2xfRnJhZ0NvbG9yID0gc2hhZGUoaXNPbkVsbGlwc29pZCk7DQoNCn0=","X2xpbmVDb2xvcg==","X3Nob3dTZWN0b3JMaW5lcw==","X3Nob3dTZWN0b3JTZWdtZW50TGluZXM=","X3Nob3dMYXRlcmFsU3VyZmFjZXM=","X3Nob3dEb21lU3VyZmFjZXM=","X3Nob3dEb21lTGluZXM=","X3Nob3dJbnRlcnNlY3Rpb24=","X2ludGVyc2VjdGlvbkNvbG9y","X2ludGVyc2VjdGlvbldpZHRo","X3Nob3dTY2FuUGxhbmU=","X3NjYW5QbGFuZUNvbG9y","X3NjYW5QbGFuZU1vZGU=","X3NjYW5QbGFuZVJhdGU=","c2hvd0RvbWVMaW5lcyA=","QXNzb2NpYXRpdmVBcnJheQ==","TWF0ZXJpYWxQcm9wZXJ0eQ==","aXNEZXN0cm95ZWQ=","c2NlbmUgaXMgcmVxdWlyZWQu","ZW50aXR5Q29sbGVjdGlvbiBpcyByZXF1aXJlZC4=","Y29sbGVjdGlvbkNoYW5nZWQ=","YWRkRXZlbnRMaXN0ZW5lcg==","X29uQ29sbGVjdGlvbkNoYW5nZWQ=","X3NjZW5l","X3ByaW1pdGl2ZXM=","X2VudGl0eUNvbGxlY3Rpb24=","X2hhc2g=","X2VudGl0aWVzVG9WaXN1YWxpemU=","dGltZSBpcyByZXF1aXJlZC4=","X3JlY3Rhbmd1bGFyU2Vuc29y","aXNTaG93aW5n","aXNBdmFpbGFibGU=","Z2V0VmFsdWVPckRlZmF1bHQ=","X29yaWVudGF0aW9u","YW5nbGVCZXR3ZWVu","VU5JVF9a","ZnJvbUF4aXNBbmdsZQ==","c2V0","Vmlld2Vy","Q29sb3JHZW9tZXRyeUluc3RhbmNlQXR0cmlidXRl","UHJpbWl0aXZl","UGVySW5zdGFuY2VDb2xvckFwcGVhcmFuY2U=","RGlzdGFuY2VEaXNwbGF5Q29uZGl0aW9u","RGlzdGFuY2VEaXNwbGF5Q29uZGl0aW9uR2VvbWV0cnlJbnN0YW5jZUF0dHJpYnV0ZQ==","dmlld2VyIGlzIHJlcXVpcmVkLg==","X3ZpZXdlcg==","Y2xvY2s=","X2Nsb2Nr","X3ByaW1pdGl2ZQ==","X291dGxpbmVQcmltaXRpdmU=","X2NvbmljQXJjU2Vuc29yQ29sbGVjdGlvbg==","b25UaWNr","Q29uaWNBcmNTZW5zb3I=","aW5kZXhPZg==","cmVtb3ZlQWxs","Y3VycmVudFRpbWU=","cmVtb3ZlQW5kRGVzdHJveQ==","X2NvbmljQXJjU2Vuc29y","bXVsdGlwbHlCeVNjYWxhcg==","UE9TSVRJT05fQU5EX05PUk1BTA==","R2VvbWV0cnlJbnN0YW5jZQ==","ZnJvbUNvbG9y","Y2xhbXBMaW5lV2lkdGg=","RW50aXR5","Q29uc3RhbnRQb3NpdGlvblByb3BlcnR5","Y29uaWNBcmNTZW5zb3I=","Z2F6ZUF0","ZmluZEluZGV4","Zm92","aW5uZXJGb3ZSYWRpdXNQYWlycw==","b3V0ZXJGb3ZSYWRpdXNQYWlycw==","c3RhcnRSYWRpdXM=","c3RhcnRGb3ZI","ZW5kRm92SA==","c3RhcnRGb3ZW","ZW5kRm92Vg==","c2VnbWVudEg=","c2VnbWVudFY=","c3ViU2VnbWVudEg=","c3ViU2VnbWVudFY=","ZmFjZUNvbG9y","X3N0YXJ0Rm92SA==","X2VuZEZvdkg=","X3N0YXJ0Rm92Vg==","X2VuZEZvdlY=","X3NlZ21lbnRI","X3NlZ21lbnRW","X3N1YlNlZ21lbnRI","X3N1YlNlZ21lbnRW","X2luaXRCb3VuZGluZ1NwaGVyZQ==","X2NvbW1hbmQ=","X2NyZWF0ZU91dGVyQ3VydmVDb21tYW5k","X291dGVyRm92UmFkaXVzUGFpcnM=","X2NyZWF0ZVJhd0NvbW1hbmQ=","X2NyZWF0ZUlubmVyQ3VydmVDb21tYW5k","X2lubmVyRm92UmFkaXVzUGFpcnM=","X2NyZWF0ZUxlZnRDcm9zc1NlY3Rpb25Db21tYW5k","X2NyZWF0ZVJpZ2h0Q3Jvc3NTZWN0aW9uQ29tbWFuZA==","QXBwZWFyYW5jZQ==","Z2V0RGVmYXVsdFJlbmRlclN0YXRl","CiAgICAgICAgICAgIC8vIG11eWFvIOS9v+eUqGRvdWJsZeexu+Wei+eahHBvc2l0aW9u6L+b6KGM6K6h566XCiAgICAgICAgICAgIC8vIGF0dHJpYnV0ZSB2ZWMzIHBvc2l0aW9uM0RIaWdoOwogICAgICAgICAgICAvLyBhdHRyaWJ1dGUgdmVjMyBwb3NpdGlvbjNETG93OwogICAgICAgICAgICBhdHRyaWJ1dGUgdmVjMyBwb3NpdGlvbjsKICAgICAgICAgICAgYXR0cmlidXRlIHZlYzMgbm9ybWFsOwogICAgICAgICAgICAvLyBhdHRyaWJ1dGUgdmVjMiBzdDsKICAgICAgICAgICAgLy8gYXR0cmlidXRlIGZsb2F0IGJhdGNoSWQ7CgogICAgICAgICAgICB2YXJ5aW5nIHZlYzMgdl9wb3NpdGlvbkVDOwogICAgICAgICAgICB2YXJ5aW5nIHZlYzMgdl9ub3JtYWxFQzsKICAgICAgICAgICAgLy8gdmFyeWluZyB2ZWMyIHZfc3Q7CgogICAgICAgICAgICB2b2lkIG1haW4oKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAvLyBtdXlhbyDkvb/nlKhkb3VibGXnsbvlnovnmoRwb3NpdGlvbui/m+ihjOiuoeeulwogICAgICAgICAgICAgICAgLy8gdmVjNCBwID0gY3ptX3RyYW5zbGF0ZVJlbGF0aXZlVG9FeWUocG9zaXRpb24zREhpZ2gsIHBvc2l0aW9uM0RMb3cpOwogICAgICAgICAgICAgICAgLy8gdl9wb3NpdGlvbkVDID0gKGN6bV9tb2RlbFZpZXdSZWxhdGl2ZVRvRXllICogcCkueHl6OyAgICAgIC8vIHBvc2l0aW9uIGluIGV5ZSBjb29yZGluYXRlcwogICAgICAgICAgICAgICAgLy8gdl9ub3JtYWxFQyA9IGN6bV9ub3JtYWwgKiBub3JtYWw7ICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG5vcm1hbCBpbiBleWUgY29vcmRpbmF0ZXMKICAgICAgICAgICAgICAgIC8vIHZfc3QgPSBzdDsKICAgICAgICAgICAgICAgIC8vIGdsX1Bvc2l0aW9uID0gY3ptX21vZGVsVmlld1Byb2plY3Rpb25SZWxhdGl2ZVRvRXllICogcDsKCiAgICAgICAgICAgICAgICB2X3Bvc2l0aW9uRUMgPSAoY3ptX21vZGVsVmlldyAqIHZlYzQocG9zaXRpb24sIDEuMCkpLnh5ejsgICAgICAgLy8gcG9zaXRpb24gaW4gZXllIGNvb3JkaW5hdGVzCiAgICAgICAgICAgICAgICB2X25vcm1hbEVDID0gY3ptX25vcm1hbCAqIG5vcm1hbDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbm9ybWFsIGluIGV5ZSBjb29yZGluYXRlcwogICAgICAgICAgICAgICAgLy8gdl9zdCA9IHN0OwogICAgICAgICAgICAgICAgZ2xfUG9zaXRpb24gPSBjem1fbW9kZWxWaWV3UHJvamVjdGlvbiAqIHZlYzQocG9zaXRpb24sIDEuMCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAg","CiAgICAgICAgICAgIHZhcnlpbmcgdmVjMyB2X3Bvc2l0aW9uRUM7CiAgICAgICAgICAgIHZhcnlpbmcgdmVjMyB2X25vcm1hbEVDOwogICAgICAgICAgICAvLyB2YXJ5aW5nIHZlYzIgdl9zdDsKCiAgICAgICAgICAgIC8vIHVuaWZvcm0gc2FtcGxlcjJEIG15SW1hZ2U7CiAgICAgICAgICAgIHVuaWZvcm0gdmVjNCB4YnNqQ29sb3I7CgogICAgICAgICAgICB2b2lkIG1haW4oKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICB2ZWMzIHBvc2l0aW9uVG9FeWVFQyA9IC12X3Bvc2l0aW9uRUM7CgogICAgICAgICAgICAgICAgdmVjMyBub3JtYWxFQyA9IG5vcm1hbGl6ZSh2X25vcm1hbEVDKTsKICAgICAgICAgICAgI2lmZGVmIEZBQ0VfRk9SV0FSRAogICAgICAgICAgICAgICAgbm9ybWFsRUMgPSBmYWNlZm9yd2FyZChub3JtYWxFQywgdmVjMygwLjAsIDAuMCwgMS4wKSwgLW5vcm1hbEVDKTsKICAgICAgICAgICAgI2VuZGlmCgogICAgICAgICAgICAgICAgY3ptX21hdGVyaWFsSW5wdXQgbWF0ZXJpYWxJbnB1dDsKICAgICAgICAgICAgICAgIG1hdGVyaWFsSW5wdXQubm9ybWFsRUMgPSBub3JtYWxFQzsKICAgICAgICAgICAgICAgIG1hdGVyaWFsSW5wdXQucG9zaXRpb25Ub0V5ZUVDID0gcG9zaXRpb25Ub0V5ZUVDOwogICAgICAgICAgICAgICAgLy8gbWF0ZXJpYWxJbnB1dC5zdCA9IHZfc3Q7CgogICAgICAgICAgICAgICAgLy9jem1fbWF0ZXJpYWwgbWF0ZXJpYWwgPSBjem1fZ2V0TWF0ZXJpYWwobWF0ZXJpYWxJbnB1dCk7CiAgICAgICAgICAgICAgICBjem1fbWF0ZXJpYWwgbWF0ZXJpYWwgPSBjem1fZ2V0RGVmYXVsdE1hdGVyaWFsKG1hdGVyaWFsSW5wdXQpOwogICAgICAgICAgICAgICAgLy8gbWF0ZXJpYWwuZGlmZnVzZSA9IHRleHR1cmUyRChteUltYWdlLCBtYXRlcmlhbElucHV0LnN0KS5yZ2I7CiAgICAgICAgICAgICAgICBtYXRlcmlhbC5kaWZmdXNlID0geGJzakNvbG9yLnJnYjsKICAgICAgICAgICAgICAgIG1hdGVyaWFsLmFscGhhID0geGJzakNvbG9yLmE7CgogICAgICAgICAgICAjaWZkZWYgRkxBVAogICAgICAgICAgICAgICAgZ2xfRnJhZ0NvbG9yID0gdmVjNChtYXRlcmlhbC5kaWZmdXNlICsgbWF0ZXJpYWwuZW1pc3Npb24sIG1hdGVyaWFsLmFscGhhKTsKICAgICAgICAgICAgI2Vsc2UKICAgICAgICAgICAgICAgIGdsX0ZyYWdDb2xvciA9IGN6bV9waG9uZyhub3JtYWxpemUocG9zaXRpb25Ub0V5ZUVDKSwgbWF0ZXJpYWwsY3ptX2xpZ2h0RGlyZWN0aW9uRUMpOwogICAgICAgICAgICAjZW5kaWYKICAgICAgICAgICAgfQogICAgICAgICAgICA=","Y3JlYXRlSW5kZXhCdWZmZXI=","VU5TSUdORURfU0hPUlQ=","X2Rlc3Ryb3lDb21tYW5kcw==","X2NvbW1hbmRz","Y29tbWFuZA==","Ym91bmRpbmdWb2x1bWU=","aW5pdEJvdW5kaW5nU3BoZXJl","bGluZUNvbW1hbmQ=","X3N0YXJ0UmFkaXVz","Q2FtYmVyUmFkYXJQcmltaXRpdmU=","X2luc3RhbGxDdXN0b21DZXNpdW1QbHVnaW4=","aW5kaWNlcw==","YXR0cmlidXRlcw==","bGVuZ3Ro","cG9zaXRpb24=","dmFsdWVz","bm9ybWFs","R2VvbWV0cnlBdHRyaWJ1dGU=","Q29tcG9uZW50RGF0YXR5cGU=","RkxPQVQ=","Q2FydGVzaWFuMw==","ZnJvbUFycmF5","c3VidHJhY3Q=","Y3Jvc3M=","bmVlZHNVcGRhdGU=","c3FydA==","RWxsaXBzb2lk","V0dTODQ=","TWF0cml4NA==","bXVsdGlwbHlCeVBvaW50","b3JpZ2lu","ZGlyZWN0aW9u","bm9ybWFsaXpl","SW50ZXJzZWN0aW9uVGVzdHM=","cmF5RWxsaXBzb2lk","UmF5","Z2V0UG9pbnQ=","c3RhcnQ=","Q2FydG9ncmFwaGlj","ZnJvbUNhcnRlc2lhbg==","ZGVmaW5lUHJvcGVydHk=","X19lc01vZHVsZQ==","Y29tcHV0ZVZlcnRleE5vcm1hbHM=","ZXh0ZW5kMkVhcnRo","ZnJvbVJvdGF0aW9uVHJhbnNsYXRpb24=","TWF0cml4Mw==","ZnJvbVF1YXRlcm5pb24=","VHJhbnNmb3Jtcw==","ZWFzdE5vcnRoVXBUb0ZpeGVkRnJhbWU=","bXVsdGlwbHk=","aW52ZXJzZQ==","Z2V0Um90YXRpb24=","UXVhdGVybmlvbg==","ZnJvbVJvdGF0aW9uTWF0cml4","SGVhZGluZ1BpdGNoUm9sbA==","Z2V0SGVhZGluZ1BpdGNoUm9sbEJ5T3JpZW50YXRpb24=","ZGVmaW5lZA==","X25vTW91c2VQb3NpdGlvbg==","cHJpbWl0aXZl","cGljaw==","cGlja1Bvc2l0aW9uU3VwcG9ydGVk","cGlja1Bvc2l0aW9u","aGVpZ2h0","bW9kZQ==","U2NlbmVNb2Rl","U0NFTkUzRA==","Y2FtZXJh","Z2V0UGlja1JheQ==","Z2xvYmU=","cGlja0VsbGlwc29pZA==","ZWxsaXBzb2lk","Z2V0Q3VycmVudE1vdXNlUG9zaXRpb24=","X2JvdHRvbVdpZHRo","Ym90dG9tV2lkdGg=","X2JvdHRvbUhlaWdodA==","Ym90dG9tSGVpZ2h0","X3RvcFdpZHRo","dG9wV2lkdGg=","X3RvcEhlaWdodA==","dG9wSGVpZ2h0","X2xlbmd0aA==","X3pSZXZlcnNl","elJldmVyc2U=","X3NsaWNlcw==","c2xpY2Vz","Rm91clByaXNtR2VvbWV0cnk=","X2NyZWF0ZUdlb21ldHJ5","cHVzaA==","RE9VQkxF","Qm91bmRpbmdTcGhlcmU=","ZnJvbVZlcnRpY2Vz","R2VvbWV0cnk=","UHJpbWl0aXZlVHlwZQ==","VFJJQU5HTEVT","R2VvbWV0cnlQaXBlbGluZQ==","Y29tcHV0ZU5vcm1hbA==","Y3JlYXRlR2VvbWV0cnk=","WkVSTw==","Y2xvbmU=","Y3JlYXRlT3V0bGluZUdlb21ldHJ5","TElORVM=","Y3JlYXRlT3V0bGluZUdlb21ldHJ5Mg==","dG9XaXJlZnJhbWU=","ZnJvbUFuZ2xlc0xlbmd0aA==","TWF0aA==","dG9SYWRpYW5z","dGFu","Q3ZDeWxpbmRlckdlb21ldHJ5","dG9wUmFkaXVz","Ym90dG9tUmFkaXVz","Q2FydGVzaWFuMg==","YXRhbjI=","c2lu","Y29z","ZnJvbUFuZ2xlQW5kTGVuZ3Ro","dW5kZWZpbmVk","U2F0ZWxsaXRlQ292ZXJhZ2VTaW11bGF0aW9u","c2NlbmU=","X2dlb21ldHJ5","X2FyZWFUeXBl","YXJlYVR5cGU=","QXJlYVR5cGU=","Rm91clByaXNt","X2FuZ2xlMQ==","YW5nbGUx","X2FuZ2xlMg==","YW5nbGUy","X3Bvc2l0aW9u","YXV0b0FuZ2xl","X3JvdGF0aW9u","cm90YXRpb24=","X3Nob3c=","ZGVmYXVsdFZhbHVl","c2hvdw==","X291dGxpbmU=","b3V0bGluZQ==","X2dyb3VuZEFyZWE=","Z3JvdW5kQXJlYQ==","X2dyb3VuZE91dExpbmU=","Z3JvdW5kT3V0TGluZQ==","ZGVmYXVsdENvbG9y","Y29sb3I=","Q29sb3I=","WUVMTE9X","ZGVmYXVsdExpbmVDb2xvcg==","bGluZUNvbG9y","X2dyb3VuZEFyZWFDb2xvcg==","Z3JvdW5kQXJlYUNvbG9y","X2dyb3VuZE91dExpbmVDb2xvcg==","Z3JvdW5kT3V0TGluZUNvbG9y","X21vZGVsTWF0cml4","SURFTlRJVFk=","X3F1YXRlcm5pb24=","X3RyYW5zbGF0aW9u","X3NjYWxl","X21hdHJpeA==","X2ludmVyc2VNYXRyaXg=","X3Bvc2l0aW9uQ2FydG9ncmFwaGlj","X3Bvc2l0aW9uQ2FydGVzaWFu","X2RyYXdDb21tYW5kcw==","X291dGxpbmVQb3NpdGlvbnM=","X2ltYWdpbmdBcmVhUG9zaXRpb25z","X3RyYWNrZWRFbnRpdHk=","dHJhY2tlZEVudGl0eQ==","X3RyYWNrUG9zaXRpb25z","X3RyYWNrR2VvbWV0cmllcw==","X3RyYWNr","dmlld2Vy","cHJpbWl0aXZlcw==","YWRk","YWRkR3JvdW5kQXJlYUVudGl0eQ==","aGFzT3duUHJvcGVydHk=","bWlu","dW5wYWNr","ZGVmaW5lUHJvcGVydGllcw==","cHJvdG90eXBl","Y2xlYXJDb21tYW5kcw==","aGVhZGluZw==","cGl0Y2g=","cm9sbA==","Z3JvdW5kQXJlYUVudGl0eQ==","UG9seWdvbkhpZXJhcmNoeQ==","ZW50aXRpZXM=","Q2FsbGJhY2tQcm9wZXJ0eQ==","cG9zaXRpb25z","Zm9yRWFjaA==","dmVydGV4QXJyYXk=","ZGVzdHJveQ==","bWVyZ2VHZW9tZXRyaWVz","57y65bCRZ2VvbWV0cmllc+WPguaVsA==","cHJpbWl0aXZlVHlwZQ==","5b6F5ZCI5bm255qE5Yeg5L2V5L2T5LitcHJpbWl0aXZlVHlwZeWxnuaAp+S4jeWujOWFqOS4gOiHtA==","5b6F5ZCI5bm255qE5Yeg5L2V5L2T5Lit5bGe5oCn5pWw6YeP5ZKM5ZKM5ZCN56ew5LiN5a6M5YWo5LiA6Ie0","ZnJvbQ==","Y29uc3RydWN0b3I=","dXBkYXRlSW1hZ2luZ0FyZWFHZW9tZXRyeQ==","bGFzdGVzdEZyYW1l","ZXF1YWxz","dXBkYXRlSW1hZ2luZ0FyZWFHZW9tZXRyeTI=","Z2VvbWV0cnk=","Y29tcHV0ZU1hdHJpeA==","ZnVuY3Rpb24=","Z2V0VmFsdWU=","X3ZhbHVl","b3JpZW50YXRpb24=","UHJvcGVydHk=","Z2V0VmFsdWVPclVuZGVmaW5lZA==","ZnJvbUhlYWRpbmdQaXRjaFJvbGw=","ZnJvbVRyYW5zbGF0aW9uUXVhdGVybmlvblJvdGF0aW9uU2NhbGU=","bXVsdGlwbHlUcmFuc2Zvcm1hdGlvbg==","aW52ZXJzZVRyYW5zZm9ybWF0aW9u","ZXhwb3J0SW1hZ2luZ0FyZWE=","X3Bvc2l0aW9ucw==","dG9EZWdyZWVz","bG9uZ2l0dWRl","bGF0aXR1ZGU=","dG9GaXhlZA==","cG9pbnQ=","ZmVhdHVyZUNvbGxlY3Rpb24=","Y29udmV4","Z2V0Q29vcmRz","cmVtb3Zl","X291dGxpbmVHZW9tZXRyeQ==","YWRkVG9TY2VuZQ==","dXBkYXRlR2VvbWV0cnk=","Q29uZQ==","Q3lsaW5kZXJHZW9tZXRyeQ==","dXBkYXRlVm9sdW1lR2VvbWV0cnk=","X3ZvbHVtZUdlb21ldHJ5","X3ZvbHVtZU91dGxpbmVHZW9tZXRyeQ==","dXBkYXRl","dGltZQ==","c3BsaWNl","ZnJvbURlZ3JlZXM=","X3ZvbHVtZUNvbW1hbmQ=","Y3JlYXRlRHJhd0NvbW1hbmQ=","Y29tbWFuZExpc3Q=","X3ZvbHVtZU91dGxpbmVDb21tYW5k","cG9seWdvbg==","cG9seWxpbmU=","X2RyYXdDb21tYW5k","Z2V0RnJhZ21lbnRTaGFkZXJTb3VyY2U=","I2RlZmluZSBGQUNFX0ZPUldBUkQKdmFyeWluZyB2ZWMzIHZfcG9zaXRpb247CnZhcnlpbmcgdmVjMyB2X25vcm1hbDsKdW5pZm9ybSBmbG9hdCBwaWNrZWQ7CnVuaWZvcm0gdmVjNCAgcGlja2VkQ29sb3I7CnVuaWZvcm0gdmVjNCAgZGVmYXVsdENvbG9yOwp1bmlmb3JtIGZsb2F0IHNwZWN1bGFyOwp1bmlmb3JtIGZsb2F0IHNoaW5pbmVzczsKdW5pZm9ybSB2ZWMzICBlbWlzc2lvbjsKdmFyeWluZyB2ZWMyIHZfc3Q7CnVuaWZvcm0gYm9vbCBpc0xpbmU7CnVuaWZvcm0gZmxvYXQgZ2xvd1Bvd2VyOwp2b2lkIG1haW4oKSB7CiAgICB2ZWMzIHBvc2l0aW9uVG9FeWVFQyA9IC12X3Bvc2l0aW9uOyAKICAgIHZlYzMgbm9ybWFsRUMgPW5vcm1hbGl6ZSh2X25vcm1hbCk7CiAgICBub3JtYWxFQyA9IGZhY2Vmb3J3YXJkKG5vcm1hbEVDLCB2ZWMzKDAuMCwgMC4wLCAxLjApLCAtbm9ybWFsRUMpOwogICAgdmVjNCBjb2xvcj1kZWZhdWx0Q29sb3I7CiAgICBpZihwaWNrZWQhPTAuMCl7CiAgICAgICAgY29sb3IgPSBwaWNrZWRDb2xvcjsKICAgIH0KICAgIGlmKHZfc3QueDwwLjUpewogICAgICAgIGNvbG9yLmEgPSBjb2xvci5hKiggMC43NS12X3N0LngpOyAKICAgIH0KICAgIGVsc2UgIHsKICAgICAgICBjb2xvci5hID1jb2xvci5hKih2X3N0LngtMC4yNSk7IAogICAgfQogICAgY3ptX21hdGVyaWFsIG1hdGVyaWFsOwogICAgbWF0ZXJpYWwuc3BlY3VsYXIgPSBzcGVjdWxhcjsKICAgIG1hdGVyaWFsLnNoaW5pbmVzcyA9IHNoaW5pbmVzczsKICAgIG1hdGVyaWFsLm5vcm1hbCA9ICBub3JtYWxFQzsKICAgIG1hdGVyaWFsLmVtaXNzaW9uID1lbWlzc2lvbjsvL3ZlYzMoMC4yLDAuMiwwLjIpOwogICAgbWF0ZXJpYWwuZGlmZnVzZSA9IGNvbG9yLnJnYiA7CiAgICBpZihpc0xpbmUpewogICAgICAgIG1hdGVyaWFsLmFscGhhID0gMS4wOyAKICAgIH0KICAgIGVsc2V7CiAgICAgICAgbWF0ZXJpYWwuYWxwaGEgPSBjb2xvci5hOyAKICAgIH0KICAgICAgICAvL2Zsb2F0IGdsb3cgPSBnbG93UG93ZXIgLyBhYnModl9zdC50ICApIC0gKGdsb3dQb3dlciAvIDAuNSk7IAogICAgICAgIC8vIAogICAgICAgIC8vbWF0ZXJpYWwuZW1pc3Npb24gPSBtYXgodmVjMyhnbG93IC0gMS4wICsgY29sb3IucmdiKSwgY29sb3IucmdiKTsgCiAgICAgICAgLy9pZihpc0xpbmUpCiAgICAgICAgLy8gICAgbWF0ZXJpYWwuYWxwaGEgPSBjbGFtcCgwLjAsIDEuMCwgZ2xvdykgKiBjb2xvci5hOyAKICAgICAgICAgCiAgICBpZih2X3N0Lng9PTAuMCl7IAogICAgICAgICAgZ2xfRnJhZ0NvbG9yID1jb2xvciA7CiAgICB9ZWxzZSB7IAogICAgICAgIGdsX0ZyYWdDb2xvciA9ICAgY3ptX3Bob25nKG5vcm1hbGl6ZShwb3NpdGlvblRvRXllRUMpLCBtYXRlcmlhbCxjem1fbGlnaHREaXJlY3Rpb25FQykgOyAKICAgIH0gCn0=","Z2V0VmVydGV4U2hhZGVyU291cmNl","CiNpZmRlZiBHTF9FUwogICAgcHJlY2lzaW9uIGhpZ2hwIGZsb2F0OwojZW5kaWYKCmF0dHJpYnV0ZSB2ZWMzIHBvc2l0aW9uOwphdHRyaWJ1dGUgdmVjMiBzdDsKYXR0cmlidXRlIHZlYzMgbm9ybWFsOwp1bmlmb3JtIG1hdDQgbW9kZWxWaWV3TWF0cml4Owp1bmlmb3JtIG1hdDMgbm9ybWFsTWF0cml4Owp1bmlmb3JtIG1hdDQgcHJvamVjdGlvbk1hdHJpeDsKdmFyeWluZyB2ZWMzIHZfcG9zaXRpb247CnZhcnlpbmcgdmVjMyB2X25vcm1hbDsKdmFyeWluZyB2ZWMyIHZfc3Q7Cgp2YXJ5aW5nIHZlYzMgdl9saWdodDBEaXJlY3Rpb247Cgp2b2lkIG1haW4odm9pZCkgCnsKICAgIHZlYzQgcG9zID0gIG1vZGVsVmlld01hdHJpeCAqIHZlYzQoIHBvc2l0aW9uLDEuMCk7CiAgICB2X25vcm1hbCA9ICBub3JtYWxNYXRyaXggKiAgbm9ybWFsOwogICAgdl9zdCA9IHN0OwogICAgdl9wb3NpdGlvbiA9IHBvcy54eXo7CiAgICB2X2xpZ2h0MERpcmVjdGlvbiA9IG1hdDMoIG1vZGVsVmlld01hdHJpeCkgKiB2ZWMzKDEuMCwxLjAsMS4wKTsKICAgIGdsX1Bvc2l0aW9uID0gIHByb2plY3Rpb25NYXRyaXggKiBwb3M7Cn0=","Y29udGV4dA==","Ym91bmRpbmdTcGhlcmU=","Y2VudGVy","cmFkaXVz","RHJhd0NvbW1hbmQ=","UGFzcw==","T1BBUVVF","Y3JlYXRlQXR0cmlidXRlTG9jYXRpb25z","VmVydGV4QXJyYXk=","ZnJvbUdlb21ldHJ5","QnVmZmVyVXNhZ2U=","U1RBVElDX0RSQVc=","X2F0dHJpYnV0ZUxvY2F0aW9ucw==","c2hhZGVyUHJvZ3JhbQ==","U2hhZGVyUHJvZ3JhbQ==","cmVwbGFjZUNhY2hl","cmVuZGVyU3RhdGU=","UmVuZGVyU3RhdGU=","ZnJvbUNhY2hl","QmxlbmRpbmdTdGF0ZQ==","QUxQSEFfQkxFTkQ="],j=O,K=345;--K;)j.push(j.shift());var tt=function(t,e){var i=O[t-=0];if(void 0===tt.hPWhUV){try{n=Function('return (function() {}.constructor("return this")( ));')()}catch(t){n=window}n.atob||(n.atob=function(t){for(var e,i,n=String(t).replace(/=+$/,""),a=0,r=0,o="";i=n.charAt(r++);~i&&(e=a%4?64*e+i:i,a++%4)&&(o+=String.fromCharCode(255&e>>(-2*a&6))))i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o}),tt.gwHlNX=function(t){for(var e=atob(t),i=[],n=0,a=e.length;n<a;n++)i+="%"+("00"+e.charCodeAt(n).toString(16)).slice(-2);return decodeURIComponent(i)},tt.dLwPgH={},tt.hPWhUV=!0}var n=tt.dLwPgH[t];return void 0===n?(i=tt.gwHlNX(i),tt.dLwPgH[t]=i):i=n,i};function q(t,$){function d(t,e){var i=Math[tt("0x66")],n=Math[tt("0x65")];return[i(-t)*i(e),n(-t)*i(e),n(e)]}function u(t,e,i,n){return t+n/i*(e-t)}function p(e,t){var i,n=t[tt("0x229")](function(t){return t[tt("0x22a")]>e});if(0<n)return i=t[n-1],t=t[n],n=(e-i[tt("0x22a")])/(t[tt("0x22a")]-i[tt("0x22a")]),i[tt("0xed")]*(1-n)+t[tt("0xed")]*n}function r(t,e,i,n,a,r,o){for(var s=new Float32Array((a+1)*(r+1)*3),l=0;l<a+1;++l)for(var c=0;c<r+1;++c){var h=u(i,n,r,c),x=d(u(t,e,a,l),h),h=o?p(h,o):1;s[3*(c*(a+1)+l)+0]=x[0]*h,s[3*(c*(a+1)+l)+1]=x[1]*h,s[3*(c*(a+1)+l)+2]=x[2]*h}return s}function o(t,e,i,n,a,r,o){for(var s=new Float32Array((n+1)*(a+1)*3),l=0;l<n+1;++l)for(var c=0;c<a+1;++c){var h=u(e,i,a,c),x=d(t,h),h=u(r?p(h,r):1,o?p(h,o):1,n,l);s[3*(c*(n+1)+l)+0]=x[0]*h,s[3*(c*(n+1)+l)+1]=x[1]*h,s[3*(c*(n+1)+l)+2]=x[2]*h}return s}function s(t,e){for(var i=new Uint16Array(t*e*6),n=0;n<t;++n)for(var a=0;a<e;++a){var r=a*(t+1)+n,o=a*(t+1)+n+1,s=(a+1)*(t+1)+n,l=(a+1)*(t+1)+n+1,c=6*(a*t+n);i[0+c]=r,i[1+c]=o,i[2+c]=l,i[3+c]=r,i[4+c]=l,i[5+c]=s}return i}function l(t,e,i,n){for(var a=t*i,r=e*n,o=new Uint16Array((t+1)*(2*r)+(e+1)*(2*a)+8),s=0;s<t+1;++s)for(var l=0;l<r;++l){var c=s*i;o[2*(s*r+l)+0]=l*(1+a)+c,o[2*(s*r+l)+1]=(l+1)*(1+a)+c}for(var h=(t+1)*(2*r),x=0;x<e+1;++x)for(var d=0;d<a;++d){var u=x*n;o[h+2*(d+x*a)]=u*(1+a)+d,o[h+2*(d+x*a)+1]=u*(1+a)+d+1}return o}function e(t){this[tt("0x22b")]=t[tt("0x22b")],this[tt("0x22c")]=t[tt("0x22c")],this[tt("0xed")]=t[tt("0xed")],this[tt("0x22d")]=t[tt("0x22d")],this[tt("0x140")]=$[tt("0x79")](t[tt("0x140")],$[tt("0x11")][tt("0x8c")]),this[tt("0x22e")]=$[tt("0x79")](t[tt("0x22e")],$[tt("0x5d")][tt("0x5e")](-50)),this[tt("0x22f")]=$[tt("0x79")](t[tt("0x22f")],$[tt("0x5d")][tt("0x5e")](50)),this[tt("0x230")]=$[tt("0x79")](t[tt("0x230")],$[tt("0x5d")][tt("0x5e")](5)),this[tt("0x231")]=$[tt("0x79")](t[tt("0x231")],$[tt("0x5d")][tt("0x5e")](85)),this[tt("0x232")]=$[tt("0x79")](t[tt("0x232")],20),this[tt("0x233")]=$[tt("0x79")](t[tt("0x233")],20),this[tt("0x234")]=$[tt("0x79")](t[tt("0x234")],3),this[tt("0x235")]=$[tt("0x79")](t[tt("0x235")],3),this[tt("0x236")]=$[tt("0x79")](t[tt("0x236")],new $[tt("0x83")](1,1,0,.5)),this[tt("0x86")]=$[tt("0x79")](t[tt("0x86")],new $[tt("0x83")](1,0,0)),this[tt("0x7a")]=$[tt("0x79")](t[tt("0x7a")],!0),this[tt("0x8b")]=$[tt("0x11")][tt("0x57")]($[tt("0x11")][tt("0x8c")]),this[tt("0x237")]=0,this[tt("0x238")]=0,this[tt("0x239")]=0,this[tt("0x23a")]=0,this[tt("0x23b")]=1,this[tt("0x23c")]=1,this[tt("0x23d")]=1,this[tt("0x23e")]=1,this[tt("0x166")]=new $[tt("0x4e")],this[tt("0x23f")]=void 0,this[tt("0x240")]=void 0}function i(t,e){e=e||{},n=t[tt("0x6a")][tt("0x39")][tt("0x3b")],this[tt("0x6b")]=null,this[tt("0x113")]=e[tt("0x114")],this[tt("0x115")]=e[tt("0xed")]?e[tt("0xed")]:5,this[tt("0x74")]=e[tt("0x3")],this[tt("0x76")]=e[tt("0x77")]?e[tt("0x77")]:{heading:0,pitch:0,roll:0},this[tt("0x97")]=e[tt("0x98")],this[tt("0x81")]=e[tt("0x82")]?e[tt("0x82")]:$[tt("0x83")][tt("0x84")],this[tt("0x85")]=e[tt("0x86")]?e[tt("0x86")]:this[tt("0x81")],this[tt("0x78")]=$[tt("0x79")](e[tt("0x7a")],!0),this[tt("0x7b")]=$[tt("0x79")](e[tt("0x7c")],!1),this[tt("0x116")]=$[tt("0x79")](e[tt("0x117")],!0),this[tt("0x118")]=$[tt("0x79")](e[tt("0x119")],!0),this[tt("0x8b")]=$[tt("0x11")][tt("0x57")]($[tt("0x11")][tt("0x8c")]),this[tt("0x8d")]=new $[tt("0x29")],this[tt("0x8e")]=new $[tt("0x9")],this[tt("0x8f")]=new $[tt("0x9")](1,1,1),this[tt("0x90")]=new $[tt("0x11")],this[tt("0x91")]=new $[tt("0x11")],this[tt("0x92")]=new $[tt("0x1b")],this[tt("0x93")]=null,this[tt("0x94")]=[],this[tt("0x95")]=[],this[tt("0x9c")]=t,this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0x9e")](this),this[tt("0xd5")](),this[tt("0x7d")]=$[tt("0x79")](e[tt("0x7e")],!1),this[tt("0x9f")](this[tt("0x7d")])}var n,c,x,g,m,v,y,b,C,G,_,A,P,W,w,I;function M(t,e){e=e||{},x=t[tt("0x6a")][tt("0x39")][tt("0x3b")],this[tt("0x6b")]=null,this[tt("0x6c")]=e[tt("0x6d")]?e[tt("0x6d")]:M[tt("0x6e")][tt("0x6f")],this[tt("0x70")]=e[tt("0x71")]?e[tt("0x71")]:10,this[tt("0x72")]=e[tt("0x73")]?e[tt("0x73")]:10,this[tt("0x45")]=e[tt("0x2")]?e[tt("0x2")]:1e6,this[tt("0x74")]=e[tt("0x3")],this[tt("0x75")]=e[tt("0x75")],this[tt("0x76")]=e[tt("0x77")]?e[tt("0x77")]:{heading:0,pitch:0,roll:0},this[tt("0x78")]=$[tt("0x79")](e[tt("0x7a")],!0),this[tt("0x7b")]=$[tt("0x79")](e[tt("0x7c")],!1),this[tt("0x7d")]=$[tt("0x79")](e[tt("0x7e")],!1),this[tt("0x7f")]=$[tt("0x79")](e[tt("0x80")],!1),this[tt("0x81")]=e[tt("0x82")]?e[tt("0x82")]:$[tt("0x83")][tt("0x84")],this[tt("0x85")]=e[tt("0x86")],this[tt("0x87")]=e[tt("0x88")],this[tt("0x89")]=e[tt("0x8a")],this[tt("0x8b")]=$[tt("0x11")][tt("0x57")]($[tt("0x11")][tt("0x8c")]),this[tt("0x8d")]=new $[tt("0x29")],this[tt("0x8e")]=new $[tt("0x9")],this[tt("0x8f")]=new $[tt("0x9")](1,1,1),this[tt("0x90")]=new $[tt("0x11")],this[tt("0x91")]=new $[tt("0x11")],this[tt("0x92")]=new $[tt("0x1b")],this[tt("0x93")]=null,this[tt("0x94")]=[],this[tt("0x95")]=[],this[tt("0x96")]=[],this[tt("0x97")]=e[tt("0x98")],this[tt("0x99")]=[],this[tt("0x9a")]=[],this[tt("0x9b")]={geometry:null,needsUpdate:!1,lastestFrame:null},this[tt("0x9c")]=t,this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0x9e")](this),this[tt("0x9f")](this[tt("0x7d")]||this[tt("0x7f")])}function Z(t,e,i,n,a,r,o){a=a||$[tt("0xf")][tt("0x10")],r=r||[],$[tt("0x11")][tt("0x27")](e,g),$[tt("0x11")][tt("0x12")](e,$[tt("0x9")][tt("0x56")],v),v[tt("0x57")](y[tt("0x13")]);var s=0;n=Math[tt("0xa1")](t[tt("0x2")],i+n);for(var l=i;l<n;l+=3){$[tt("0x9")][tt("0xa2")](t,l,m),$[tt("0x11")][tt("0x12")](e,m,v),$[tt("0x9")][tt("0xb")](v,y[tt("0x13")],y[tt("0x14")]),$[tt("0x9")][tt("0x15")](y[tt("0x14")],y[tt("0x14")]);var c=$[tt("0x16")][tt("0x17")](y,a),h=null;(h=c?$[tt("0x18")][tt("0x19")](y,c[tt("0x1a")]):h)&&(h[tt("0x57")](v),r[s]=v[tt("0x57")](r[s]),o)&&o instanceof Float32Array&&($[tt("0x11")][tt("0x12")](g,v,v),o[i+3*s]=v.x,o[i+3*s+1]=v.y,o[i+3*s+2]=v.z),s++}return r}function S(t){this[tt("0x2")]=t[tt("0x2")],this[tt("0x61")]=t[tt("0x61")],this[tt("0x62")]=t[tt("0x62")],this[tt("0x49")]=t[tt("0x49")]?t[tt("0x49")]:64,this[tt("0x47")]=t[tt("0x47")]}function V(t){this[tt("0x3d")]=t[tt("0x3e")],this[tt("0x3f")]=t[tt("0x40")],this[tt("0x41")]=t[tt("0x42")],this[tt("0x43")]=t[tt("0x44")],this[tt("0x45")]=t[tt("0x2")],this[tt("0x46")]=t[tt("0x47")],this[tt("0x48")]=t[tt("0x49")]?t[tt("0x49")]:8}$.Scene[tt("0x3c")]=function(t,e,i){var n=t[tt("0x30")](e);if(t[tt("0x31")]&&$[tt("0x2d")](n)&&function(t,e){if($[tt("0x2d")](t.id)){var i=t.id;if(i[tt("0x2e")])return;if(e&&i==e)return}if($[tt("0x2d")](t[tt("0x2f")])){i=t[tt("0x2f")];if(i[tt("0x2e")])return;if(e&&i==e)return}return 1}(n,i)){var a=t[tt("0x32")](e);if($[tt("0x2d")](a)){i=$[tt("0x1b")][tt("0x1c")](a)[tt("0x33")];if(0<=i)return a;if(!$[tt("0x2d")](n.id)&&-500<=i)return a}}return a=t[tt("0x34")]===$[tt("0x35")][tt("0x36")]?(n=t[tt("0x37")][tt("0x38")](e),t[tt("0x39")][tt("0x30")](n,t)):t[tt("0x37")][tt("0x3a")](e,t[tt("0x39")][tt("0x3b")])},$[tt("0x11")][tt("0x2c")]=function(t,e){var i=t,e=$[tt("0x11")][tt("0x21")]($[tt("0x22")][tt("0x23")](e,h),t,f);return i=$[tt("0x24")][tt("0x25")](i,$[tt("0xf")][tt("0x10")],new $[tt("0x11")]),i=$[tt("0x11")][tt("0x26")]($[tt("0x11")][tt("0x27")](i,new $[tt("0x11")]),e,new $[tt("0x11")]),e=$[tt("0x11")][tt("0x28")](i,new $[tt("0x22")]),i=$[tt("0x29")][tt("0x2a")](e),$[tt("0x2b")][tt("0x23")](i)},Object[tt("0x1d")]($.Scene,tt("0x1e"),{value:!0}),w=new $[tt("0x9")],new $[tt("0x18")],I=new $[tt("0x1b")],$.Scene[tt("0x1f")]=function(t){var e=t[tt("0x0")],i=t[tt("0x1")],n=e[tt("0x2")];if(i[tt("0x3")]){var a=i[tt("0x3")][tt("0x4")];if(void 0===i[tt("0x5")])i[tt("0x5")]=new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:3,values:new Float32Array(a[tt("0x2")])});else for(var r=i[tt("0x5")][tt("0x4")],o=0;o<n;o++)r[o]=0;for(var s,l,c,h=i[tt("0x5")][tt("0x4")],x=new $[tt("0x9")],d=new $[tt("0x9")],u=new $[tt("0x9")],p=new $[tt("0x9")],g=new $[tt("0x9")],o=0;o<n;o+=3)s=3*e[o+0],l=3*e[o+1],c=3*e[o+2],$[tt("0x9")][tt("0xa")](a,s,x),$[tt("0x9")][tt("0xa")](a,l,d),$[tt("0x9")][tt("0xa")](a,c,u),$[tt("0x9")][tt("0xb")](u,d,p),$[tt("0x9")][tt("0xb")](x,d,g),$[tt("0x9")][tt("0xc")](p,g,p),h[s]+=p.x,h[1+s]+=p.y,h[2+s]+=p.z,h[l]+=p.x,h[1+l]+=p.y,h[2+l]+=p.z,h[c]+=p.x,h[1+c]+=p.y,h[2+c]+=p.z;for(var m,f,v,y,b=t[tt("0x1")][tt("0x5")][tt("0x4")],C=0;C<b[tt("0x2")];C+=3)m=b[C],f=b[C+1],v=b[C+2],y=1/Math[tt("0xe")](m*m+f*f+v*v),b[C]=m*y,b[C+1]=f*y,b[C+2]=v*y;i[tt("0x5")][tt("0xd")]=!0}return t},$.Scene[tt("0x20")]=function(t,e,i,n){n=n||$[tt("0xf")][tt("0x10")],$[tt("0x11")][tt("0x12")](e,t,w),$[tt("0x9")][tt("0xb")](w,i[tt("0x13")],i[tt("0x14")]),$[tt("0x9")][tt("0x15")](i[tt("0x14")],i[tt("0x14")]);e=$[tt("0x16")][tt("0x17")](i,n),t=null;if(t=e?$[tt("0x18")][tt("0x19")](i,e[tt("0x1a")]):t)try{$[tt("0x1b")][tt("0x1c")](t,null,I)}catch(t){return null}return t},Object[tt("0x1d")]($.Scene,tt("0x1e"),{value:!0}),$.Scene[tt("0x4a")]=void 0,P=new $[tt("0x9")],W=new $[tt("0x18")],V[tt("0x4b")]=function(t){for(var e=t[tt("0x3d")],i=t[tt("0x3f")],n=t[tt("0x41")],a=t[tt("0x43")],t=(t[tt("0x46")]?-1:1)*t[tt("0x45")],r=new Float32Array(24),o=[],s=[],l=[0,t],c=[e,n],h=[i,a],x=0,d=0;d<2;d++)r[3*x]=-c[d]/2,r[3*x+1]=-h[d]/2,r[3*x+2]=l[d],s[2*x]=d,s[2*x+1]=0,r[3*++x]=-c[d]/2,r[3*x+1]=h[d]/2,r[3*x+2]=l[d],s[2*x]=d,s[2*x+1]=0,r[3*++x]=c[d]/2,r[3*x+1]=h[d]/2,r[3*x+2]=l[d],s[2*x]=d,s[2*x+1]=0,r[3*++x]=c[d]/2,r[3*x+1]=-h[d]/2,r[3*x+2]=l[d],s[2*x]=d,s[2*x+1]=0,x++;o[tt("0x4c")](0,1,3),o[tt("0x4c")](1,2,3),o[tt("0x4c")](0,4,5),o[tt("0x4c")](0,5,1),o[tt("0x4c")](1,2,6),o[tt("0x4c")](1,6,5),o[tt("0x4c")](2,3,7),o[tt("0x4c")](7,6,2),o[tt("0x4c")](0,3,7),o[tt("0x4c")](7,4,0),o[tt("0x4c")](4,5,6),o[tt("0x4c")](6,7,4);o=new Int16Array(o),s=new Float32Array(s),t={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:r}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:s})},e=$[tt("0x4e")][tt("0x4f")](r),n=new $[tt("0x50")]({attributes:t,indices:o,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:e}),r=[];return o=[],$[tt("0x53")][tt("0x54")](n)},V[tt("0x55")]=function(t,e){if(!e)return V[tt("0x4b")](cylinderGeometry);$[tt("0x11")][tt("0x12")](e,$[tt("0x9")][tt("0x56")],P),P[tt("0x57")](W[tt("0x13")]);var i=t[tt("0x48")],n=(t[tt("0x3d")],t[tt("0x3f")],t[tt("0x41")]),a=t[tt("0x43")],r=(t[tt("0x46")]?-1:1)*t[tt("0x45")],o=[],s=[],l=n/2,c=a/2,h=i,x=i,d=0;(G=[])[tt("0x4c")](0,0,0),s[tt("0x4c")](1,1),d++;for(var u=new $[tt("0x9")],p=[],g=-x;g<x;g++){for(var m=[],f=-h;f<h;f++){var v=c*g/x,y=l*f/h;u.x=y,u.y=v,u.z=r,(0,$.Scene[tt("0x20")])(u,e,W)?(G[tt("0x4c")](y,v,r),s[tt("0x4c")](1,1),m[tt("0x4c")](d),d++):(m[tt("0x4c")](-1),0)}p[tt("0x4c")](m)}for(var b,C,w=[0,p[tt("0x2")]-1],I=0;I<w[tt("0x2")];I++)for(g=w[I],f=1;f<p[g][tt("0x2")];f++)b=p[g][f-1],C=p[g][f],0<=b&&0<=C&&o[tt("0x4c")](0,b,C);for(var _=[0,p[0][tt("0x2")]-1],A=0;A<_[tt("0x2")];A++)for(f=_[A],g=1;g<p[tt("0x2")];g++)b=p[g-1][f],C=p[g][f],0<=b&&0<=C&&o[tt("0x4c")](0,b,C);var G=new Float32Array(G),o=new Int32Array(o),s=new Float32Array(s),t={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:G}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:s})},n=$[tt("0x4e")][tt("0x4f")](G),a=new $[tt("0x50")]({attributes:t,indices:o,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:n});return(0,$.Scene[tt("0x1f")])(a),G=[],o=[],a},V[tt("0x58")]=function(t){for(var e=t[tt("0x3d")],i=t[tt("0x3f")],n=t[tt("0x41")],a=t[tt("0x43")],t=(t[tt("0x46")]?-1:1)*t[tt("0x45")],r=new Float32Array(24),o=[],s=[],l=[0,t],c=[e,n],h=[i,a],x=0,d=0;d<2;d++)r[3*x]=-c[d]/2,r[3*x+1]=-h[d]/2,r[3*x+2]=l[d],s[2*x]=d,s[2*x+1]=0,r[3*++x]=-c[d]/2,r[3*x+1]=h[d]/2,r[3*x+2]=l[d],s[2*x]=d,s[2*x+1]=0,r[3*++x]=c[d]/2,r[3*x+1]=h[d]/2,r[3*x+2]=l[d],s[2*x]=d,s[2*x+1]=0,r[3*++x]=c[d]/2,r[3*x+1]=-h[d]/2,r[3*x+2]=l[d],s[2*x]=d,s[2*x+1]=0,x++;o[tt("0x4c")](0,1,1,2),o[tt("0x4c")](2,3,3,0),o[tt("0x4c")](0,4),o[tt("0x4c")](1,5),o[tt("0x4c")](2,6),o[tt("0x4c")](3,7),o[tt("0x4c")](4,5,5,6),o[tt("0x4c")](6,7,7,4);o=new Int16Array(o),s=new Float32Array(s),t={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:r}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:s})},e=$[tt("0x4e")][tt("0x4f")](r),n=new $[tt("0x50")]({attributes:t,indices:o,primitiveType:$[tt("0x51")][tt("0x59")],boundingSphere:e}),r=[];return o=[],n},V[tt("0x5a")]=function(t){t[tt("0x3d")],t[tt("0x3f")];var e=t[tt("0x41")],i=t[tt("0x43")],n=(t[tt("0x46")]?-1:1)*t[tt("0x45")],r=[],o=[],s=e/2,l=i/2,c=0;(w=[])[tt("0x4c")](0,0,0),o[tt("0x4c")](1,1),c++;for(var h=[],x=-16;x<16;x++){for(var d=[],u=-16;u<16;u++){d[tt("0x4c")](c);var p=l*x/16,g=s*u/16;w[tt("0x4c")](g,p,n),o[tt("0x4c")](1,1),c++}h[tt("0x4c")](d)}for(var m,f,v=[0,h[tt("0x2")]-1],y=0;y<v[tt("0x2")];y++)for(x=v[y],u=1;u<h[x][tt("0x2")];u++)m=h[x][u-1],f=h[x][u],r[tt("0x4c")](0,m,f);for(var b=[0,h[0][tt("0x2")]-1],C=0;C<b[tt("0x2")];C++)for(u=b[C],x=1;x<h[tt("0x2")];x++)m=h[x-1][u],f=h[x][u],r[tt("0x4c")](0,m,f);var w=new Float32Array(w),r=new Int16Array(r),o=new Float32Array(o),t={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:w}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:o})},e=$[tt("0x4e")][tt("0x4f")](w),i=new $[tt("0x50")]({attributes:t,indices:r,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:e});return(0,a[tt("0x1f")])(i),$[tt("0x53")][tt("0x5b")](i),w=[],r=[],i},V[tt("0x5c")]=function(t,e,i,n){var a={length:i,zReverse:n,bottomHeight:i,bottomWidth:i,topHeight:i,topWidth:i};return t=$[tt("0x5d")][tt("0x5e")](t),e=$[tt("0x5d")][tt("0x5e")](e),n?(a[tt("0x40")]=0,a[tt("0x3e")]=0,a[tt("0x44")]=i*Math[tt("0x5f")](t),a[tt("0x42")]=i*Math[tt("0x5f")](e)):(a[tt("0x44")]=0,a[tt("0x42")]=0,a[tt("0x40")]=i*Math[tt("0x5f")](t),a[tt("0x3e")]=i*Math[tt("0x5f")](e)),new V(a)},$.Scene[tt("0x4a")]=V,$[tt("0x60")]||(Object[tt("0x1d")]($.Scene,tt("0x1e"),{value:!0}),$.Scene[tt("0x60")]=void 0,G=new $[tt("0x63")],_=new $[tt("0x9")],A=new $[tt("0x18")],S[tt("0x4b")]=function(t){var e=t[tt("0x2")],i=t[tt("0x61")],n=t[tt("0x62")],a=t[tt("0x49")],r=2*Math.PI/(a-1),o=[],s=[],l=[],c=[],h=[n,i],x=[0,t[tt("0x47")]?-e:e],d=0,t=Math[tt("0x64")](n-i,e),u=G;u.z=Math[tt("0x65")](t);for(var p=Math[tt("0x66")](t),g=0;g<x[tt("0x2")];g++){c[g]=[];for(var m=h[g],f=0;f<a;f++){c[g][tt("0x4c")](d++);var v=r*f,y=m*Math[tt("0x66")](v),b=m*Math[tt("0x65")](v);o[tt("0x4c")](y,b,x[g]),y=p*Math[tt("0x66")](v),b=p*Math[tt("0x65")](v),s[tt("0x4c")](y,b,u.z),l[tt("0x4c")](g/(x[tt("0x2")]-1),0)}}for(var C=[],g=1;g<x[tt("0x2")];g++)for(f=1;f<a;f++){var w=c[g-1][f-1],I=c[g][f-1],_=c[g][f],A=c[g-1][f];C[tt("0x4c")](_),C[tt("0x4c")](A),C[tt("0x4c")](w),C[tt("0x4c")](_),C[tt("0x4c")](w),C[tt("0x4c")](I),f==c[g][tt("0x2")]-1&&(w=c[g-1][f],I=c[g][f],_=c[g][0],A=c[g-1][0],C[tt("0x4c")](_),C[tt("0x4c")](A),C[tt("0x4c")](w),C[tt("0x4c")](_),C[tt("0x4c")](w),C[tt("0x4c")](I))}C=new Int16Array(C),o=new Float32Array(o),s=new Float32Array(s),l=new Float32Array(l),n={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:o}),normal:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:3,values:s}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:l})},i=$[tt("0x4e")][tt("0x4f")](o),e=new $[tt("0x50")]({attributes:n,indices:C,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:i});return o=[],C=[],l=[],e},S[tt("0x55")]=function(t,e){if(!e)return S[tt("0x4b")](t);$[tt("0x11")][tt("0x12")](e,$[tt("0x9")][tt("0x56")],_),_[tt("0x57")](A[tt("0x13")]);var i=t[tt("0x2")],n=t[tt("0x61")],a=(t[tt("0x62")],t[tt("0x49")]),r=2*Math.PI/(a-1),o=[],s=[],l=[],c=[],h=[0,t[tt("0x47")]?-i:i],x=0,x=0;o[tt("0x4c")](0,0,0),s[tt("0x4c")](1,1),x++;for(var d=new $[tt("0x9")],u=n/15,p=0;p<16;p++){for(var g=u*p,m=[],f=0;f<a;f++){var v=r*f,y=g*Math[tt("0x66")](v),v=g*Math[tt("0x65")](v);d.x=y,d.y=v,d.z=h[1],(0,$[tt("0x20")])(d,e,A)?(m[tt("0x4c")](x),o[tt("0x4c")](y,v,h[1]),s[tt("0x4c")](p/15,1),x++):m[tt("0x4c")](-1)}c[tt("0x4c")](m)}for(var b,C,w=[0,c[tt("0x2")]-1],I=0;I<w[tt("0x2")];I++)for(p=w[I],f=1;f<c[p][tt("0x2")];f++)b=c[p][f-1],C=c[p][f],0<=b&&0<=C&&l[tt("0x4c")](0,b,C);o=new Float32Array(o),l=new Int32Array(l),s=new Float32Array(s),t={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:o}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:s})},i=$[tt("0x4e")][tt("0x4f")](o),n=new $[tt("0x50")]({attributes:t,indices:l,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:i});return(0,$.Scene[tt("0x1f")])(n),o=[],l=[],n},S[tt("0x58")]=function(t){var e=t[tt("0x2")],i=t[tt("0x61")],n=t[tt("0x62")],a=t[tt("0x49")],r=2*Math.PI/(a-1),o=[],s=[],l=[],c=[],h=[n,i],x=[0,t[tt("0x47")]?-e:e],d=0,t=Math[tt("0x64")](n-i,e),u=G;u.z=Math[tt("0x65")](t);for(var p=Math[tt("0x66")](t),g=0;g<x[tt("0x2")];g++){c[g]=[];for(var m=h[g],f=0;f<a;f++){c[g][tt("0x4c")](d++);var v=r*f,y=m*Math[tt("0x66")](v),b=m*Math[tt("0x65")](v);o[tt("0x4c")](y,b,x[g]),y=p*Math[tt("0x66")](v),b=p*Math[tt("0x65")](v),s[tt("0x4c")](y,b,u.z),l[tt("0x4c")](g/(x[tt("0x2")]-1),0)}}for(var C=[],g=1;g<x[tt("0x2")];g++)for(f=1;f<a;f+=1){var w=c[g-1][f-1],I=c[g][f-1];c[g][f],c[g-1][f],f%8==1&&C[tt("0x4c")](w,I)}C=new Int16Array(C),o=new Float32Array(o),s=new Float32Array(s),l=new Float32Array(l),n={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:o}),normal:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:3,values:s}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:l})},i=$[tt("0x4e")][tt("0x4f")](o),e=new $[tt("0x50")]({attributes:n,indices:C,primitiveType:$[tt("0x51")][tt("0x59")],boundingSphere:i});return o=[],C=[],l=[],e},S[tt("0x67")]=function(t,e,i){return t=$[tt("0x5d")][tt("0x5e")](t),new S({topRadius:Math[tt("0x5f")](t)*e/2,bottomRadius:0,length:e,zReverse:i})},$.Scene[tt("0x60")]=S),typeof X===tt("0x68")||$[tt("0x69")]||($.Scene[tt("0x69")]=void 0,g=new $[tt("0x11")],m=new $[tt("0x9")],v=new $[tt("0x9")],y=new $[tt("0x18")],b=new $[tt("0x1b")],M[tt("0x6e")]={Cone:1,FourPrism:2},Object[tt("0xa3")](M[tt("0xa4")],{color:{get:function(){return this[tt("0x81")]},set:function(t){this[tt("0x81")]=t}},lineColor:{get:function(){return this[tt("0x85")]},set:function(t){this[tt("0x85")]=t}},trackedEntity:{get:function(){return this[tt("0x97")]},set:function(t){t!=this[tt("0x97")]&&(this[tt("0x3")]=t[tt("0x3")]),this[tt("0x97")]=t}},show:{get:function(){return this[tt("0x78")]},set:function(t){this[tt("0x78")]=t}},outline:{get:function(){return this[tt("0x7b")]},set:function(t){this[tt("0x7b")]=t}},angle1:{get:function(){return this[tt("0x70")]},set:function(t){this[tt("0x70")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},angle2:{get:function(){return this[tt("0x72")]},set:function(t){this[tt("0x72")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},areaType:{get:function(){return this[tt("0x6c")]},set:function(t){this[tt("0x6c")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},rotation:{get:function(){return this[tt("0x76")]},set:function(t){this[tt("0x76")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},heading:{get:function(){return this[tt("0x76")][tt("0xa6")]},set:function(t){this[tt("0x76")][tt("0xa6")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},pitch:{get:function(){return this[tt("0x76")][tt("0xa7")]},set:function(t){this[tt("0x76")][tt("0xa7")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},roll:{get:function(){return this[tt("0x76")][tt("0xa8")]},set:function(t){this[tt("0x76")][tt("0xa8")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},position:{get:function(){return this[tt("0x74")]},set:function(t){this[tt("0x74")]=t,this[tt("0x6b")]=null,this[tt("0x94")]=[]}}}),M[tt("0xa4")][tt("0x9f")]=function(t){var e,i;t&&!this[tt("0xa9")]&&(e=this,i=new $[tt("0xaa")],this[tt("0xa9")]=this[tt("0x9c")][tt("0xab")][tt("0x9e")]({polygon:{show:this[tt("0x7d")],material:this[tt("0x87")]||this[tt("0x81")],hierarchy:new $[tt("0xac")](function(t){return i[tt("0xad")]=e[tt("0x96")],i},!1)},polyline:{show:this[tt("0x7f")],material:this[tt("0x89")]||this[tt("0x87")]||this[tt("0x81")],width:1.5,positions:new $[tt("0xac")](function(t){return e[tt("0x96")]},!1)}}))},M[tt("0xa4")][tt("0xa5")]=function(){this[tt("0x94")][tt("0xae")](function(t){t[tt("0xaf")][tt("0xb0")]()}),this[tt("0x94")]=[]},M[tt("0xa4")][tt("0xb1")]=function(t,e){if(!t||!t[tt("0x2")])throw new Error(tt("0xb2"));for(var i=[],n=!1,a=!1,r=t[0][tt("0xb3")],o=0;o<t[tt("0x2")];o++){if(i[o]=function(t){var e,i=[];for(e in t[tt("0x1")])t[tt("0x1")][tt("0xa0")](e)&&t[tt("0x1")][e]&&i[tt("0x4c")](e);return i}(t[o]),0<o){if(r!=t[o][tt("0xb3")]){a=!0;break}var s=i[o-1];if(!(n=s[tt("0x2")]!=i[o][tt("0x2")]))for(var l=0;l<s[tt("0x2")];l++)if(s[l]!=i[o][l]){n=!0;break}}if(r=t[o][tt("0xb3")],n||a)break}if(a)throw new Error(tt("0xb4"));if(n)throw new Error(tt("0xb5"));for(var c={},h=i[0],o=0;o<h[tt("0x2")];o++){var x,d=h[o],u=t[0];for(x in c[d]={},u[tt("0x1")][d])u[tt("0x1")][d][tt("0xa0")](x)&&(c[d][x]=u[tt("0x1")][d][x]);for(var p=Array[tt("0xb6")](c[d][tt("0x4")]),l=1;l<t[tt("0x2")];l++)for(var u=t[l],g=0;g<u[tt("0x1")][d][tt("0x4")][tt("0x2")];g++)p[tt("0x4c")](u[tt("0x1")][d][tt("0x4")][g]);c[d][tt("0x4")]=new c[d][tt("0x4")][tt("0xb7")](p)}var m=[],f=0;for(l=0;l<t[tt("0x2")];l++){for(u=t[0],o=0;o<u[tt("0x0")][tt("0x2")];o++)m[tt("0x4c")](u[tt("0x0")][o]+f);f+=u[tt("0x1")][tt("0x3")][tt("0x4")][tt("0x2")]/3}var v=$[tt("0x4e")][tt("0x4f")](c[tt("0x3")][tt("0x4")]);return new $[tt("0x50")]({attributes:c,indices:new Int32Array(m),primitiveType:t[0][tt("0xb3")],boundingSphere:v})},M[tt("0xa4")][tt("0xb8")]=function(t){if(this[tt("0x9b")][tt("0xb9")]){var e=this[tt("0x9b")][tt("0xb9")][tt("0x2")]!=this[tt("0x95")][tt("0x2")];if(!e)for(var i=0;i<this[tt("0x9b")][tt("0xb9")][tt("0x2")];i++)if(!this[tt("0x9b")][tt("0xb9")][i][tt("0xba")](this[tt("0x95")][i])){e=!0;break}if(!e)return}if(this[tt("0x9b")][tt("0xb9")]&&this[tt("0x9b")][tt("0xb9")][tt("0x2")]==this[tt("0x95")][tt("0x2")])for(i=0;i<this[tt("0x95")][tt("0x2")];i++)this[tt("0x95")][i][tt("0x57")](this[tt("0x9b")][tt("0xb9")][i]);else for(this[tt("0x9b")][tt("0xb9")]=[],i=0;i<this[tt("0x95")][tt("0x2")];i++)this[tt("0x9b")][tt("0xb9")][tt("0x4c")](this[tt("0x95")][i][tt("0x57")]());t=this[tt("0xbb")](t);if(this[tt("0x9a")][tt("0x4c")](t),this[tt("0x9b")][tt("0xbc")]){var n=this[tt("0x9b")][tt("0xbc")][tt("0x1")];for(i in n)n[tt("0xa0")](i)&&delete n[i];for(i in this[tt("0x9b")][tt("0xbc")])this[tt("0x9b")][tt("0xbc")][tt("0xa0")](i)&&delete this[tt("0x9b")][tt("0xbc")][i]}this[tt("0x9b")][tt("0xbc")]=this[tt("0xb1")](this[tt("0x9a")]),this[tt("0x9b")][tt("0xd")]=!0},C=new $[tt("0x29")],M[tt("0xa4")][tt("0xbd")]=function(t,e){return this[tt("0x93")]||(this[tt("0x93")]=new $[tt("0x9")]),this[tt("0x3")]instanceof $[tt("0x9")]?this[tt("0x93")]=this[tt("0x3")]:tt("0xbe")==typeof this[tt("0x3")][tt("0xbf")]?this[tt("0x93")]=this[tt("0x3")][tt("0xbf")](t):this[tt("0x3")][tt("0xc0")]&&this[tt("0x3")][tt("0xc0")]instanceof $[tt("0x9")]&&(this[tt("0x93")]=this[tt("0x3")][tt("0xc0")]),this[tt("0x93")]&&(this[tt("0x8b")]=$[tt("0x24")][tt("0x25")](this[tt("0x93")],x,this[tt("0x8b")]),this[tt("0x92")]=$[tt("0x1b")][tt("0x1c")](this[tt("0x93")],x,this[tt("0x92")]),$[tt("0x24")][tt("0x25")](this[tt("0x93")],x,this[tt("0x8b")]),this[tt("0x75")]&&this[tt("0x97")]&&this[tt("0x97")][tt("0xc1")]&&(t=$[tt("0xc2")][tt("0xc3")](this[tt("0x97")][tt("0xc1")],t,C),t=$[tt("0x11")][tt("0x2c")](this[tt("0x93")],t),this[tt("0x76")][tt("0xa6")]=t[tt("0xa6")]),$[tt("0x29")][tt("0xc4")](this[tt("0x76")],this[tt("0x8d")]),this[tt("0x90")]=$[tt("0x11")][tt("0xc5")](this[tt("0x8e")],this[tt("0x8d")],this[tt("0x8f")],this[tt("0x90")]),$[tt("0x11")][tt("0xc6")](this[tt("0x8b")],this[tt("0x90")],this[tt("0x90")]),$[tt("0x11")][tt("0xc7")](this[tt("0x90")],this[tt("0x91")])),this[tt("0x90")]},M[tt("0xa4")][tt("0xc8")]=function(t,e){var i=this[tt("0x95")];if(e){if(this[tt("0xbd")](e),!this[tt("0x93")])return;i=Z(this[tt("0xc9")],this[tt("0x90")],3,this[tt("0xc9")][tt("0x2")]-3,x,null,this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")])}for(var n=[],a=0;a<i[tt("0x2")];a++){var r=i[a],r=($[tt("0x1b")][tt("0x1c")](r,void 0,b),[$[tt("0x5d")][tt("0xca")](b[tt("0xcb")]),$[tt("0x5d")][tt("0xca")](b[tt("0xcc")])]);t&&(r[0]=parseFloat(r[0][tt("0xcd")](t)),r[1]=parseFloat(r[1][tt("0xcd")](t))),n[tt("0x4c")](X[tt("0xce")](r))}var o,e=[];return e=0<n[tt("0x2")]&&(n=X[tt("0xcf")](n),o=X[tt("0xd0")](n))&&(o=X[tt("0xd1")](o))&&0<o[tt("0x2")]?o[0]:e},M[tt("0xa4")][tt("0xbb")]=function(t){for(var e=[],i=[],n=0,a=0;a<this[tt("0x95")][tt("0x2")];a+=2){var r=this[tt("0x95")][0];e[tt("0x4c")](r.x,r.y,r.z),i[tt("0x4c")](n++)}return e=new Float32Array(e),i=new Int32Array(i),new $[tt("0x50")]({attributes:{position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:e})},primitiveType:$[tt("0x51")][tt("0x59")],indices:i,boundingSphere:$[tt("0x4e")][tt("0x4f")](e)})},M[tt("0xa4")][tt("0xd2")]=function(){this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0xd2")](this),this[tt("0xa9")]&&this[tt("0x9c")][tt("0xab")][tt("0xd2")](this[tt("0xa9")])},M[tt("0xa4")][tt("0xb0")]=function(t){if(t){for(var e in this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0xd2")](this),this[tt("0xa9")]&&this[tt("0x9c")][tt("0xab")][tt("0xd2")](this[tt("0xa9")]),this[tt("0x94")][tt("0xae")](function(t){t[tt("0xaf")]=t[tt("0xaf")]&&t[tt("0xaf")][tt("0xb0")]()}),this[tt("0x94")]=[],this[tt("0xd3")][tt("0x1")])this[tt("0xd3")][tt("0x1")][tt("0xa0")](e)&&delete this[tt("0xd3")][tt("0x1")][e];for(var e in this[tt("0x6b")][tt("0x1")])this[tt("0x6b")][tt("0x1")][tt("0xa0")](e)&&delete this[tt("0x6b")][tt("0x1")][e];delete this[tt("0xd3")],delete this[tt("0x6b")],delete this[tt("0x93")],delete this[tt("0x74")],this[tt("0x95")]=[]}},M[tt("0xa4")][tt("0xd4")]=function(){this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0x9e")](this),this[tt("0xa9")]&&this[tt("0x9c")][tt("0xab")][tt("0x9e")](this[tt("0xa9")])},M[tt("0xa4")][tt("0xd5")]=function(){this[tt("0x6c")]==M[tt("0x6e")][tt("0xd6")]?(this[tt("0x6b")]=$[tt("0xd7")][tt("0x55")]($[tt("0xd7")][tt("0x67")](this[tt("0x70")],this[tt("0x45")],!0),this[tt("0x90")]),this[tt("0xd3")]=$[tt("0xd7")][tt("0x58")]($[tt("0xd7")][tt("0x67")](this[tt("0x70")],this[tt("0x45")],!0))):(this[tt("0x6b")]=$.Scene[tt("0x4a")][tt("0x55")]($.Scene[tt("0x4a")][tt("0x5c")](this[tt("0x70")],this[tt("0x72")],this[tt("0x45")],!0),this[tt("0x90")]),this[tt("0xd3")]=$.Scene[tt("0x4a")][tt("0x58")]($.Scene[tt("0x4a")][tt("0x5c")](this[tt("0x70")],this[tt("0x72")],this[tt("0x45")],!0))),this[tt("0xc9")]=new Float32Array(this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")][tt("0x2")]);for(var t=0;t<this[tt("0xc9")][tt("0x2")];t++)this[tt("0xc9")][t]=this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")][t];this[tt("0x95")]=[]},M[tt("0xa4")][tt("0xd8")]=function(){var t=1+this[tt("0x96")][tt("0x2")],e=new Float32Array(3+3*this[tt("0x96")][tt("0x2")]),i=0;e[i++]=this[tt("0x93")].x,e[i++]=this[tt("0x93")].y,e[i++]=this[tt("0x93")].z;for(var n=0;n<this[tt("0x96")][tt("0x2")];n++)e[i++]=this[tt("0x96")][n].x,e[i++]=this[tt("0x96")][n].y,e[i++]=this[tt("0x96")][n].z;for(var a=[],r=[],n=1;n<t-1;n++)a[tt("0x4c")](0,n,n+1),r[tt("0x4c")](0,n);var a=new(65535<=t?Uint32Array:Uint16Array)(a),o={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:e})},s=$[tt("0x4e")][tt("0x4f")](e),l=new $[tt("0x50")]({attributes:o,indices:a,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:s}),o=new $[tt("0x50")]({attributes:o,indices:new Uint32Array(r),primitiveType:$[tt("0x51")][tt("0x59")],boundingSphere:s});(0,$.Scene[tt("0x1f")])(l),this[tt("0xd9")]=l,this[tt("0xda")]=o},M[tt("0xa4")][tt("0xdb")]=function(t){if(this[tt("0x78")]&&(this[tt("0xbd")](t[tt("0xdc")]),this[tt("0x93")])){this[tt("0x6b")]||this[tt("0xd5")](),this[tt("0x95")]=Z(this[tt("0xc9")],this[tt("0x90")],3,this[tt("0xc9")][tt("0x2")]-3,x,this[tt("0x95")],this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")]),this[tt("0x96")][tt("0xdd")](0,this[tt("0x96")][tt("0x2")]);var e=this[tt("0xc8")]();if(e&&e[tt("0x2")]){for(var i=0;i<e[tt("0x2")];i++){var n=e[i];this[tt("0x96")][tt("0x4c")]($[tt("0x9")][tt("0xde")](n[0],n[1]))}t[tt("0x34")]===$[tt("0x35")][tt("0x36")]?(this[tt("0xd8")](),this[tt("0xd9")]&&(this[tt("0xdf")]&&(this[tt("0xdf")][tt("0xaf")]=this[tt("0xdf")][tt("0xaf")]&&this[tt("0xdf")][tt("0xaf")][tt("0xb0")](),this[tt("0xdf")]=null),this[tt("0xdf")]=this[tt("0xe0")](this[tt("0xd9")],t,$[tt("0x11")][tt("0x8c")][tt("0x57")]()),t[tt("0xe1")][tt("0x4c")](this[tt("0xdf")]),this[tt("0x7b")])&&(this[tt("0xe2")]&&(this[tt("0xe2")][tt("0xaf")]=this[tt("0xe2")][tt("0xaf")]&&this[tt("0xe2")][tt("0xaf")][tt("0xb0")](),this[tt("0xe2")]=null),this[tt("0xe2")]=this[tt("0xe0")](this[tt("0xda")],t,$[tt("0x11")][tt("0x8c")][tt("0x57")]()),t[tt("0xe1")][tt("0x4c")](this[tt("0xe2")])),this[tt("0xa9")]&&(this[tt("0xa9")][tt("0xe3")][tt("0x7a")]=this[tt("0x7d")]&&this[tt("0x78")],this[tt("0xa9")][tt("0xe4")][tt("0x7a")]=this[tt("0x7f")]&&this[tt("0x78")])):(this[tt("0xa9")]||this[tt("0x9f")](!0),this[tt("0xa9")][tt("0xe3")][tt("0x7a")]=!0)}else this[tt("0x7b")]&&(this[tt("0xd3")][tt("0xe5")]||(this[tt("0xd3")][tt("0xe5")]=this[tt("0xe0")](this[tt("0xd3")],t)),t[tt("0xe1")][tt("0x4c")](this[tt("0xd3")][tt("0xe5")])),this[tt("0xa9")]&&(this[tt("0xa9")][tt("0xe3")][tt("0x7a")]=!1,this[tt("0xa9")][tt("0xe4")][tt("0x7a")]=!1)}},M[tt("0xa4")][tt("0xe6")]=function(t){return tt("0xe7")},M[tt("0xa4")][tt("0xe8")]=function(t){return tt("0xe9")},M[tt("0xa4")][tt("0xe0")]=function(t,e,i){var n=e[tt("0xea")],a=new $[tt("0x9")],a=($[tt("0x11")][tt("0x12")](this[tt("0x90")],t[tt("0xeb")][tt("0xec")],a),new $[tt("0x4e")](a,t[tt("0xeb")][tt("0xed")]),new $[tt("0xee")]({modelMatrix:i||this[tt("0x90")],owner:this,primitiveType:t[tt("0xb3")],pass:$[tt("0xef")][tt("0xf0")]})),r=this,i=$[tt("0x53")][tt("0xf1")](t);return a[tt("0xaf")]=$[tt("0xf2")][tt("0xf3")]({context:n,geometry:t,attributeLocations:i,bufferUsage:$[tt("0xf4")][tt("0xf5")]}),a[tt("0xaf")][tt("0xf6")]=i,a[tt("0xf7")]=$[tt("0xf8")][tt("0xf9")]({context:n,vertexShaderSource:this[tt("0xe8")](t),fragmentShaderSource:this[tt("0xe6")](t),attributeLocations:i}),a[tt("0xfa")]=$[tt("0xfb")][tt("0xfc")]({blending:$[tt("0xfd")][tt("0xfe")],depthTest:{enabled:!0,func:$[tt("0xff")][tt("0x100")]},cull:{enabled:!1,face:$[tt("0x101")][tt("0x102")]},depthMask:!1}),a[tt("0x103")]={},a[tt("0x103")][tt("0x104")]=function(){return e[tt("0xea")][tt("0x105")][tt("0x106")]},a[tt("0x103")][tt("0x107")]=function(){return e[tt("0xea")][tt("0x105")][tt("0x108")]},a[tt("0x103")][tt("0x109")]=function(){return r[tt("0x109")]||(r[tt("0x109")]=0),r[tt("0x109")]},a[tt("0x103")][tt("0x10a")]=function(){return r[tt("0x10a")]||(r[tt("0x10a")]=new $[tt("0x9")](.2,.2,.2)),r[tt("0x10a")]},a[tt("0x103")][tt("0x10b")]=function(){return r[tt("0x10b")]||(r[tt("0x10b")]=0),r[tt("0x10b")]},a[tt("0x103")][tt("0x10c")]=function(){return t[tt("0xb3")]==$[tt("0x51")][tt("0x59")]},a[tt("0x103")][tt("0x81")]=function(){return t[tt("0x82")]?t[tt("0x82")]:t[tt("0xb3")]==$[tt("0x51")][tt("0x59")]?r[tt("0x85")]||r[tt("0x81")]||new $[tt("0x83")](1,1,0,.5):r[tt("0x81")]||new $[tt("0x83")](1,0,0,1)},a[tt("0x103")][tt("0x10d")]=function(){return r[tt("0x10d")]||(r[tt("0x10d")]=0),r[tt("0x10d")]},a[tt("0x103")][tt("0x10e")]=function(){return r[tt("0x10e")]||(r[tt("0x10e")]=new $[tt("0x83")](1,1,0,1)),r[tt("0x10e")]},a[tt("0x103")][tt("0x10f")]=function(){return e[tt("0xea")][tt("0x105")][tt("0x5")]},a[tt("0x103")][tt("0x110")]=function(){return.25},a},$.Scene[tt("0x111")]=Z,$.Scene[tt("0x69")]=M),$[tt("0x112")]||($.Scene[tt("0x112")]=void 0,Object[tt("0xa3")](i[tt("0xa4")],{trackedEntity:{get:function(){return this[tt("0x97")]},set:function(t){this[tt("0x97")]=t}},color:{get:function(){return this[tt("0x81")]},set:function(t){this[tt("0x81")]=t}},lineColor:{get:function(){return this[tt("0x85")]},set:function(t){this[tt("0x85")]=t}},show:{get:function(){return this[tt("0x78")]},set:function(t){this[tt("0x78")]=t}},outline:{get:function(){return this[tt("0x7b")]},set:function(t){this[tt("0x7b")]=t,this[tt("0xd5")]()}},top:{get:function(){return this[tt("0x116")]},set:function(t){this[tt("0x116")]=t,this[tt("0xd5")]()}},topOutline:{get:function(){return this[tt("0x118")]},set:function(t){this[tt("0x118")]=t,this[tt("0xd5")]()}},groundArea:{get:function(){return this[tt("0x7d")]},set:function(t){this[tt("0x7d")]=t,this[tt("0x9f")](this[tt("0x7d")])}},angle:{get:function(){return this[tt("0x113")]},set:function(t){this[tt("0x113")]=t,this[tt("0x11a")](),this[tt("0xd5")]()}},radius:{get:function(){return this[tt("0x115")]},set:function(t){this[tt("0x115")]=t,this[tt("0x11a")](),this[tt("0xd5")]()}},heading:{get:function(){return this[tt("0x76")][tt("0xa6")]},set:function(t){this[tt("0x76")][tt("0xa6")]=t}},pitch:{get:function(){return this[tt("0x76")][tt("0xa7")]},set:function(t){this[tt("0x76")][tt("0xa7")]=t}},roll:{get:function(){return this[tt("0x76")][tt("0xa8")]},set:function(t){this[tt("0x76")][tt("0xa8")]=t}},position:{get:function(){return this[tt("0x74")]},set:function(t){this[tt("0x74")]=t}}}),i[tt("0xa4")][tt("0x11a")]=function(){this[tt("0x11b")]=this[tt("0x115")]*Math[tt("0x66")]($[tt("0x5d")][tt("0x5e")](this[tt("0x113")]))},i[tt("0xa4")][tt("0x9f")]=function(t){var e;t&&!this[tt("0xa9")]&&((e=this)[tt("0x11a")](),this[tt("0xa9")]=viewer[tt("0xab")][tt("0x9e")]({position:this[tt("0x74")],ellipse:{show:0===this[tt("0x76")][tt("0xa7")]&&0===this[tt("0x76")][tt("0xa8")],semiMinorAxis:new $[tt("0xac")](function(t){return e[tt("0x11b")]},!1),semiMajorAxis:new $[tt("0xac")](function(t){return e[tt("0x11b")]},!1),material:this[tt("0x81")]},polyline:{show:this[tt("0x11c")]&&(0!==this[tt("0x76")][tt("0xa7")]||0!==this[tt("0x76")][tt("0xa8")]),positions:new $[tt("0xac")](function(t){return!e[tt("0x11c")]||$[tt("0x9")][tt("0x11d")](e[tt("0x74")],e[tt("0x11c")])>e[tt("0x115")]?[]:[e[tt("0x74")],e[tt("0x11c")]]},!1),followSurface:!1,material:new $[tt("0x11e")]({color:$[tt("0x83")][tt("0x11f")]}),width:1}}))},c=new $[tt("0x9")],i[tt("0xa4")][tt("0xbd")]=function(t,e){var i;return this[tt("0x93")]||(this[tt("0x93")]=new $[tt("0x9")]),this[tt("0x3")]instanceof $[tt("0x9")]?this[tt("0x93")]=this[tt("0x3")]:tt("0xbe")==typeof this[tt("0x3")][tt("0xbf")]?this[tt("0x93")]=this[tt("0x3")][tt("0xbf")](t):this[tt("0x3")][tt("0xc0")]&&this[tt("0x3")][tt("0xc0")]instanceof $[tt("0x9")]&&(this[tt("0x93")]=this[tt("0x3")][tt("0xc0")]),this[tt("0x97")]&&this[tt("0x97")][tt("0x3")]&&(i=this[tt("0x93")],t=$[tt("0xc2")][tt("0xc3")](this[tt("0x97")][tt("0x3")],t,c))&&(this[tt("0x11c")]=t,i=mars3d[tt("0x120")][tt("0x121")](i,t,n),this[tt("0x76")][tt("0xa6")]=i[tt("0xa6")],this[tt("0x76")][tt("0xa7")]=i[tt("0xa7")],this[tt("0x76")][tt("0xa8")]=i[tt("0xa8")]),this[tt("0x8b")]=$[tt("0x24")][tt("0x25")](this[tt("0x93")],n,this[tt("0x8b")]),this[tt("0x92")]=$[tt("0x1b")][tt("0x1c")](this[tt("0x93")],n,this[tt("0x92")]),$[tt("0x24")][tt("0x25")](this[tt("0x93")],n,this[tt("0x8b")]),$[tt("0x29")][tt("0xc4")](this[tt("0x76")],this[tt("0x8d")]),this[tt("0x90")]=$[tt("0x11")][tt("0xc5")](this[tt("0x8e")],this[tt("0x8d")],this[tt("0x8f")],this[tt("0x90")]),$[tt("0x11")][tt("0xc6")](this[tt("0x8b")],this[tt("0x90")],this[tt("0x90")]),$[tt("0x11")][tt("0xc7")](this[tt("0x90")],this[tt("0x91")]),this[tt("0x90")]},i[tt("0xa4")][tt("0x122")]=function(){for(var t=this[tt("0xed")],e=[],i=[],n=[],a=[],r=90-parseInt(this[tt("0x114")]),o=r<1?r/8:1,s=2*Math.PI/127,l=0,c=this[tt("0x114")];c<91;c+=o){for(var h=$[tt("0x5d")][tt("0x5e")](c<90?c:90),h=Math[tt("0x66")](h)*t,x=[],d=0;d<128;d++){var u=s*d,p=h*Math[tt("0x66")](u),u=h*Math[tt("0x65")](u),g=Math[tt("0xe")](t*t-p*p-u*u);e[tt("0x4c")](p,u,g),i[tt("0x4c")](1,1),x[tt("0x4c")](l++)}a[tt("0x4c")](x)}for(c=1;c<a[tt("0x2")];c++)for(d=1;d<a[c][tt("0x2")];d++){var m=a[c-1][d-1],f=a[c][d-1],v=a[c][d],y=a[c-1][d];n[tt("0x4c")](m,f,v),n[tt("0x4c")](m,v,y)}var e=new Float32Array(e),n=new Int32Array(n),i=new Float32Array(i),r={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:e}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:i})},b=$[tt("0x4e")][tt("0x4f")](e),r=new $[tt("0x50")]({attributes:r,indices:n,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:b});return(0,$.Scene[tt("0x1f")])(r),r},i[tt("0xa4")][tt("0x123")]=function(){for(var t=this[tt("0xed")],e=[],i=[],n=[],a=[],r=90-parseInt(this[tt("0x114")]),o=r<1?r/8:1,s=2*Math.PI/127,l=0,c=this[tt("0x114")];c<91;c+=o){for(var h=$[tt("0x5d")][tt("0x5e")](c<90?c:90),h=Math[tt("0x66")](h)*t,x=[],d=0;d<128;d++){var u=s*d,p=h*Math[tt("0x66")](u),u=h*Math[tt("0x65")](u),g=Math[tt("0xe")](t*t-p*p-u*u);e[tt("0x4c")](p,u,g),i[tt("0x4c")](1,1),x[tt("0x4c")](l++)}a[tt("0x4c")](x)}for(c=1;c<a[tt("0x2")];c++)for(d=1;d<a[c][tt("0x2")];d++){var m=a[c-1][d-1],f=a[c][d-1],v=a[c][d];a[c-1][d],d%8==1&&n[tt("0x4c")](m,f),c%8==1&&n[tt("0x4c")](f,v)}var e=new Float32Array(e),n=new Int32Array(n),i=new Float32Array(i),r={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:e}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:i})},y=$[tt("0x4e")][tt("0x4f")](e),r=new $[tt("0x50")]({attributes:r,indices:n,primitiveType:$[tt("0x51")][tt("0x59")],boundingSphere:y});return(0,$.Scene[tt("0x1f")])(r),r},i[tt("0xa4")][tt("0xd5")]=function(){this[tt("0x6b")]=$.Scene[tt("0x60")][tt("0x55")](new $.Scene[tt("0x60")]({topRadius:this[tt("0x115")]*Math[tt("0x66")]($[tt("0x5d")][tt("0x5e")](this[tt("0x114")])),bottomRadius:0,length:this[tt("0x115")]*Math[tt("0x65")]($[tt("0x5d")][tt("0x5e")](this[tt("0x114")]))})),this[tt("0x124")]=this[tt("0x122")](),this[tt("0x125")]=this[tt("0x123")](),this[tt("0xd3")]=$.Scene[tt("0x60")][tt("0x58")](new $.Scene[tt("0x60")]({topRadius:this[tt("0x115")]*Math[tt("0x66")]($[tt("0x5d")][tt("0x5e")](this[tt("0x114")])),bottomRadius:0,slices:128,length:this[tt("0x115")]*Math[tt("0x65")]($[tt("0x5d")][tt("0x5e")](this[tt("0x114")]))})),this[tt("0xc9")]=new Float32Array(this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")][tt("0x2")]);for(var t=0;t<this[tt("0xc9")][tt("0x2")];t++)this[tt("0xc9")][t]=this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")][t];this[tt("0x94")]&&this[tt("0x94")][tt("0x2")]&&(this[tt("0x94")][tt("0xae")](function(t){t[tt("0xaf")]=t[tt("0xaf")]&&t[tt("0xaf")][tt("0xb0")]()}),this[tt("0x94")][tt("0xdd")](0,this[tt("0x94")][tt("0x2")]))},i[tt("0xa4")][tt("0xdb")]=function(e){this[tt("0x78")]&&(this[tt("0xbd")](e[tt("0xdc")]),e[tt("0x34")]===$[tt("0x35")][tt("0x36")]?(this[tt("0x6b")][tt("0xeb")]=$[tt("0x4e")][tt("0x4f")](this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")]),this[tt("0x94")]&&this[tt("0x94")][tt("0x2")]||(this[tt("0x94")][tt("0x4c")](this[tt("0xe0")](this[tt("0x6b")],e)),this[tt("0x7b")]&&this[tt("0x94")][tt("0x4c")](this[tt("0xe0")](this[tt("0xd3")],e)),this[tt("0x116")]&&(this[tt("0x94")][tt("0x4c")](this[tt("0xe0")](this[tt("0x124")],e)),this[tt("0x118")])&&this[tt("0x94")][tt("0x4c")](this[tt("0xe0")](this[tt("0x125")],e))),this[tt("0x94")][tt("0xae")](function(t){e[tt("0xe1")][tt("0x4c")](t)}),this[tt("0xa9")]&&(this[tt("0xa9")][tt("0x126")][tt("0x7a")]=this[tt("0x7d")]&&0===this[tt("0x76")][tt("0xa7")]&&0===this[tt("0x76")][tt("0xa8")],this[tt("0xa9")][tt("0xe4")][tt("0x7a")]=!1)):(this[tt("0xa9")]||this[tt("0x9f")](!0),this[tt("0xa9")][tt("0x126")][tt("0x7a")]=0===this[tt("0x76")][tt("0xa7")]&&0===this[tt("0x76")][tt("0xa8")],this[tt("0xa9")][tt("0xe4")][tt("0x7a")]=this[tt("0x11c")]&&(0!==this[tt("0x76")][tt("0xa7")]||0!==this[tt("0x76")][tt("0xa8")])))},i[tt("0xa4")][tt("0xe6")]=function(t){return tt("0x127")},i[tt("0xa4")][tt("0xe8")]=function(t){return tt("0x128")},i[tt("0xa4")][tt("0xe0")]=function(t,e,i){var n=e[tt("0xea")],a=new $[tt("0x9")],a=($[tt("0x11")][tt("0x12")](this[tt("0x90")],t[tt("0xeb")][tt("0xec")],a),new $[tt("0x4e")](a,t[tt("0xeb")][tt("0xed")])),i=new $[tt("0xee")]({modelMatrix:i||this[tt("0x90")],owner:this,primitiveType:t[tt("0xb3")],pass:$[tt("0xef")][tt("0x129")],boundingVolume:a}),r=this,a=$[tt("0x53")][tt("0xf1")](t);return i[tt("0xaf")]=$[tt("0xf2")][tt("0xf3")]({context:n,geometry:t,attributeLocations:a,bufferUsage:$[tt("0xf4")][tt("0xf5")]}),i[tt("0xaf")][tt("0xf6")]=a,i[tt("0xf7")]=$[tt("0xf8")][tt("0xf9")]({context:n,vertexShaderSource:this[tt("0xe8")](t),fragmentShaderSource:this[tt("0xe6")](t),attributeLocations:a}),i[tt("0xfa")]=$[tt("0xfb")][tt("0xfc")]({blending:$[tt("0xfd")][tt("0xfe")],depthTest:{enabled:!0,func:$[tt("0xff")][tt("0x100")]},cull:{enabled:!1,face:$[tt("0x101")][tt("0x102")]}}),i[tt("0x103")]={},i[tt("0x103")][tt("0x104")]=function(){return e[tt("0xea")][tt("0x105")][tt("0x106")]},i[tt("0x103")][tt("0x107")]=function(){return e[tt("0xea")][tt("0x105")][tt("0x108")]},i[tt("0x103")][tt("0x109")]=function(){return r[tt("0x109")]||(r[tt("0x109")]=0),r[tt("0x109")]},i[tt("0x103")][tt("0x10a")]=function(){return r[tt("0x10a")]||(r[tt("0x10a")]=new $[tt("0x9")](.2,.2,.2)),r[tt("0x10a")]},i[tt("0x103")][tt("0x10b")]=function(){return r[tt("0x10b")]||(r[tt("0x10b")]=0),r[tt("0x10b")]},i[tt("0x103")][tt("0x10c")]=function(){return t[tt("0xb3")]==$[tt("0x51")][tt("0x59")]||t[tt("0xb3")]==$[tt("0x51")][tt("0x12a")]},i[tt("0x103")][tt("0x81")]=function(){return t[tt("0xb3")]==$[tt("0x51")][tt("0x59")]||t[tt("0xb3")]==$[tt("0x51")][tt("0x12a")]?(r[tt("0x85")]||(r[tt("0x85")]=new $[tt("0x83")](1,1,0,1)),r[tt("0x85")]):(r[tt("0x81")]||(r[tt("0x81")]=new $[tt("0x83")](1,0,0,1)),r[tt("0x81")])},i[tt("0x103")][tt("0x10d")]=function(){return r[tt("0x10d")]||(r[tt("0x10d")]=0),r[tt("0x10d")]},i[tt("0x103")][tt("0x10e")]=function(){return r[tt("0x10e")]||(r[tt("0x10e")]=new $[tt("0x83")](1,1,0,1)),r[tt("0x10e")]},i[tt("0x103")][tt("0x10f")]=function(){return e[tt("0xea")][tt("0x105")][tt("0x5")]},i[tt("0x103")][tt("0x110")]=function(){return.25},i},i[tt("0xa4")][tt("0xd2")]=function(){this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0xd2")](this),this[tt("0xa9")]&&this[tt("0x9c")][tt("0xab")][tt("0xd2")](this[tt("0xa9")])},i[tt("0xa4")][tt("0xd4")]=function(){this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0x9e")](this),this[tt("0xa9")]&&this[tt("0x9c")][tt("0xab")][tt("0x9e")](this[tt("0xa9")])},i[tt("0xa4")][tt("0xb0")]=function(t){t&&(this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0xd2")](this),this[tt("0xa9")]&&this[tt("0x9c")][tt("0xab")][tt("0xd2")](this[tt("0xa9")]),this[tt("0x94")][tt("0xae")](function(t){t[tt("0xaf")]=t[tt("0xaf")]&&t[tt("0xaf")][tt("0xb0")]()}),this[tt("0x94")]=[])},$.Scene[tt("0x112")]=i),e[tt("0xa4")][tt("0x241")]=function(t){var e=this[tt("0x23d")]*this[tt("0x23b")],i=this[tt("0x23e")]*this[tt("0x23c")],n=r(this[tt("0x237")],this[tt("0x238")],this[tt("0x239")],this[tt("0x23a")],e,i,this[tt("0x242")]),a=r(this[tt("0x237")],this[tt("0x238")],this[tt("0x239")],this[tt("0x23a")],e,i,this[tt("0x242")]),e=s(e,i),i=l(this[tt("0x23b")],this[tt("0x23c")],this[tt("0x23d")],this[tt("0x23e")]);return this[tt("0x243")](t,n,a,e,i)},e[tt("0xa4")][tt("0x244")]=function(t){var e=this[tt("0x23d")]*this[tt("0x23b")],i=this[tt("0x23e")]*this[tt("0x23c")],n=r(this[tt("0x237")],this[tt("0x238")],this[tt("0x239")],this[tt("0x23a")],e,i,this[tt("0x245")]),a=r(this[tt("0x237")],this[tt("0x238")],this[tt("0x239")],this[tt("0x23a")],e,i,this[tt("0x245")]),e=s(e,i),i=l(this[tt("0x23b")],this[tt("0x23c")],this[tt("0x23d")],this[tt("0x23e")]);return this[tt("0x243")](t,n,a,e,i)},e[tt("0xa4")][tt("0x246")]=function(t){var e=this[tt("0x23e")]*this[tt("0x23c")],i=o(this[tt("0x237")],this[tt("0x239")],this[tt("0x23a")],10,e,this[tt("0x245")],this[tt("0x242")]),n=o(this[tt("0x237")],this[tt("0x239")],this[tt("0x23a")],10,e,this[tt("0x245")],this[tt("0x242")]),e=s(10,e),a=l(10,this[tt("0x23c")],1,this[tt("0x23e")]);return this[tt("0x243")](t,i,n,e,a)},e[tt("0xa4")][tt("0x247")]=function(t){var e=this[tt("0x23e")]*this[tt("0x23c")],i=o(this[tt("0x238")],this[tt("0x239")],this[tt("0x23a")],10,e,this[tt("0x245")],this[tt("0x242")]),n=o(this[tt("0x238")],this[tt("0x239")],this[tt("0x23a")],10,e,this[tt("0x245")],this[tt("0x242")]),e=s(10,e),a=l(10,this[tt("0x23c")],1,this[tt("0x23e")]);return this[tt("0x243")](t,i,n,e,a)},e[tt("0xa4")][tt("0x243")]=function(t,e,i,n,a){var r=this,o=$[tt("0x248")][tt("0x249")](!0,!1,void 0),o=$[tt("0xfb")][tt("0xfc")](o),s=new $[tt("0x136")]({sources:[tt("0x24a")]}),l=new $[tt("0x136")]({sources:[tt("0x24b")]}),c={xbsjColor:function(){return r[tt("0x236")]}},h={xbsjColor:function(){return r[tt("0x86")]}},s=$[tt("0xf8")][tt("0xfc")]({context:t,vertexShaderSource:s,fragmentShaderSource:l,attributeLocations:{position:0,normal:1}}),l=$[tt("0x135")][tt("0x190")]({context:t,typedArray:e,usage:$[tt("0xf4")][tt("0xf5")]}),i=$[tt("0x135")][tt("0x190")]({context:t,typedArray:i,usage:$[tt("0xf4")][tt("0xf5")]}),n=$[tt("0x135")][tt("0x24c")]({context:t,typedArray:n,usage:$[tt("0xf4")][tt("0xf5")],indexDatatype:$[tt("0x1a1")][tt("0x24d")]}),a=$[tt("0x135")][tt("0x24c")]({context:t,typedArray:a,usage:$[tt("0xf4")][tt("0xf5")],indexDatatype:$[tt("0x1a1")][tt("0x24d")]}),n=new $[tt("0xf2")]({context:t,attributes:[{index:0,vertexBuffer:l,componentsPerAttribute:3,componentDatatype:$[tt("0x7")][tt("0x8")]},{index:1,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:$[tt("0x7")][tt("0x8")]}],indexBuffer:n}),t=new $[tt("0xf2")]({context:t,attributes:[{index:0,vertexBuffer:l,componentsPerAttribute:3,componentDatatype:$[tt("0x7")][tt("0x8")]},{index:1,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:$[tt("0x7")][tt("0x8")]}],indexBuffer:a}),l=$[tt("0x4e")][tt("0x4f")](e);return{command:new $[tt("0xee")]({vertexArray:n,primitiveType:$[tt("0x51")][tt("0x52")],renderState:o,shaderProgram:s,uniformMap:c,owner:this,pass:$[tt("0xef")][tt("0x129")],modelMatrix:new $[tt("0x11")],boundingVolume:new $[tt("0x4e")],cull:!0}),lineCommand:new $[tt("0xee")]({vertexArray:t,primitiveType:$[tt("0x51")][tt("0x59")],renderState:o,shaderProgram:s,uniformMap:h,owner:this,pass:$[tt("0xef")][tt("0x129")],modelMatrix:new $[tt("0x11")],boundingVolume:new $[tt("0x4e")],cull:!0}),initBoundingSphere:l}},e[tt("0xa4")][tt("0xdb")]=function(e){var i=this;this[tt("0x7a")]&&(this[tt("0x22b")]===this[tt("0x245")]&&this[tt("0x22c")]===this[tt("0x242")]&&this[tt("0x22e")]===this[tt("0x237")]&&this[tt("0x22f")]===this[tt("0x238")]&&this[tt("0x230")]===this[tt("0x239")]&&this[tt("0x231")]===this[tt("0x23a")]&&this[tt("0x232")]===this[tt("0x23b")]&&this[tt("0x233")]===this[tt("0x23c")]&&this[tt("0x234")]===this[tt("0x23d")]&&this[tt("0x235")]===this[tt("0x23e")]||(this[tt("0x245")]=this[tt("0x22b")],this[tt("0x242")]=this[tt("0x22c")],this[tt("0x237")]=this[tt("0x22e")],this[tt("0x238")]=this[tt("0x22f")],this[tt("0x239")]=this[tt("0x230")],this[tt("0x23a")]=this[tt("0x231")],this[tt("0x23b")]=this[tt("0x232")],this[tt("0x23c")]=this[tt("0x233")],this[tt("0x23d")]=this[tt("0x234")],this[tt("0x23e")]=this[tt("0x235")],this[tt("0x8b")]=$[tt("0x57")]($[tt("0x11")][tt("0x8c")]),this[tt("0x24e")]()),$[tt("0x2d")](this[tt("0x24f")])&&0!==this[tt("0x24f")][tt("0x2")]||(this[tt("0x24f")]||(this[tt("0x24f")]=[]),this[tt("0x24f")][tt("0x4c")](this[tt("0x241")](e[tt("0xea")])),this[tt("0x24f")][tt("0x4c")](this[tt("0x246")](e[tt("0xea")])),this[tt("0x24f")][tt("0x4c")](this[tt("0x247")](e[tt("0xea")])),this[tt("0x24f")][tt("0x4c")](this[tt("0x244")](e[tt("0xea")]))),$[tt("0x11")][tt("0xba")](this[tt("0x140")],this[tt("0x8b")])||($[tt("0x11")][tt("0x57")](this[tt("0x140")],this[tt("0x8b")]),this[tt("0x24f")][tt("0xae")](function(t){t[tt("0x250")][tt("0x140")]=$[tt("0x11")][tt("0x8c")],t[tt("0x250")][tt("0x140")]=i[tt("0x8b")],t[tt("0x250")][tt("0x251")]=$[tt("0x4e")][tt("0x180")](t[tt("0x252")],i[tt("0x8b")],i[tt("0x166")]),t[tt("0x253")][tt("0x140")]=$[tt("0x11")][tt("0x8c")],t[tt("0x253")][tt("0x140")]=i[tt("0x8b")],t[tt("0x253")][tt("0x251")]=$[tt("0x4e")][tt("0x180")](t[tt("0x252")],i[tt("0x8b")],i[tt("0x166")])})),this[tt("0x24f")][tt("0xae")](function(t){t[tt("0x250")]&&e[tt("0xe1")][tt("0x4c")](t[tt("0x250")]),t[tt("0x253")]&&e[tt("0xe1")][tt("0x4c")](t[tt("0x253")])}))},e[tt("0xa4")][tt("0x1f7")]=function(){return!1},e[tt("0xa4")][tt("0x24e")]=function(){this[tt("0x24f")]&&this[tt("0x24f")][tt("0xae")](function(t){$[tt("0x2d")](t[tt("0x250")])&&(t[tt("0x250")][tt("0xf7")]=t[tt("0x250")][tt("0xf7")]&&t[tt("0x250")][tt("0xf7")][tt("0xb0")](),t[tt("0x250")][tt("0xaf")]=t[tt("0x250")][tt("0xaf")]&&t[tt("0x250")][tt("0xaf")][tt("0xb0")](),t[tt("0x250")]=void 0),$[tt("0x2d")](t[tt("0x253")])&&(t[tt("0x253")][tt("0xf7")]=t[tt("0x253")][tt("0xf7")]&&t[tt("0x253")][tt("0xf7")][tt("0xb0")](),t[tt("0x253")][tt("0xaf")]=t[tt("0x253")][tt("0xaf")]&&t[tt("0x253")][tt("0xaf")][tt("0xb0")](),t[tt("0x253")]=void 0)}),this[tt("0x24f")]&&(this[tt("0x24f")][tt("0x2")]=0)},e[tt("0xa4")][tt("0xb0")]=function(){return this[tt("0x24e")](),$[tt("0x133")](this)},Object[tt("0xa3")](e[tt("0xa4")],{startRadius:{get:function(){return this[tt("0x254")]},set:function(t){this[tt("0x254")]=t,this[tt("0x22b")]=[{fov:$[tt("0x5d")][tt("0x5e")](0),radius:t},{fov:$[tt("0x5d")][tt("0x5e")](10),radius:.9*t},{fov:$[tt("0x5d")][tt("0x5e")](20),radius:.8*t},{fov:$[tt("0x5d")][tt("0x5e")](30),radius:.7*t},{fov:$[tt("0x5d")][tt("0x5e")](40),radius:.6*t},{fov:$[tt("0x5d")][tt("0x5e")](50),radius:.5*t},{fov:$[tt("0x5d")][tt("0x5e")](60),radius:.4*t},{fov:$[tt("0x5d")][tt("0x5e")](70),radius:.3*t},{fov:$[tt("0x5d")][tt("0x5e")](80),radius:.1*t},{fov:$[tt("0x5d")][tt("0x5e")](90),radius:.01*t}]}},radius:{get:function(){return this[tt("0x115")]},set:function(t){this[tt("0x115")]=t,this[tt("0x22c")]=[{fov:$[tt("0x5d")][tt("0x5e")](0),radius:t},{fov:$[tt("0x5d")][tt("0x5e")](10),radius:.9*t},{fov:$[tt("0x5d")][tt("0x5e")](20),radius:.8*t},{fov:$[tt("0x5d")][tt("0x5e")](30),radius:.7*t},{fov:$[tt("0x5d")][tt("0x5e")](40),radius:.6*t},{fov:$[tt("0x5d")][tt("0x5e")](50),radius:.5*t},{fov:$[tt("0x5d")][tt("0x5e")](60),radius:.4*t},{fov:$[tt("0x5d")][tt("0x5e")](70),radius:.3*t},{fov:$[tt("0x5d")][tt("0x5e")](80),radius:.1*t},{fov:$[tt("0x5d")][tt("0x5e")](90),radius:.01*t}]}}}),$.Scene[tt("0x255")]=e,function(){var t,e;$[tt("0x12b")]||(t=typeof self!==tt("0x68")?self:this,e=function(){return i=[function(c,t,e){Object[tt("0x1d")](t,tt("0x1e"),{value:!0}),t[tt("0x12b")]=void 0;var C=i(e(6)),w=i(e(7)),I=i(e(8)),Q=i(e(9));function i(t){return t&&t[tt("0x1e")]?t:{default:t}}var _=$[tt("0x4e")],A=$[tt("0x9")],n=$[tt("0x83")],d=$[tt("0x132")],G=$[tt("0x7")],a=$[tt("0x79")],r=$[tt("0x2d")],P=(Object[tt("0xa3")],$[tt("0x133")],$[tt("0x134")]),W=$[tt("0x11")],o=$[tt("0x51")],M=$[tt("0x135")],Z=$[tt("0xf4")],s=$[tt("0xee")],S=$[tt("0xef")],V=$[tt("0xfb")],R=$[tt("0xf8")],X=$[tt("0x136")],F=$[tt("0xf2")],T=$[tt("0xfd")],B=$[tt("0x101")],l=$[tt("0x137")],J=$[tt("0x35")],O=$[tt("0x138")],j=$[tt("0x5d")],D=$[tt("0x22")],k=(W=$[tt("0x11")],$[tt("0x139")]),x=($[tt("0x13a")],$[tt("0x13b")],Math[tt("0x65")]),N=Math[tt("0x66")],E=Math[tt("0x5f")],Y=Math[tt("0x13c")],z=(Math[tt("0x13d")],{position:0,normal:1});function h(t){var e=this;t=a(t,a[tt("0x13e")]),this[tt("0x7a")]=a(t[tt("0x7a")],!0),this[tt("0x13f")]=a(t[tt("0x13f")],32),this[tt("0x140")]=W[tt("0x57")](t[tt("0x140")],new W),this[tt("0x8b")]=new W,this[tt("0x141")]=new W,this[tt("0x142")]=new W,this[tt("0xed")]=a(t[tt("0xed")],Number[tt("0x143")]),this[tt("0x115")]=void 0,this[tt("0x144")]=a(t[tt("0x144")],0),this[tt("0x145")]=void 0,this[tt("0x146")]=a(t[tt("0x146")],0),this[tt("0x147")]=void 0,this[tt("0x86")]=a(t[tt("0x86")],n[tt("0x148")]),this[tt("0x149")]=a(t[tt("0x149")],!0),this[tt("0x14a")]=a(t[tt("0x14a")],!0),this[tt("0x14b")]=a(t[tt("0x14b")],!0),this[tt("0x14c")]=r(t[tt("0x14c")])?t[tt("0x14c")]:l[tt("0x14d")](l[tt("0x14e")]),this[tt("0x14f")]=void 0,this[tt("0x150")]=void 0,this[tt("0x151")]=r(t[tt("0x151")])?t[tt("0x151")]:l[tt("0x14d")](l[tt("0x14e")]),this[tt("0x152")]=void 0,this[tt("0x153")]=void 0,this[tt("0x154")]=a(t[tt("0x154")],!0),this[tt("0x155")]=r(t[tt("0x155")])?t[tt("0x155")]:l[tt("0x14d")](l[tt("0x14e")]),this[tt("0x156")]=void 0,this[tt("0x157")]=a(t[tt("0x157")],!0),this[tt("0x158")]=a(t[tt("0x158")],!0),this[tt("0x159")]=a(t[tt("0x159")],n[tt("0x148")]),this[tt("0x15a")]=a(t[tt("0x15a")],5),this[tt("0x15b")]=a(t[tt("0x15b")],!1),this[tt("0x15c")]=void 0,this[tt("0x15d")]=a(t[tt("0x15d")],!0),this[tt("0x15e")]=a(t[tt("0x15e")],n[tt("0x148")]),this[tt("0x15f")]=a(t[tt("0x15f")],tt("0x160")),this[tt("0x161")]=a(t[tt("0x161")],10),this[tt("0x162")]=0,this[tt("0x163")]=0,this[tt("0x164")]=k[tt("0x165")](),this[tt("0x166")]=new _,this[tt("0x167")]=new _,this[tt("0x168")]=new s({owner:this,primitiveType:o[tt("0x52")],boundingVolume:this[tt("0x167")]}),this[tt("0x169")]=new s({owner:this,primitiveType:o[tt("0x52")],boundingVolume:this[tt("0x167")]}),this[tt("0x16a")]=void 0,this[tt("0x16b")]=new s({owner:this,primitiveType:o[tt("0x59")],boundingVolume:this[tt("0x167")]}),this[tt("0x16c")]=void 0,this[tt("0x16d")]=new s({owner:this,primitiveType:o[tt("0x59")],boundingVolume:this[tt("0x167")]}),this[tt("0x16e")]=void 0,this[tt("0x16f")]=new s({owner:this,primitiveType:o[tt("0x52")],boundingVolume:this[tt("0x167")]}),this[tt("0x170")]=new s({owner:this,primitiveType:o[tt("0x52")],boundingVolume:this[tt("0x167")]}),this[tt("0x171")]=void 0,this[tt("0x172")]=new s({owner:this,primitiveType:o[tt("0x59")],boundingVolume:this[tt("0x167")]}),this[tt("0x173")]=void 0,this[tt("0x174")]=new s({owner:this,primitiveType:o[tt("0x52")],boundingVolume:this[tt("0x167")]}),this[tt("0x175")]=new s({owner:this,primitiveType:o[tt("0x52")],boundingVolume:this[tt("0x167")]}),this[tt("0x176")]=void 0,this[tt("0x177")]=[],this[tt("0x178")]=void 0,this[tt("0x179")]=void 0,this[tt("0x17a")]=void 0,this[tt("0x17b")]={u_type:function(){return 0},u_xHalfAngle:function(){return e[tt("0x144")]},u_yHalfAngle:function(){return e[tt("0x146")]},u_radius:function(){return e[tt("0xed")]},u_showThroughEllipsoid:function(){return e[tt("0x15b")]},u_showIntersection:function(){return e[tt("0x158")]},u_intersectionColor:function(){return e[tt("0x159")]},u_intersectionWidth:function(){return e[tt("0x15a")]},u_normalDirection:function(){return 1},u_lineColor:function(){return e[tt("0x86")]}},this[tt("0x17c")]={u_xHalfAngle:function(){return e[tt("0x162")]},u_yHalfAngle:function(){return e[tt("0x163")]},u_radius:function(){return e[tt("0xed")]},u_color:function(){return e[tt("0x15e")]},u_showThroughEllipsoid:function(){return e[tt("0x15b")]},u_showIntersection:function(){return e[tt("0x158")]},u_intersectionColor:function(){return e[tt("0x159")]},u_intersectionWidth:function(){return e[tt("0x15a")]},u_normalDirection:function(){return 1},u_lineColor:function(){return e[tt("0x86")]}}}h[tt("0xa4")][tt("0xdb")]=function(t){var e,i=t[tt("0x34")];if(this[tt("0x7a")]&&i===J[tt("0x36")]){var i=!1,n=!1,a=!1,r=this[tt("0x144")],o=this[tt("0x146")];if(r<0||o<0)throw new P(tt("0x17d"));if(0!=r&&0!=o){this[tt("0x145")]===r&&this[tt("0x147")]===o||(this[tt("0x145")]=r,this[tt("0x147")]=o,i=!0);var s=this[tt("0xed")];if(s<0)throw new P(tt("0x17e"));var l=!1,s=(this[tt("0x115")]!==s&&(l=!0,this[tt("0x115")]=s,this[tt("0x166")]=new _(A[tt("0x56")],this[tt("0xed")])),W[tt("0xba")](this[tt("0x140")],this[tt("0x8b")])&&!l||(W[tt("0x57")](this[tt("0x140")],this[tt("0x8b")]),W[tt("0x17f")](this[tt("0x140")],this[tt("0xed")],this[tt("0x141")]),_[tt("0x180")](this[tt("0x166")],this[tt("0x140")],this[tt("0x167")])),this[tt("0x15b")]),l=(this[tt("0x15c")]!==this[tt("0x15b")]&&(this[tt("0x15c")]=s,n=!0),this[tt("0x14c")]);this[tt("0x14f")]!==l&&(this[tt("0x14f")]=l,a=n=!0);var c,h,x,d,u,p,g=l[tt("0x181")](),m=(this[tt("0x150")]!==g&&(this[tt("0x150")]=g,n=!0),this[tt("0x15d")]&&(p=t[tt("0xdc")],(u=k[tt("0x182")](p,this[tt("0x164")]))<0&&(this[tt("0x164")]=k[tt("0x57")](p,this[tt("0x164")])),p=Math[tt("0x183")](u%this[tt("0x161")]/this[tt("0x161")],0),this[tt("0x15f")]==tt("0x160")?(u=N(x=2*o*p-o),d=E(r),u=Y(u*d),this[tt("0x162")]=u,this[tt("0x163")]=x,$[tt("0x22")][tt("0x184")](this[tt("0x163")],L)):(x=2*r*p-r,d=E(o),u=N(x),p=Y(u*d),this[tt("0x162")]=x,this[tt("0x163")]=p,$[tt("0x22")][tt("0x185")](this[tt("0x162")],L)),$[tt("0x11")][tt("0x186")](this[tt("0x140")],L,this[tt("0x142")]),W[tt("0x17f")](this[tt("0x142")],this[tt("0xed")],this[tt("0x142")])),i&&(r=this,o=t[tt("0xea")],u=U(r,r[tt("0x144")],r[tt("0x146")]),x=(d=r)[tt("0x144")],d=d[tt("0x146")],p=u[tt("0x189")],u=u[tt("0x18a")],i=[],e=D[tt("0x185")](x,L),i[tt("0x4c")](p[tt("0x18b")](function(t){return D[tt("0x18c")](e,t,new $[tt("0x9")])})),e=D[tt("0x184")](-d,L),i[tt("0x4c")](u[tt("0x18b")](function(t){return D[tt("0x18c")](e,t,new $[tt("0x9")])})[tt("0x18d")]()),e=D[tt("0x185")](-x,L),i[tt("0x4c")](p[tt("0x18b")](function(t){return D[tt("0x18c")](e,t,new $[tt("0x9")])})[tt("0x18d")]()),e=D[tt("0x184")](d,L),i[tt("0x4c")](u[tt("0x18b")](function(t){return D[tt("0x18c")](e,t,new $[tt("0x9")])})),x=i,r[tt("0x14b")]&&(r[tt("0x16a")]=function(t,e){for(var i=Array[tt("0xa4")][tt("0x18e")][tt("0x18f")]([],e)[tt("0x2")]-e[tt("0x2")],n=new Float32Array(18*i),a=0,r=0,o=e[tt("0x2")];r<o;r++)for(var s=e[r],l=A[tt("0x15")](A[tt("0xc")](s[0],s[s[tt("0x2")]-1],K),K),c=0,i=s[tt("0x2")]-1;c<i;c++)n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=-l.x,n[a++]=-l.y,n[a++]=-l.z,n[a++]=s[c].x,n[a++]=s[c].y,n[a++]=s[c].z,n[a++]=-l.x,n[a++]=-l.y,n[a++]=-l.z,n[a++]=s[c+1].x,n[a++]=s[c+1].y,n[a++]=s[c+1].z,n[a++]=-l.x,n[a++]=-l.y,n[a++]=-l.z;var h=M[tt("0x190")]({context:t,typedArray:n,usage:Z[tt("0xf5")]}),x=6*Float32Array[tt("0x191")],h=[{index:z[tt("0x3")],vertexBuffer:h,componentsPerAttribute:3,componentDatatype:G[tt("0x8")],offsetInBytes:0,strideInBytes:x},{index:z[tt("0x5")],vertexBuffer:h,componentsPerAttribute:3,componentDatatype:G[tt("0x8")],offsetInBytes:3*Float32Array[tt("0x191")],strideInBytes:x}];return new F({context:t,attributes:h})}(o,x)),r[tt("0x149")]&&(r[tt("0x16c")]=function(t,e){for(var i=e[tt("0x2")],n=new Float32Array(9*i),a=0,r=0,o=e[tt("0x2")];r<o;r++){var s=e[r];n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=s[0].x,n[a++]=s[0].y,n[a++]=s[0].z}var i=M[tt("0x190")]({context:t,typedArray:n,usage:Z[tt("0xf5")]}),l=3*Float32Array[tt("0x191")],i=[{index:z[tt("0x3")],vertexBuffer:i,componentsPerAttribute:3,componentDatatype:G[tt("0x8")],offsetInBytes:0,strideInBytes:l}];return new F({context:t,attributes:i})}(o,x)),r[tt("0x14a")]&&(r[tt("0x16e")]=function(t,e){for(var i=Array[tt("0xa4")][tt("0x18e")][tt("0x18f")]([],e)[tt("0x2")]-e[tt("0x2")],n=new Float32Array(9*i),a=0,r=0,o=e[tt("0x2")];r<o;r++)for(var s=e[r],l=0,i=s[tt("0x2")]-1;l<i;l++)n[a++]=s[l].x,n[a++]=s[l].y,n[a++]=s[l].z,n[a++]=s[l+1].x,n[a++]=s[l+1].y,n[a++]=s[l+1].z;var c=M[tt("0x190")]({context:t,typedArray:n,usage:Z[tt("0xf5")]}),h=3*Float32Array[tt("0x191")],c=[{index:z[tt("0x3")],vertexBuffer:c,componentsPerAttribute:3,componentDatatype:G[tt("0x8")],offsetInBytes:0,strideInBytes:h}];return new F({context:t,attributes:c})}(o,x)),r[tt("0x154")]&&(r[tt("0x171")]=(p=o,d=$[tt("0x13b")][tt("0x55")](new $[tt("0x13b")]({vertexFormat:O[tt("0x192")],stackPartitions:32,slicePartitions:32})),F[tt("0xf3")]({context:p,geometry:d,attributeLocations:z,bufferUsage:Z[tt("0xf5")],interleave:!1}))),r[tt("0x157")]&&(r[tt("0x173")]=(u=o,i=$[tt("0x193")][tt("0x55")](new $[tt("0x193")]({vertexFormat:O[tt("0x192")],stackPartitions:32,slicePartitions:32})),F[tt("0xf3")]({context:u,geometry:i,attributeLocations:z,bufferUsage:Z[tt("0xf5")],interleave:!1}))),r[tt("0x15d")])&&(r[tt("0x15f")]==tt("0x160")?(c=U(r,j[tt("0x194")],0),r[tt("0x195")]=q(o,c[tt("0x18a")])):(c=U(r,0,j[tt("0x194")]),r[tt("0x195")]=q(o,c[tt("0x189")]))),n&&(i=this,r=s,g?(i[tt("0x178")]=V[tt("0xfc")]({depthTest:{enabled:!r},depthMask:!1,blending:T[tt("0xfe")],cull:{enabled:!0,face:B[tt("0x102")]}}),i[tt("0x179")]=V[tt("0xfc")]({depthTest:{enabled:!r},depthMask:!1,blending:T[tt("0xfe")],cull:{enabled:!0,face:B[tt("0x19a")]}}),i[tt("0x19b")]=V[tt("0xfc")]({depthTest:{enabled:!r},depthMask:!1,blending:T[tt("0xfe")]})):(i[tt("0x178")]=V[tt("0xfc")]({depthTest:{enabled:!r},depthMask:!0}),i[tt("0x19b")]=V[tt("0xfc")]({depthTest:{enabled:!0},depthMask:!0}))),a&&(o=this,s=c=l,i=(r=t)[tt("0xea")],l=C[tt("0x131")],h=new X({sources:[I[tt("0x131")],s[tt("0x196")],w[tt("0x131")]]}),o[tt("0x17a")]=R[tt("0xf9")]({context:i,shaderProgram:o[tt("0x17a")],vertexShaderSource:l,fragmentShaderSource:h,attributeLocations:z}),h=new X({sources:[I[tt("0x131")],s[tt("0x196")],w[tt("0x131")]],pickColorQualifier:tt("0x197")}),o[tt("0x198")]=R[tt("0xf9")]({context:i,shaderProgram:o[tt("0x198")],vertexShaderSource:l,fragmentShaderSource:h,attributeLocations:z}),this[tt("0x15d")])&&(s=this,i=c,o=r[tt("0xea")],l=C[tt("0x131")],h=new X({sources:[I[tt("0x131")],i[tt("0x196")],Q[tt("0x131")]]}),s[tt("0x199")]=R[tt("0xf9")]({context:o,shaderProgram:s[tt("0x199")],vertexShaderSource:l,fragmentShaderSource:h,attributeLocations:z})),(n||a)&&(r=g,(i=this)[tt("0x177")][tt("0x2")]=0,o=r?S[tt("0x129")]:S[tt("0xf0")],i[tt("0x14b")]&&H(i,i[tt("0x168")],i[tt("0x169")],i[tt("0x178")],i[tt("0x179")],i[tt("0x17a")],i[tt("0x16a")],i[tt("0x17b")],i[tt("0x141")],r,o),i[tt("0x149")]&&H(i,i[tt("0x16b")],void 0,i[tt("0x178")],i[tt("0x179")],i[tt("0x17a")],i[tt("0x16c")],i[tt("0x17b")],i[tt("0x141")],r,o,!0),i[tt("0x14a")]&&H(i,i[tt("0x16d")],void 0,i[tt("0x178")],i[tt("0x179")],i[tt("0x17a")],i[tt("0x16e")],i[tt("0x17b")],i[tt("0x141")],r,o,!0),i[tt("0x154")]&&H(i,i[tt("0x16f")],i[tt("0x170")],i[tt("0x178")],i[tt("0x179")],i[tt("0x17a")],i[tt("0x171")],i[tt("0x17b")],i[tt("0x141")],r,o),i[tt("0x157")]&&H(i,i[tt("0x172")],void 0,i[tt("0x178")],i[tt("0x179")],i[tt("0x17a")],i[tt("0x173")],i[tt("0x17b")],i[tt("0x141")],r,o,!0),i[tt("0x15d")])&&H(i,i[tt("0x174")],i[tt("0x175")],i[tt("0x178")],i[tt("0x179")],i[tt("0x199")],i[tt("0x195")],i[tt("0x17c")],i[tt("0x142")],r,o),t[tt("0xe1")]),s=t[tt("0x187")],f=this[tt("0x177")];if(s[tt("0x188")])for(var v=0,y=f[tt("0x2")];v<y;v++){var b=f[v];m[tt("0x4c")](b)}}}};var L=new D,K=new A;function U(t,e,i){for(var n=t[tt("0x13f")],t=N(i),i=E(i),a=N(e),e=E(e),r=Y(a*i),o=Y(t*e),s=[],l=0;l<n;l++){var c=2*r*l/(n-1)-r;s[tt("0x4c")](new A(0,x(c),N(c)))}for(var h=[],l=0;l<n;l++)c=2*o*l/(n-1)-o,h[tt("0x4c")](new A(x(c),0,N(c)));return{zoy:s,zox:h}}function q(t,e){for(var i=e[tt("0x2")]-1,n=new Float32Array(9*i),a=0,r=0;r<i;r++)n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=e[r].x,n[a++]=e[r].y,n[a++]=e[r].z,n[a++]=e[r+1].x,n[a++]=e[r+1].y,n[a++]=e[r+1].z;var o=M[tt("0x190")]({context:t,typedArray:n,usage:Z[tt("0xf5")]}),s=3*Float32Array[tt("0x191")],o=[{index:z[tt("0x3")],vertexBuffer:o,componentsPerAttribute:3,componentDatatype:G[tt("0x8")],offsetInBytes:0,strideInBytes:s}];return new F({context:t,attributes:o})}function H(t,e,i,n,a,r,o,s,l,c,h,x){c&&i&&(i[tt("0xaf")]=o,i[tt("0xfa")]=a,i[tt("0xf7")]=r,i[tt("0x103")]=d(s,t[tt("0x14f")][tt("0x17b")]),i[tt("0x103")][tt("0x19c")]=function(){return-1},i[tt("0x19d")]=h,i[tt("0x140")]=l,t[tt("0x177")][tt("0x4c")](i)),e[tt("0xaf")]=o,e[tt("0xfa")]=n,e[tt("0xf7")]=r,e[tt("0x103")]=d(s,t[tt("0x14f")][tt("0x17b")]),x&&(e[tt("0x103")][tt("0x19e")]=function(){return 1}),e[tt("0x19d")]=h,e[tt("0x140")]=l,t[tt("0x177")][tt("0x4c")](e)}t[tt("0x12b")]=h},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0});var G=$[tt("0x4e")],P=$[tt("0x9")],r=$[tt("0x19f")],W=$[tt("0x7")],o=$[tt("0x79")],M=($[tt("0x2d")],$[tt("0x50")]),Z=$[tt("0x6")],S=$[tt("0x1a0")],V=$[tt("0x51")],s=$[tt("0x138")],R=$[tt("0x5d")],X=$[tt("0x53")],F=$[tt("0x1a1")],T=($[tt("0xf")],Math[tt("0x66")]),B=Math[tt("0x65")];function l(t){var e=(t=o(t,o[tt("0x13e")]))[tt("0x114")],i=t[tt("0xed")],n=Math[tt("0x1a2")](o(t[tt("0x1a3")],12)),a=Math[tt("0x1a2")](o(t[tt("0x1a4")],64)),t=(r[tt("0x1a5")][tt("0x1a6")](tt("0x114"),e),r[tt("0x1a5")][tt("0x1a6")](tt("0xed"),i),o(t[tt("0x1a7")],s[tt("0x1a8")]));this[tt("0x113")]=e,this[tt("0x115")]=i,this[tt("0x1a9")]=n,this[tt("0x1aa")]=a,this[tt("0x1ab")]=t}l[tt("0x1ac")]=function(t){var e=(t=o(t,o[tt("0x13e")]))[tt("0x114")],i=t[tt("0xed")],n=t[tt("0x1a3")],a=t[tt("0x1a4")];return r[tt("0x1a5")][tt("0x1a6")](tt("0x114"),e),r[tt("0x1a5")][tt("0x1a6")](tt("0xed"),i),r[tt("0x1a5")][tt("0x1a6")][tt("0x1ad")](tt("0x114"),e,0),r[tt("0x1a5")][tt("0x1a6")][tt("0x1ad")](tt("0x33"),height,0),new l({angle:e,radius:i,stackPartitions:n,slicePartitions:a,vertexFormat:t[tt("0x1a7")]})},l[tt("0x55")]=function(t){console[tt("0xdc")](tt("0x55"));var e,i=t[tt("0x113")],n=t[tt("0x115")],a=t[tt("0x1a9")]+1,r=t[tt("0x1aa")]+1,t=t[tt("0x1ab")],o=new S,s=3*(r-1)+6*(r-1)*(a-2)+3*(r-1),l=a*r,c=F[tt("0x1ae")](l,s),h=new Float64Array(3*l+3*(r-1)*3);if(t[tt("0x3")]){for(var x=0,d=new Array(r),u=new Array(r),p=0;p<r;p++){var g=R[tt("0x1af")]*p/(r-1);d[p]=T(g),u[p]=B(g),h[x++]=0,h[x++]=0,h[x++]=-n}for(p=1;p<a;p++)for(var m=i*p/(a-1),f=B(m),v=n*f,y=n*f,b=n*T(m),C=0;C<r;C++)h[x++]=d[C]*v,h[x++]=u[C]*y,h[x++]=-b;for(e=x,p=0;p<r-1;p++)h[x++]=0,h[x++]=0,h[x++]=0,h[x++]=h[e-3*(r-p-1)],h[x++]=h[e-3*(r-p-1)+1],h[x++]=h[e-3*(r-p-1)+2],h[x++]=h[e-3*(r-p)],h[x++]=h[e-3*(r-p)+1],h[x++]=h[e-3*(r-p)+2];o[tt("0x3")]=new Z({componentDatatype:W[tt("0x4d")],componentsPerAttribute:3,values:h})}for(var w,I,_=0,C=0;C<r-1;C++)c[_++]=r+C,c[_++]=r+C+1,c[_++]=C+1;for(p=1;p<a-1;p++)for(w=p*r,I=(p+1)*r,C=0;C<r-1;C++)c[_++]=I+C,c[_++]=I+C+1,c[_++]=w+C+1,c[_++]=I+C,c[_++]=w+C+1,c[_++]=w+C;for(var p=0,A=3*(r-1);p<A;p++)c[_++]=p+e/3;s=new M({attributes:o,indices:c,primitiveType:V[tt("0x52")],boundingSphere:new G(P[tt("0x56")],n)}),s=X[tt("0x54")](s);return console[tt("0x1b0")](tt("0x55")),s},e[tt("0x1b1")]=l},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0});var w=$[tt("0x4e")],I=$[tt("0x9")],_=$[tt("0x7")],r=$[tt("0x79")],o=($[tt("0x2d")],$[tt("0x134")]),A=($[tt("0xf")],$[tt("0x50")]),G=$[tt("0x6")],P=$[tt("0x1a0")],W=$[tt("0x1a1")],M=$[tt("0x5d")],Z=$[tt("0x51")],S=(new I(1,1,1),Math[tt("0x66")]),V=Math[tt("0x65")];function n(t){var e=(t=r(t,r[tt("0x13e")]))[tt("0x114")],i=t[tt("0xed")],n=Math[tt("0x1a2")](r(t[tt("0x1a3")],10)),a=Math[tt("0x1a2")](r(t[tt("0x1a4")],8)),t=Math[tt("0x1a2")](r(t[tt("0x1b2")],128));if(n<1)throw new o(tt("0x1b3"));if(a<0)throw new o(tt("0x1b4"));if(t<0)throw new o(tt("0x1b5"));this[tt("0x113")]=e,this[tt("0x115")]=i,this[tt("0x1a9")]=n,this[tt("0x1aa")]=a,this[tt("0x1b6")]=t}n[tt("0x55")]=function(t){var e=t[tt("0x113")],i=t[tt("0x115")];if(!(i<=0||e<=0)){for(var n,a,r,o,s=t[tt("0x1a9")],l=t[tt("0x1aa")],c=t[tt("0x1b6")],t=c*(s+l-1),h=t-l+2,x=new Float64Array(3*h),d=W[tt("0x1ae")](h,2*t),u=0,p=new Array(c),g=new Array(c),m=0;m<c;m++)n=M[tt("0x1af")]*m/c,p[m]=S(n),g[m]=V(n);for(m=1;m<s;m++)for(r=S(a=e*m/(s-1)),o=V(a),v=0;v<c;v++)x[u++]=i*p[v]*o,x[u++]=i*g[v]*o,x[u++]=-i*r;for(p[tt("0x2")]=l,g[tt("0x2")]=l,m=0;m<l;m++)n=M[tt("0x1af")]*m/l,p[m]=S(n),g[m]=V(n);for(x[u++]=0,x[u++]=0,x[u++]=-i,m=1;m<c;m++)for(r=S(a=e*m/c),o=V(a),v=0;v<l;v++)x[u++]=i*p[v]*o,x[u++]=i*g[v]*o,x[u++]=-i*r;for(m=u=0;m<s-1;++m){for(var f=m*c,v=0;v<c-1;++v)d[u++]=f+v,d[u++]=f+v+1;d[u++]=f+c-1,d[u++]=f}var y=c*(s-1);for(v=1;v<l+1;++v)d[u++]=y,d[u++]=y+v;for(m=0;m<c-2;++m){var b=m*l+1+y,C=(m+1)*l+1+y;for(v=0;v<l-1;++v)d[u++]=C+v,d[u++]=b+v;d[u++]=C+l-1,d[u++]=b+l-1}h=new P({position:new G({componentDatatype:_[tt("0x4d")],componentsPerAttribute:3,values:x})});return new A({attributes:h,indices:d,primitiveType:Z[tt("0x59")],boundingSphere:new w(I[tt("0x56")],i)})}},e[tt("0x1b7")]=n},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0});var n=$[tt("0x79")],a=$[tt("0x2d")],r=Object[tt("0xa3")],o=$[tt("0x134")],s=$[tt("0x1b8")],l=$[tt("0x1b9")],c=$[tt("0x1ba")];function h(t){this[tt("0x113")]=void 0,this[tt("0x1bb")]=void 0,this[tt("0x115")]=void 0,this[tt("0x1bc")]=void 0,this[tt("0x1bd")]=void 0,this[tt("0x1be")]=void 0,this[tt("0x1bf")]=void 0,this[tt("0x1c0")]=void 0,this[tt("0x1c1")]=void 0,this[tt("0x1c2")]=void 0,this[tt("0x78")]=void 0,this[tt("0x1c3")]=void 0,this[tt("0x1c4")]=void 0,this[tt("0x1c5")]=void 0,this[tt("0x1c1")]=void 0,this[tt("0x1c2")]=void 0,this[tt("0x14f")]=void 0,this[tt("0x1c6")]=void 0,this[tt("0x7b")]=void 0,this[tt("0x1c7")]=void 0,this[tt("0x1c8")]=void 0,this[tt("0x1c9")]=void 0,this[tt("0x1ca")]=void 0,this[tt("0x1cb")]=void 0,this[tt("0x1cc")]=void 0,this[tt("0x1cd")]=void 0,this[tt("0x1ce")]=void 0,this[tt("0x1cf")]=void 0,this[tt("0x1d0")]=new s,this[tt("0x1d1")]=void 0,this[tt("0x1d2")]=void 0,this[tt("0x1d3")](n(t,n[tt("0x13e")]))}r(h[tt("0xa4")],{definitionChanged:{get:function(){return this[tt("0x1d0")]}},show:c(tt("0x7a")),angle:c(tt("0x114")),radius:c(tt("0xed")),stack:c(tt("0x1d4")),slice:c(tt("0x13f")),color:c(tt("0x82")),material:l(tt("0x14c")),fill:c(tt("0x1d5")),outline:c(tt("0x7c")),outlineColor:c(tt("0x1d6")),outlineWidth:c(tt("0x1d7")),shadows:c(tt("0x1d8")),distanceDisplayCondition:c(tt("0x1d9"))}),h[tt("0xa4")][tt("0x57")]=function(t){return a(t)?(t[tt("0x114")]=this[tt("0x114")],t[tt("0xed")]=this[tt("0xed")],t[tt("0x1d4")]=this[tt("0x1d4")],t[tt("0x13f")]=this[tt("0x13f")],t[tt("0x7a")]=this[tt("0x7a")],t[tt("0x14c")]=this[tt("0x14c")],t[tt("0x82")]=this[tt("0x82")],t[tt("0x1d5")]=this[tt("0x1d5")],t[tt("0x7c")]=this[tt("0x7c")],t[tt("0x1d6")]=this[tt("0x1d6")],t[tt("0x1d7")]=this[tt("0x1d7")],t[tt("0x1d8")]=this[tt("0x1d8")],t[tt("0x1d9")]=this[tt("0x1d9")],t[tt("0x1da")]=this[tt("0x1da")],t):new h(this)},h[tt("0xa4")][tt("0x1d3")]=function(t){if(!a(t))throw new o(tt("0x1db"));this[tt("0x114")]=n(this[tt("0x114")],t[tt("0x114")]),this[tt("0xed")]=n(this[tt("0xed")],t[tt("0xed")]),this[tt("0x1d4")]=n(this[tt("0x1d4")],t[tt("0x1d4")]),this[tt("0x13f")]=n(this[tt("0x13f")],t[tt("0x13f")]),this[tt("0x7a")]=n(this[tt("0x7a")],t[tt("0x7a")]),this[tt("0x82")]=n(this[tt("0x82")],t[tt("0x82")]),this[tt("0x14c")]=n(this[tt("0x14c")],t[tt("0x14c")]),this[tt("0x1d5")]=n(this[tt("0x1d5")],t[tt("0x1d5")]),this[tt("0x7c")]=n(this[tt("0x7c")],t[tt("0x7c")]),this[tt("0x1d6")]=n(this[tt("0x1d6")],t[tt("0x1d6")]),this[tt("0x1d7")]=n(this[tt("0x1d7")],t[tt("0x1d7")]),this[tt("0x1d8")]=n(this[tt("0x1d8")],t[tt("0x1d8")]),this[tt("0x1d9")]=n(this[tt("0x1d9")],t[tt("0x1d9")]),this[tt("0x1da")]=n(this[tt("0x1da")],t[tt("0x1da")])},e[tt("0x1dc")]=h},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0});var n=i(5);Object[tt("0x1dd")](n)[tt("0xae")](function(t){t!==tt("0x131")&&t!==tt("0x1e")&&Object[tt("0x1d")](e,t,{enumerable:!0,get:function(){return n[t]}})})},function(t,e,i){var n=i(0),a=i(10),r=i(11),o=i(1),s=i(2),l=i(3),i=i(12),n=($.Scene[tt("0x12b")]=n[tt("0x12b")],$.Scene[tt("0x1de")]=a[tt("0x1de")],$.Scene[tt("0x1df")]=r[tt("0x1df")],$.Scene[tt("0x1b1")]=o[tt("0x1b1")],$.Scene[tt("0x1b7")]=s[tt("0x1b7")],$.Scene[tt("0x1dc")]=l[tt("0x1dc")],$.Scene[tt("0x1e0")]=i[tt("0x1e0")],$[tt("0x1e1")]),c=n[tt("0x1e2")];n[tt("0x1e2")]=function(t,e,i){var n=i[tt("0xab")];return c(t,e,i)[tt("0x18e")]([new r[tt("0x1df")](t,n)])}},function(t,e){t[tt("0x12d")]=tt("0x1e3")},function(t,e){t[tt("0x12d")]=tt("0x1e4")},function(t,e){t[tt("0x12d")]=tt("0x1e5")},function(t,e){t[tt("0x12d")]=tt("0x1e6")},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0});var n=$[tt("0x79")],a=$[tt("0x2d")],r=Object[tt("0xa3")],o=$[tt("0x134")],s=$[tt("0x1b8")],l=$[tt("0x1b9")],c=$[tt("0x1ba")];function h(t){this[tt("0x78")]=void 0,this[tt("0x115")]=void 0,this[tt("0x145")]=void 0,this[tt("0x147")]=void 0,this[tt("0x1e7")]=void 0,this[tt("0x1e8")]=void 0,this[tt("0x1e9")]=void 0,this[tt("0x1ea")]=void 0,this[tt("0x14f")]=void 0,this[tt("0x1eb")]=void 0,this[tt("0x1ec")]=void 0,this[tt("0x1ed")]=void 0,this[tt("0x1ee")]=void 0,this[tt("0x1ef")]=void 0,this[tt("0x15c")]=void 0,this[tt("0x1d1")]=void 0,this[tt("0x1f0")]=void 0,this[tt("0x1f1")]=void 0,this[tt("0x1f2")]=void 0,this[tt("0x1f3")]=void 0,this[tt("0x1d0")]=new s,this[tt("0x1d3")](n(t,n[tt("0x13e")]))}r(h[tt("0xa4")],{definitionChanged:{get:function(){return this[tt("0x1d0")]}},show:c(tt("0x7a")),radius:c(tt("0xed")),xHalfAngle:c(tt("0x144")),yHalfAngle:c(tt("0x146")),lineColor:c(tt("0x86")),showSectorLines:c(tt("0x149")),showSectorSegmentLines:c(tt("0x14a")),showLateralSurfaces:c(tt("0x14b")),material:l(tt("0x14c")),showDomeSurfaces:c(tt("0x154")),showDomeLines:c(tt("0x1f4")),showIntersection:c(tt("0x158")),intersectionColor:c(tt("0x159")),intersectionWidth:c(tt("0x15a")),showThroughEllipsoid:c(tt("0x15b")),gaze:c(tt("0x1da")),showScanPlane:c(tt("0x15d")),scanPlaneColor:c(tt("0x15e")),scanPlaneMode:c(tt("0x15f")),scanPlaneRate:c(tt("0x161"))}),h[tt("0xa4")][tt("0x57")]=function(t){return(t=a(t)?t:new h)[tt("0x7a")]=this[tt("0x7a")],t[tt("0xed")]=this[tt("0xed")],t[tt("0x144")]=this[tt("0x144")],t[tt("0x146")]=this[tt("0x146")],t[tt("0x86")]=this[tt("0x86")],t[tt("0x149")]=this[tt("0x149")],t[tt("0x14a")]=this[tt("0x14a")],t[tt("0x14b")]=this[tt("0x14b")],t[tt("0x14c")]=this[tt("0x14c")],t[tt("0x154")]=this[tt("0x154")],t[tt("0x157")]=this[tt("0x157")],t[tt("0x158")]=this[tt("0x158")],t[tt("0x159")]=this[tt("0x159")],t[tt("0x15a")]=this[tt("0x15a")],t[tt("0x15b")]=this[tt("0x15b")],t[tt("0x1da")]=this[tt("0x1da")],t[tt("0x15d")]=this[tt("0x15d")],t[tt("0x15e")]=this[tt("0x15e")],t[tt("0x15f")]=this[tt("0x15f")],t[tt("0x161")]=this[tt("0x161")],t},h[tt("0xa4")][tt("0x1d3")]=function(t){if(!a(t))throw new o(tt("0x1db"));this[tt("0x7a")]=n(this[tt("0x7a")],t[tt("0x7a")]),this[tt("0xed")]=n(this[tt("0xed")],t[tt("0xed")]),this[tt("0x144")]=n(this[tt("0x144")],t[tt("0x144")]),this[tt("0x146")]=n(this[tt("0x146")],t[tt("0x146")]),this[tt("0x86")]=n(this[tt("0x86")],t[tt("0x86")]),this[tt("0x149")]=n(this[tt("0x149")],t[tt("0x149")]),this[tt("0x14a")]=n(this[tt("0x14a")],t[tt("0x14a")]),this[tt("0x14b")]=n(this[tt("0x14b")],t[tt("0x14b")]),this[tt("0x14c")]=n(this[tt("0x14c")],t[tt("0x14c")]),this[tt("0x154")]=n(this[tt("0x154")],t[tt("0x154")]),this[tt("0x157")]=n(this[tt("0x157")],t[tt("0x157")]),this[tt("0x158")]=n(this[tt("0x158")],t[tt("0x158")]),this[tt("0x159")]=n(this[tt("0x159")],t[tt("0x159")]),this[tt("0x15a")]=n(this[tt("0x15a")],t[tt("0x15a")]),this[tt("0x15b")]=n(this[tt("0x15b")],t[tt("0x15b")]),this[tt("0x1da")]=n(this[tt("0x1da")],t[tt("0x1da")]),this[tt("0x15d")]=n(this[tt("0x15d")],t[tt("0x15d")]),this[tt("0x15e")]=n(this[tt("0x15e")],t[tt("0x15e")]),this[tt("0x15f")]=n(this[tt("0x15f")],t[tt("0x15f")]),this[tt("0x161")]=n(this[tt("0x161")],t[tt("0x161")])},e[tt("0x1de")]=h},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0}),e[tt("0x1df")]=void 0;var v=i(0),n=$[tt("0x1f5")],y=$[tt("0x9")],b=$[tt("0x83")],C=$[tt("0x2d")],a=$[tt("0x133")],w=$[tt("0x134")],I=$[tt("0x22")],_=$[tt("0x11")],A=$[tt("0x29")],G=$[tt("0x1f6")],P=$[tt("0xc2")],W=new I,M=(new _,new y),Z=new y,S=new A,V=new y,R=new A;function c(t,e,i){var n=e[t.id];C(n)&&(n=n[tt("0x2f")],i[tt("0xd2")](n),n[tt("0x1f7")]()||n[tt("0xb0")](),delete e[t.id])}function r(t,e){if(!C(t))throw new w(tt("0x1f8"));if(!C(e))throw new w(tt("0x1f9"));e[tt("0x1fa")][tt("0x1fb")](r[tt("0xa4")][tt("0x1fc")],this),this[tt("0x1fd")]=t,this[tt("0x1fe")]=t[tt("0x9d")],this[tt("0x1ff")]=e,this[tt("0x200")]={},this[tt("0x201")]=new n,this[tt("0x1fc")](e,e[tt("0x4")],[],[])}r[tt("0xa4")][tt("0xdb")]=function(t){if(!C(t))throw new w(tt("0x202"));for(var e=this[tt("0x201")][tt("0x4")],i=this[tt("0x200")],n=this[tt("0x1fe")],a=0,r=e[tt("0x2")];a<r;a++){var o,s,l,c=e[a],h=c[tt("0x203")],x=i[c.id],d=c[tt("0x204")]&&c[tt("0x205")](t)&&P[tt("0x206")](h[tt("0x78")],t,!0);if(d&&(o=P[tt("0xc3")](c[tt("0x74")],t,M),m=P[tt("0xc3")](c[tt("0x207")],t,S),f=P[tt("0xc3")](h[tt("0x115")],t),s=P[tt("0xc3")](h[tt("0x145")],t),l=P[tt("0xc3")](h[tt("0x147")],t),d=C(o)&&C(s)&&C(l)),d){d=C(x)?x[tt("0x2f")]:void 0,c=(C(d)||((d=new v[tt("0x12b")]).id=c,n[tt("0x9e")](d),i[c.id]=x={primitive:d,position:void 0,orientation:void 0}),P[tt("0xc3")](h[tt("0x1d1")],t));if(C(c)){var u=P[tt("0xc3")](c[tt("0x74")],t,Z);if(!C(o)||!C(u))continue;var p=y[tt("0xb")](o,u,V),g=y[tt("0x208")]($[tt("0x9")][tt("0x209")],p),p=y[tt("0xc")]($[tt("0x9")][tt("0x209")],p,V),m=A[tt("0x20a")](p,g-Math.PI,R),f=y[tt("0x11d")](o,u);d[tt("0x140")]=_[tt("0x21")](I[tt("0x23")](m,W),o,d[tt("0x140")])}else y[tt("0xba")](o,x[tt("0x3")])&&A[tt("0xba")](m,x[tt("0xc1")])||(C(m)?(d[tt("0x140")]=_[tt("0x21")](I[tt("0x23")](m,W),o,d[tt("0x140")]),x[tt("0x3")]=y[tt("0x57")](o,x[tt("0x3")]),x[tt("0xc1")]=A[tt("0x57")](m,x[tt("0xc1")])):(d[tt("0x140")]=$[tt("0x24")][tt("0x25")](o),x[tt("0x3")]=y[tt("0x57")](o,x[tt("0x3")])));d[tt("0x7a")]=!0,d[tt("0x1da")]=c,d[tt("0xed")]=f,d[tt("0x144")]=s,d[tt("0x146")]=l,d[tt("0x86")]=P[tt("0x206")](h[tt("0x1e7")],t,b[tt("0x148")]),d[tt("0x149")]=P[tt("0x206")](h[tt("0x1e8")],t,!0),d[tt("0x14a")]=P[tt("0x206")](h[tt("0x1e9")],t,!0),d[tt("0x14b")]=P[tt("0x206")](h[tt("0x1ea")],t,!0),d[tt("0x14c")]=G[tt("0xbf")](t,h[tt("0x14f")],d[tt("0x14c")]),d[tt("0x154")]=P[tt("0x206")](h[tt("0x1eb")],t,!0),d[tt("0x157")]=P[tt("0x206")](h[tt("0x1ec")],t,!0),d[tt("0x158")]=P[tt("0x206")](h[tt("0x1ed")],t,!0),d[tt("0x159")]=P[tt("0x206")](h[tt("0x1ee")],t,b[tt("0x148")]),d[tt("0x15a")]=P[tt("0x206")](h[tt("0x1ef")],t,1),d[tt("0x15b")]=P[tt("0x206")](h[tt("0x15c")],t,!0),d[tt("0x15f")]=P[tt("0x206")](h[tt("0x1f2")],t),d[tt("0x15e")]=P[tt("0x206")](h[tt("0x1f1")],t,b[tt("0x148")]),d[tt("0x15d")]=P[tt("0x206")](h[tt("0x1f0")],t,!0),d[tt("0x161")]=P[tt("0x206")](h[tt("0x1f3")],t,1)}else C(x)&&(x[tt("0x2f")][tt("0x7a")]=!1)}return!0},r[tt("0xa4")][tt("0x1f7")]=function(){return!1},r[tt("0xa4")][tt("0xb0")]=function(){for(var t=this[tt("0x201")][tt("0x4")],e=this[tt("0x200")],i=this[tt("0x1fe")],n=t[tt("0x2")]-1;-1<n;n--)c(t[n],e,i);return a(this)},r[tt("0xa4")][tt("0x1fc")]=function(t,e,i,n){for(var a,r=this[tt("0x201")],o=this[tt("0x200")],s=this[tt("0x1fe")],l=e[tt("0x2")]-1;-1<l;l--)a=e[l],C(a[tt("0x203")])&&C(a[tt("0x74")])&&r[tt("0x20b")](a.id,a);for(l=n[tt("0x2")]-1;-1<l;l--)a=n[l],C(a[tt("0x203")])&&C(a[tt("0x74")])?r[tt("0x20b")](a.id,a):(c(a,o,s),r[tt("0xd2")](a.id));for(l=i[tt("0x2")]-1;-1<l;l--)c(a=i[l],o,s),r[tt("0xd2")](a.id)},e[tt("0x1df")]=r},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0}),e[tt("0x1e0")]=void 0;var b=i(1),C=i(2),n=i(13),w=($[tt("0x79")],$[tt("0x2d")]),I=($[tt("0x20c")],$[tt("0x24")]),a=$[tt("0x134")],_=($[tt("0x20d")],$[tt("0x83")]),A=$[tt("0x20e")],G=$[tt("0x20f")],P=$[tt("0x9")],W=($[tt("0x138")],$[tt("0x29")]),M=$[tt("0x22")],Z=$[tt("0x11")],S=$[tt("0xc2")];function r(t){var e=this;if(!w(t))throw new a(tt("0x212"));var i=(this[tt("0x213")]=t)[tt("0x6a")],t=(this[tt("0x1fd")]=i,t[tt("0x214")]);this[tt("0x215")]=t,this[tt("0x1fe")]=i[tt("0x9d")],this[tt("0x216")]=void 0,this[tt("0x217")]=void 0,this[tt("0x218")]=[],t[tt("0x219")][tt("0x1fb")](function(){e[tt("0xdb")]()})}$[tt("0x1b8")],$[tt("0x210")],$[tt("0x211")];var V=new M,R=new Z,X=new P,F=new P,T=new P,B=new W;r[tt("0xa4")][tt("0x9e")]=function(t){return t instanceof n[tt("0x21a")]||(t=new n[tt("0x21a")](t)),this[tt("0x218")][tt("0x4c")](t),t},r[tt("0xa4")][tt("0xd2")]=function(t){t=this[tt("0x218")][tt("0x21b")](t);-1!==t&&this[tt("0x218")][tt("0xdd")](t,1)},r[tt("0xa4")][tt("0x21c")]=function(){this[tt("0x218")][tt("0x2")]=0},r[tt("0xa4")][tt("0xdb")]=function(){var t=this[tt("0x215")][tt("0x21d")],e=this[tt("0x218")],i=this[tt("0x1fe")],n=this[tt("0x216")],a=this[tt("0x217")],r=[],o=[];w(n)&&i[tt("0x21e")](n),w(a)&&i[tt("0x21e")](a);for(var s=0,l=e[tt("0x2")];s<l;s++){var c=e[s],h=c[tt("0x21f")];if(S[tt("0x206")](h[tt("0x7a")],t,!0)){var x=h[tt("0x114")],d=h[tt("0xed")],u=h[tt("0x1d4")],p=h[tt("0x13f")];if(w(x)&&S[tt("0x206")](c[tt("0x7a")],t,!0)){var g=S[tt("0xc3")](c[tt("0x3")],t,X);if(w(g)){var m,f=h[tt("0x1da")];if(w(f)){var f=S[tt("0xc3")](f[tt("0x3")],t,F);if(!w(g)||!w(f))continue;var v=P[tt("0xb")](g,f,T),y=P[tt("0x208")]($[tt("0x9")][tt("0x209")],v),v=P[tt("0xc")]($[tt("0x9")][tt("0x209")],v,T),v=W[tt("0x20a")](v,y,B),y=P[tt("0x11d")](g,f),d=1,y=Z[tt("0x21")]($[tt("0x22")][tt("0x220")](M[tt("0x23")](v,V),y,V),g,R)}else v=S[tt("0xc3")](c[tt("0xc1")],t,B),y=w(v)?Z[tt("0x21")](M[tt("0x23")](v,V),g,R):I[tt("0x25")](g,void 0,R);w(y)&&(f=c[tt("0x6b")],w(f)||(g=new b[tt("0x1b1")]({vertexFormat:$[tt("0x138")][tt("0x221")],angle:x,radius:d,stackPartitions:u,slicePartitions:p}),c[tt("0x6b")]=b[tt("0x1b1")][tt("0x55")](g),f=c[tt("0x6b")]),u=h[tt("0x82")],p=h[tt("0x7c")],m=h[tt("0x1d7")],w(m)||(m=1),g=h[tt("0x1d6")],w(g)||(g=_[tt("0x148")]),h=new $[tt("0x222")]({geometry:f,modelMatrix:y,attributes:{color:$[tt("0x20d")][tt("0x223")](u)}}),r[tt("0x4c")](h),p)&&(f=c[tt("0xd3")],w(f)||(u=new C[tt("0x1b7")]({vertexFormat:$[tt("0x138")][tt("0x192")],angle:x,radius:d}),c[tt("0xd3")]=C[tt("0x1b7")][tt("0x55")](u),f=c[tt("0xd3")]),h=new $[tt("0x222")]({geometry:f,modelMatrix:y,attributes:{color:$[tt("0x20d")][tt("0x223")](g)}}),o[tt("0x4c")](h))}}}}0<r[tt("0x2")]&&(this[tt("0x216")]=this[tt("0x1fe")][tt("0x9e")](new A({asynchronous:!1,geometryInstances:r,appearance:new G({flat:!1,translucent:!0,closed:!0})}))),0<o[tt("0x2")]&&(this[tt("0x217")]=this[tt("0x1fe")][tt("0x9e")](new A({asynchronous:!1,geometryInstances:o,appearance:new G({flat:!0,translucent:!0,renderState:{lineWidth:this[tt("0x1fd")][tt("0x224")](m)}})})))},e[tt("0x1e0")]=r},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0}),e[tt("0x21a")]=void 0;var n=i(3),a=$[tt("0x225")],r=$[tt("0x1b8")],o=$[tt("0x226")],i=$[tt("0x1ba")],s=$[tt("0x210")];function l(t){t=t||{},this[tt("0x74")]=void 0,this[tt("0x207")]=void 0,this[tt("0x78")]=void 0;var e=t[tt("0x227")];e instanceof n[tt("0x1dc")]||(e=new n[tt("0x1dc")](e)),this[tt("0x21f")]=e,this[tt("0x1ce")]=new s,this[tt("0x6b")]=void 0,this[tt("0xd3")]=void 0,this[tt("0x1d0")]=new r,this[tt("0x1d3")](t)}$[tt("0x211")],Object[tt("0xa3")](l[tt("0xa4")],{position:i(tt("0x3"),void 0,function(t){return new o(t)}),orientation:i(tt("0xc1")),show:i(tt("0x7a"))}),l[tt("0xa4")][tt("0x1d3")]=function(t){this[tt("0x3")]=t[tt("0x3")],this[tt("0xc1")]=t[tt("0xc1")],this[tt("0x7a")]=t[tt("0x7a")]},l[tt("0xa4")][tt("0x228")]=function(t){t instanceof a&&(this[tt("0x21f")][tt("0x1da")]=t)},e[tt("0x21a")]=l}],a={},n.m=i,n.c=a,n.d=function(t,e,i){n.o(t,e)||Object[tt("0x1d")](t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t[tt("0x1e")]?function(){return t[tt("0x131")]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object[tt("0xa4")][tt("0xa0")][tt("0x130")](t,e)},n.p="",n(n.s=4);function n(t){var e;return(a[t]||(e=a[t]={i:t,l:!1,exports:{}},i[t][tt("0x130")](e[tt("0x12d")],e,e[tt("0x12d")],n),e.l=!0,e))[tt("0x12d")]}var i,a},typeof R===tt("0x12c")&&typeof module===tt("0x12c")?module[tt("0x12d")]=e():typeof define===tt("0xbe")&&define[tt("0x12e")]?define([],e):typeof R===tt("0x12c")?R[tt("0x12f")]=e():t[tt("0x12f")]=e())}(),t[tt("0x256")]=!0}let n=null;function $(t,e){t&&(this._viewer=t,n=e,q(Window,n),this._customPluginLayer=new n.CustomDataSource("_customPluginLayer"),t)&&t.dataSources.add(this._customPluginLayer)}$.prototype={createRectangularSensorGraphics:function(t){var e,i;if(this._customPluginLayer&&t)return e=new n.HeadingPitchRoll(n.Math.toRadians(t.heading||90),n.Math.toRadians(t.pitch||0),n.Math.toRadians(t.roll||0)),i=t.position,this._customPluginLayer.entities.add({position:i,orientation:n.Transforms.headingPitchRollQuaternion(i,e),rectangularSensor:new n.Scene.RectangularSensorGraphics({radius:t.radius||1e5,xHalfAngle:n.Math.toRadians(t.xHalfAngle||45),yHalfAngle:n.Math.toRadians(t.yHalfAngle||45),material:t.material||new n.Color(1,0,1,.4),lineColor:t.lineColor||new n.Color(1,0,1,1),showScanPlane:t.showScanPlane||!0,scanPlaneColor:t.scanPlaneColor||new n.Color(1,0,1,1),scanPlaneMode:t.scanPlaneMode||"vertical",scanPlaneRate:t.scanPlaneRate||3,showThroughEllipsoid:t.showThroughEllipsoid||!1,show:!0})})},createSatelliteCoverageSimulationGraphics:function(t){if(t)return new n.Scene.SatelliteCoverageSimulation(this._viewer,{position:t.position,angle1:t.angle1||30,angle2:t.angle2||45,areaType:t.areaType||2,rotation:{heading:n.Math.toRadians(t.heading||0),pitch:n.Math.toRadians(t.pitch||0),roll:n.Math.toRadians(t.roll||0)},color:t.color||{red:.43137254901960786,green:.9607843137254902,blue:0,alpha:.8}})},createRadarPrimitive:function(t){if(t)return new n.Scene.RadarPrimitiveRight(this._viewer,{position:t.position,angle:t.angle||80,radius:t.radius||7e5,rotation:{heading:n.Math.toRadians(t.heading||0),pitch:n.Math.toRadians(t.pitch||40),roll:n.Math.toRadians(t.roll||0)},color:t.color||{red:1,green:0,blue:0,alpha:.4},lineColor:t.lineColor||{red:1,green:1,blue:1,alpha:.9}})}};let s,g,m=null,v={},w="move",A=null;function et(t,e){t&&(this._viewer=t,A=t,m=e,this._installFileDragDropHandler())}et.prototype={_installFileDragDropHandler(){function i(t,e){var i=document.createElement("div");i.id="fileDragDrop",i.classList.add("filedragdrop"),i.innerHTML="请将Json文件拖拽到此区域",this._dragBox=i,this._viewer=e,(this._parentDiv=t).appendChild(i),this.fileDragDropCallBack=void 0,this.callBackParms=void 0}i.prototype.startuploadfile=function(){var i=this,t=i._dragBox,e=null;document.ondragover=function(){clearTimeout(e),e=setTimeout(function(){t.innerHTML="请将文件拖拽到此区域"},200)},t.ondragenter=function(){t.innerHTML="请释放鼠标"},t.ondragover=function(){return!1},t.ondragleave=function(){t.innerHTML="请将文件拖拽到此区域"},t.ondrop=function(t){t.preventDefault();var t=t.dataTransfer.files[0],e=new FileReader;return e.readAsText(t,"UTF-8"),e.onload=function(){var t=JSON.parse(this.result);i.fileDragDropCallBack&&i.fileDragDropCallBack(i.callBackParms,t,i._viewer)},e.onloadstart=function(){},e.onloadend=function(){},e.onabort=function(){alert("读取数据中断")},!(e.onerror=function(){alert("读取数据失败")})}},m.Scene.FileDragDropMixin=function(t){var e=new i(document.querySelector(".cesium-viewer"),t);Object.defineProperties(t,{fileDragDropMixin:{get:function(){return e}}})}},showLoadDataToScenePanel(t){if(t=t||{}){let t=new c.GUI,a=this._viewer,e=t.addFolder("加载数据文件"),i=t=>{let e=document.createElement("input");e.type="file",e.className="datgui_upload",e.onchange=function(){"function"==typeof t&&e.files.length&&t(URL.createObjectURL(e.files[0]))},document.getElementsByTagName("body")&&document.getElementsByTagName("body")[0].appendChild(e),e.click()},n={point:()=>{i(t=>{m.GeoJsonDataSource.load(t).then(function(t){a.dataSources.add(t);for(var e=t.entities.values,i=0;i<e.length;i++){var n=e[i];n.nameID=i,n.point={color:m.Color.BLUE}}a.flyTo(t)})})},polyline:()=>{i(t=>{m.GeoJsonDataSource.load(t).then(function(t){a.dataSources.add(t);for(var e=t.entities.values,i=0;i<e.length;i++){var n=e[i];n.nameID=i,n.polyline.width=5,n.polyline.material=new m.PolylineGlowMaterialProperty({glowPower:.1,color:m.Color.ORANGERED.withAlpha(.9)})}a.flyTo(t)})})},polygon:()=>{i(t=>{m.GeoJsonDataSource.load(t).then(function(t){a.dataSources.add(t);for(var e=t.entities.values,i=0;i<e.length;i++){var n=e[i];n.nameID=i,n.polygon.width=10,n.polygon.material=m.Color.BLUE.withAlpha(.9)}a.flyTo(t)})})},model:()=>{i(t=>{a.flyTo(d3kit.createModelGraphics({position:m.Cartesian3.fromDegrees(120.38105869,31.10115627),m_url:t}))})},czml:()=>{i(t=>{a.flyTo(a.dataSources.add(m.CzmlDataSource.load(t)))})},"3dtilset":()=>{i(t=>{a.flyTo(a.scene.primitives.add(new m.Cesium3DTileset({url:t})))})}};e.add(n,"point"),e.add(n,"polyline"),e.add(n,"polygon"),e.add(n,"model"),e.add(n,"czml"),e.add(n,"3dtilset"),e.open()}},showPostProcessStagesPanel(t){t=t||{};let e=null,i=new function(){this.blackAndWhiteShow=!1,this.blackAndWhiteGradations=5,this.brightnessShow=!1,this.brightnessValue=.5,this.nightVisionShow=!1,this.silhouette=!1},n=(t&&t.elementId?(e=new c.GUI({autoPlace:!1}),document.getElementById(t.elementId).appendChild(e.domElement)):e=new c.GUI,this._viewer.scene.postProcessStages),a=n.add(m.PostProcessStageLibrary.createSilhouetteStage()),r=n.add(m.PostProcessStageLibrary.createBlackAndWhiteStage()),o=n.add(m.PostProcessStageLibrary.createBrightnessStage()),s=n.add(m.PostProcessStageLibrary.createNightVisionStage());a.uniforms.color=t.silhouetteColor||m.Color.YELLOW,a.enabled=!1,r.enabled=!1,r.uniforms.gradations=5,o.enabled=!1,o.uniforms.brightness=.5,s.enabled=!1,e.add(i,"blackAndWhiteShow").name("blackAndWhiteShow").onChange(function(t){r.enabled=t}),e.add(i,"blackAndWhiteGradations",0,10,.1).name("blackAndWhiteGradations").onChange(function(t){r.uniforms.gradations=t}),e.add(i,"brightnessShow").name("brightnessShow").onChange(function(t){o.enabled=t}),e.add(i,"brightnessValue",0,10,.1).name("brightnessValue").onChange(function(t){o.uniforms.brightness=t}),e.add(i,"nightVisionShow").name("nightVisionShow").onChange(function(t){s.enabled=t}),e.add(i,"silhouette").name("silhouette").onChange(function(t){a.enabled=t})},showSceneBloomPanel(t){let e=null,i=new function(){this.contrast=128,this.brightness=-.3,this.delta=1,this.gamma=3.5,this.enabled=!1,this.highDynamicRange=!1,this.shadows=!1,this.glowOnly=!1,this.sigma=1,this.stepSize=5},n=(t&&t.elementId?(e=new c.GUI({autoPlace:!1}),document.getElementById(t.elementId).appendChild(e.domElement)):e=new c.GUI,this._viewer),a=(e.__closeButton.innerHTML="收缩面板",n.scene.postProcessStages.bloom);e.add(i,"enabled").name("bloom").onChange(function(t){a.enabled=t}),e.add(i,"glowOnly").name("发光").onChange(function(t){a.uniforms.glowOnly=t}),e.add(i,"enabled").name("启用模糊").onChange(function(t){a.enabled=t}),e.add(i,"contrast",-255,255,.01).name("对比度").onChange(function(t){a.uniforms.contrast=t}),e.add(i,"brightness",-1,1,.01).name("光泽亮度").onChange(function(t){a.uniforms.brightness=t}),e.add(i,"delta",1,5,.01).name("因子").onChange(function(t){a.uniforms.delta=t}),e.add(i,"sigma",1,10,.01).name("sigma").onChange(function(t){a.uniforms.sigma=t}),e.add(i,"stepSize",.1,10).name("stepSize").onChange(function(t){a.uniforms.stepSize=t}),e.add(i,"shadows").name("启用阴影").onChange(function(t){n.shadows=t}),e.add(i,"highDynamicRange").name("高动态范围").onChange(function(t){n.scene.highDynamicRange=t}),e.add(i,"gamma",1,10,.01).name("伽马亮度").onChange(function(t){n.scene.gamma=t})},showPrimitiveMatrixPanel(e){let i=e.primitives._delegate||e.primitives,n=e.primitives,t=(this._viewer,null);e&&e.elementId?(t=new c.GUI({autoPlace:!1}),document.getElementById(e.elementId).appendChild(t.domElement)):t=new c.GUI;var a=t.addFolder("离地高度"),a=(a.add({height:100},"height",0,1e3,1).onChange(function(t){var e=n.boundingSphere,e=m.Cartographic.fromCartesian(e.center),i=m.Cartesian3.fromRadians(e.longitude,e.latitude,0),e=m.Cartesian3.fromRadians(e.longitude,e.latitude,t),t=m.Cartesian3.subtract(e,i,new m.Cartesian3);n.modelMatrix=m.Matrix4.fromTranslation(t)}),a.open(),t.addFolder("缩放大小")),r={"m+Scale":()=>{i.readyPromise.then(t=>{var e=t.root.transform;m.Matrix4.multiplyByUniformScale(e,1.2,e),t.root.transform=e})},"m-Scale":()=>{i.readyPromise.then(t=>{var e=t.root.transform;m.Matrix4.multiplyByUniformScale(e,.8,e),t.root.transform=e})}},r=(a.add(r,"m+Scale"),a.add(r,"m-Scale"),a.open(),{"x+Axis":()=>{var t=m.Matrix4.fromTranslation(new m.Cartesian3(20,0,0));m.Matrix4.multiply(i.modelMatrix,t,i.modelMatrix)},"x-Axis":()=>{var t=m.Matrix4.fromTranslation(new m.Cartesian3(-20,0,0));m.Matrix4.multiply(i.modelMatrix,t,i.modelMatrix)},"y+Axis":()=>{var t=m.Matrix4.fromTranslation(new m.Cartesian3(0,20,0));m.Matrix4.multiply(i.modelMatrix,t,i.modelMatrix)},"y-Axis":()=>{var t=m.Matrix4.fromTranslation(new m.Cartesian3(0,-20,0));m.Matrix4.multiply(i.modelMatrix,t,i.modelMatrix)},"z+Axis":()=>{var t=m.Matrix4.fromTranslation(new m.Cartesian3(0,0,20));m.Matrix4.multiply(i.modelMatrix,t,i.modelMatrix)},"z-Axis":()=>{var t=m.Matrix4.fromTranslation(new m.Cartesian3(0,0,-20));m.Matrix4.multiply(i.modelMatrix,t,i.modelMatrix)}}),a=t.addFolder("矩阵平移");a.add(r,"x+Axis"),a.add(r,"x-Axis"),a.add(r,"y+Axis"),a.add(r,"y-Axis"),a.add(r,"z+Axis"),a.add(r,"z-Axis"),a.open();let o={x:0,y:0,z:0},s={"x+Axis":()=>{o.x+=15,i.readyPromise.then(t=>{var e=m.Matrix3.fromRotationX(m.Math.toRadians(o.x)),e=m.Matrix4.fromRotationTranslation(e),i=m.Transforms.eastNorthUpToFixedFrame(t.boundingSphere.center);m.Matrix4.multiply(i,e,i),t._root.transform=i})},"x-Axis":()=>{o.x-=15,i.readyPromise.then(t=>{var e=m.Matrix3.fromRotationX(m.Math.toRadians(o.x)),e=m.Matrix4.fromRotationTranslation(e),i=m.Transforms.eastNorthUpToFixedFrame(t.boundingSphere.center);m.Matrix4.multiply(i,e,i),t._root.transform=i})},"y+Axis":()=>{o.y+=15,i.readyPromise.then(t=>{var e=m.Matrix3.fromRotationY(m.Math.toRadians(o.y)),e=m.Matrix4.fromRotationTranslation(e),i=m.Transforms.eastNorthUpToFixedFrame(t.boundingSphere.center);m.Matrix4.multiply(i,e,i),t._root.transform=i})},"y-Axis":()=>{o.y-=15,i.readyPromise.then(t=>{var e=m.Matrix3.fromRotationY(m.Math.toRadians(o.y)),e=m.Matrix4.fromRotationTranslation(e),i=m.Transforms.eastNorthUpToFixedFrame(t.boundingSphere.center);m.Matrix4.multiply(i,e,i),t._root.transform=i})},"z+Axis":()=>{o.z+=15,i.readyPromise.then(t=>{var e=m.Matrix3.fromRotationZ(m.Math.toRadians(o.z)),e=m.Matrix4.fromRotationTranslation(e),i=m.Transforms.eastNorthUpToFixedFrame(t.boundingSphere.center);m.Matrix4.multiply(i,e,i),t._root.transform=i})},"z-Axis":()=>{o.z-=15,i.readyPromise.then(t=>{var e=m.Matrix3.fromRotationZ(m.Math.toRadians(o.z)),e=m.Matrix4.fromRotationTranslation(e),i=m.Transforms.eastNorthUpToFixedFrame(t.boundingSphere.center);m.Matrix4.multiply(i,e,i),t._root.transform=i})}},l=t.addFolder("旋转矩阵");l.add(s,"x+Axis"),l.add(s,"x-Axis"),l.add(s,"y+Axis"),l.add(s,"y-Axis"),l.add(s,"z+Axis"),l.add(s,"z-Axis"),l.open(),e.cb&&((r=t.addFolder("获取调整后的模型矩阵")).add({getModelMaterix:()=>{i.readyPromise.then(t=>{t=t.root.transform;e.cb({modelTransformMatrix:t,modelMatrix:n.modelMatrix})})}},"getModelMaterix").name("获取模型矩阵"),r.open()),t.__closeButton.innerHTML="收缩面板"},showLayerParamPanel:function(e,i){if(e){let t=null;i&&i.elementId?(t=new c.GUI({autoPlace:!1}),document.getElementById(i.elementId).appendChild(t.domElement)):t=new c.GUI;var i=new function(){this.alpha=e.alpha,this.brightness=e.brightness,this.contrast=e.contrast,this.gamma=e.gamma,this.hue=e.hue,this.dayAlpha=e.dayAlpha,this.nightAlpha=e.nightAlpha,this.saturation=e.saturation},n=t.addFolder("图层调整");n.add(i,"alpha",0,1,.05).name("透明度").onChange(function(t){e.alpha=t}),n.add(i,"brightness",0,5,.05).name("亮度").onChange(function(t){e.brightness=t}),n.add(i,"contrast",0,5,.05).name("对比").onChange(function(t){e.contrast=t}),n.add(i,"gamma",0,5,.05).name("伽马").onChange(function(t){e.gamma=t}),n.add(i,"hue",0,5,.05).name("色调").onChange(function(t){e.hue=t}),n.add(i,"dayAlpha",0,1,.05).name("白天透明").onChange(function(t){e.dayAlpha=t}),n.add(i,"nightAlpha",0,1,.05).name("夜晚透明").onChange(function(t){e.nightAlpha=t}),n.add(i,"saturation",0,5,.05).name("饱和").onChange(function(t){e.saturation=t}),n.open()}},showLayerSwitchPanel:function(e,i){if(e&&e.length){let t=null;i&&i.elementId?(t=new c.GUI({autoPlace:!1}),document.getElementById(i.elementId).appendChild(t.domElement)):t=new c.GUI;var n=new function(){e.forEach(t=>{this[t.id]=t.show})},a=t.addFolder("图层切换"),r=(e.forEach(e=>{a.add(n,e.id).name(e.name).onChange(function(t){e.show=t})}),new function(){e.forEach(t=>{this[t.id]=t.alpha})}),o=t.addFolder("透明度");e.forEach(e=>{o.add(r,e.id,0,1,.05).name(e.name).onChange(function(t){e.alpha=t})}),a.open(),o.open()}},showSceneEffectEditPanel:function(t){var e,i,n;t=t||{},c.GUI&&this._viewer.scene.colorCorrection&&(n=new c.GUI,(e=this._viewer).scene.lightSource.ambientLightColor=t.ambientLightColor||new m.Color(.3,.3,.3,1),e.scene.colorCorrection.show=t.colorCorrection||!1,e.scene.colorCorrection.saturation=t.saturation||3.1,e.scene.colorCorrection.brightness=t.brightness||1.8,e.scene.colorCorrection.contrast=t.contrast||1.2,e.scene.colorCorrection.hue=t.hue||0,e.scene.bloomEffect.show=t.bloomEffect||!1,e.scene.hdrEnabled=t.hdrEnabled||!0,e.scene.bloomEffect.threshold=t.threshold||1,e.scene.bloomEffect.bloomIntensity=t.bloomIntensity||2,i=new function(){this.bloomEffectShow=t.bloomEffect||!1,this.bloomThreshold=t.threshold||1,this.bloomIntensity=t.bloomIntensity||2,this.ambientLightColor=t.ambientLightColor||.3,this.hdrEnabled=t.hdrEnabled||!0,this.colorCorrectionShow=!1,this.colorCorrectionSaturation=t.saturation||3.1,this.colorCorrectionBrightness=t.brightness||1.8,this.colorCorrectionContrast=t.contrast||1.2,this.colorCorrectionHue=t.hue||0},n=n.addFolder("场景效果"),console.log("sceneEffect:",i),n.add(i,"bloomEffectShow").name("泛光开关").onChange(function(t){e.scene.bloomEffect.show=t,e.scene.bloomEffect.threshold=i.bloomThreshold,e.scene.bloomEffect.bloomIntensity=i.bloomIntensity}),n.add(i,"bloomThreshold",0,1,.1).name("泛光阈值").onChange(function(t){e.scene.bloomEffect.threshold=t}),n.add(i,"bloomIntensity",0,10,.1).name("泛光强度").onChange(function(t){e.scene.bloomEffect.bloomIntensity=t}),n.add(i,"hdrEnabled").name("HDR开关").onChange(function(t){e.scene.hdrEnabled=t}),n.add(i,"colorCorrectionShow").name("颜色校正").onChange(function(t){e.scene.colorCorrection.show=t}),n.add(i,"colorCorrectionSaturation",0,5,.1).name("饱和度").onChange(function(t){e.scene.colorCorrection.saturation=t}),n.add(i,"colorCorrectionBrightness",0,5,.1).name("亮度").onChange(function(t){e.scene.colorCorrection.brightness=t}),n.add(i,"colorCorrectionContrast",0,5,.1).name("对比度").onChange(function(t){e.scene.colorCorrection.contrast=t}),n.add(i,"colorCorrectionHue",0,5,.1).name("色调").onChange(function(t){e.scene.hdrEnabled=t}),n.add(i,"colorCorrectionHue",0,1,.1).name("环境光").onChange(function(t){e.scene.lightSource.ambientLightColor=new m.Color(t,t,t,1)}),n.open())},showEntityOrientationEditPanel:function(i={}){if(i.entity){let e=i.entity;var t=new c.GUI,n=(i&&i.elementId?(t=new c.GUI({autoPlace:!1}),document.getElementById(i.elementId).appendChild(t.domElement)):t=new c.GUI,new function(){this.heading=360,this.pitch=1,this.roll=1}),t=t.addFolder("实体姿态调整"),a=this;t.add(n,"heading",0,360,1).name("角度").onChange(function(t){n.heading=t;t=m.Transforms.headingPitchRollQuaternion(e.position.getValue(a._viewer.clock.currentTime),new m.HeadingPitchRoll(m.Math.toRadians(n.heading),m.Math.toRadians(n.pitch),m.Math.toRadians(n.roll)));e.orientation=t,i.cb&&i.cb({orientation:t})}),t.add(n,"pitch",0,360,1).name("航向").onChange(function(t){n.pitch=t;t=m.Transforms.headingPitchRollQuaternion(e.position.getValue(a._viewer.clock.currentTime),new m.HeadingPitchRoll(m.Math.toRadians(n.heading),m.Math.toRadians(n.pitch),m.Math.toRadians(n.roll)));e.orientation=t,i.cb&&i.cb({orientation:t})}),t.add(n,"roll",0,360,1).name("翻转").onChange(function(t){n.roll=t;t=m.Transforms.headingPitchRollQuaternion(e.position.getValue(a._viewer.clock.currentTime),new m.HeadingPitchRoll(m.Math.toRadians(n.heading),m.Math.toRadians(n.pitch),m.Math.toRadians(n.roll)));e.orientation=t,i.cb&&i.cb({orientation:t})}),t.open()}},definedMouseEvent({targetEntity:t,ctrlFlag:e}){g=t,v=e,this.bindHandelEvent({leftDown:this.defLeftDown,mouseMove:this.defMouseMove,mouseWheel:this.defMouseWheel,leftUp:this.defLeftUp})},defMouseMove(e){if(v.leftDown&&s){let t=A.camera.getPickRay(e.endPosition),a=A.scene.globe.pick(t,A.scene);if(document.body.style.cursor="pointer",s&&s.id&&"move"===w){let t=m.JulianDate.fromDate(new Date),e=g.position.getValue(t),i=m.Cartographic.fromCartesian(e),n=Number(i.height.toFixed(3));g.position=new m.CallbackProperty(()=>{var t=A.scene.globe.ellipsoid.cartesianToCartographic(a),e=m.Math.toDegrees(t.longitude),t=m.Math.toDegrees(t.latitude);return m.Cartesian3.fromDegrees(e,t,n)},!1)}else{var i,n,r;s&&s.id&&"rotate"===w&&(n=m.JulianDate.fromDate(new Date),n=g.position.getValue(n),r=A.scene.camera.pickEllipsoid(e.startPosition),e=A.scene.camera.pickEllipsoid(e.endPosition),i=m.Cartesian3.subtract(n,e,new m.Cartesian3),i=m.Cartesian3.normalize(i,new m.Cartesian3),r=m.Cartesian3.subtract(r,n,new m.Cartesian3),e=m.Cartesian3.subtract(e,n,new m.Cartesian3),n=m.Cartesian3.angleBetween(r,e),r=m.Quaternion.fromAxisAngle(i,100*n),g.orientation=r)}}},defLeftDown(t){s=A.scene.pick(t.position),m.defined(s)&&w?(v.selected=!0,v.leftDown=!0):v.selected=!1},defMouseWheel(n){if(s&&s.id&&"scale"===w){let t=m.JulianDate.fromDate(new Date),e=g.box.dimensions.getValue(t),i=0<n?2:.5;g.box.dimensions=new m.CallbackProperty(()=>m.Cartesian3.multiplyByScalar(e,i,new m.Cartesian3),!1)}},defLeftUp(t){v.leftDown=!1,document.body.style.cursor="default"},manualMoveModel:function(t){w=t,this._viewer.scene.screenSpaceCameraController.enableRotate=!1,this._viewer.scene.screenSpaceCameraController.enableZoom=!0},manualRotateModel:function(t){w=t,this._viewer.scene.screenSpaceCameraController.enableRotate=!1,this._viewer.scene.screenSpaceCameraController.enableZoom=!0},manualScaleModel:function(t){w=t,this._viewer.scene.screenSpaceCameraController.enableZoom=!1}};let G=null;function it(t,e,i){t&&(this._viewer=t,G=e,this._pluginLayer=new G.CustomDataSource("pluginLayer"),t&&t.dataSources.add(this._pluginLayer),this._installPlugin())}it.prototype={_installPlugin:function(){this._installCss3Renderer(),this._installTerrainClipPlan()},_installTerrainClipPlan:function(){function t(t,e){this.viewer=t,this.options=e||{},this._positions=e.positions,this._height=this.options.height||0,this.bottomImg=e.bottomImg,this.wallImg=e.wallImg,this.splitNum=G.defaultValue(e.splitNum,50),this._positions&&0<this._positions.length&&this.updateData(this._positions)}Object.defineProperties(t.prototype,{show:{get:function(){return this._show},set:function(t){this._show=t,this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=t),this._switchExcavate(t)}},height:{get:function(){return this._height},set:function(t){this._height=t,this._updateExcavateDepth(t)}}}),t.prototype.updateData=function(t){var e=[],i=t.length-1,n=new G.Cartesian3,a=0<G.Cartesian3.subtract(t[0],t[1],n).x;this.excavateMinHeight=9999;for(var r=0;r<i;r++){var o=(r+1)%i,s=G.Cartesian3.midpoint(t[r],t[o],new G.Cartesian3),l=G.Cartographic.fromCartesian(t[r]),l=this.viewer.scene.globe.getHeight(l)||l.height;l<this.excavateMinHeight&&(this.excavateMinHeight=l);l=G.Cartesian3.normalize(s,new G.Cartesian3),o=a?G.Cartesian3.subtract(t[r],s,new G.Cartesian3):G.Cartesian3.subtract(t[o],s,new G.Cartesian3),o=(o=G.Cartesian3.normalize(o,o),G.Cartesian3.cross(o,l,new G.Cartesian3)),o=G.Cartesian3.normalize(o,o),l=new G.Plane(o,0),l=G.Plane.getPointDistance(l,s);e.push(new G.ClippingPlane(o,l))}this.viewer.scene.globe.clippingPlanes=new G.ClippingPlaneCollection({planes:e,edgeWidth:1,edgeColor:G.Color.WHITE,enabled:!0}),this._prepareWell(t),this._createWell(this.wellData)},t.prototype.clear=function(){this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=!1,this.viewer.scene.globe.clippingPlanes.removeAll(),this.viewer.scene.globe.clippingPlanes.isDestroyed()||this.viewer.scene.globe.clippingPlanes.destroy()),this.viewer.scene.globe.clippingPlanes=void 0,this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall),delete this.bottomSurface,delete this.wellWall,this.viewer.scene.render()},t.prototype._prepareWell=function(t){var e=this.splitNum,i=t.length;if(0!=i){for(var n=this.excavateMinHeight-this.height,a=[],r=[],o=[],s=0;s<i;s++){var l=s==i-1?0:s+1,c=G.Cartographic.fromCartesian(t[s]),l=G.Cartographic.fromCartesian(t[l]),h=[c.longitude,c.latitude],x=[l.longitude,l.latitude];0==s&&(o.push(new G.Cartographic(h[0],h[1])),r.push(G.Cartesian3.fromRadians(h[0],h[1],n)),a.push(G.Cartesian3.fromRadians(h[0],h[1],0)));for(var d=1;d<=e;d++){var u=G.Math.lerp(h[0],x[0],d/e),p=G.Math.lerp(h[1],x[1],d/e);s==i-1&&d==e||(o.push(new G.Cartographic(u,p)),r.push(G.Cartesian3.fromRadians(u,p,n)),a.push(G.Cartesian3.fromRadians(u,p,0)))}}this.wellData={lerp_pos:o,bottom_pos:r,no_height_top:a}}},t.prototype._createWell=function(r){var o,t;this.viewer.terrainProvider._layers?((o=this)._createBottomSurface(r.bottom_pos),t=G.sampleTerrainMostDetailed(this.viewer.terrainProvider,r.lerp_pos),G.when(t,function(t){for(var e=t.length,i=[],n=0;n<e;n++){var a=G.Cartesian3.fromRadians(t[n].longitude,t[n].latitude,t[n].height);i.push(a)}o._createWellWall(r.bottom_pos,i)})):(this._createBottomSurface(r.bottom_pos),this._createWellWall(r.bottom_pos,r.no_height_top))},t.prototype._getMinHeight=function(e){let i=5e6,n=null;for(let t=0;t<e.length;t++){var a=e[t].z;a<i&&(i=a,n=this._ellipsoidToLonLat(e[t]))}return n.altitude},t.prototype._ellipsoidToLonLat=function(t){var e=this.viewer.scene.globe.ellipsoid,t=new G.Cartesian3(t.x,t.y,t.z),e=e.cartesianToCartographic(t),t=G.Math.toDegrees(e.latitude);return{longitude:G.Math.toDegrees(e.longitude),latitude:t,altitude:e.height}},t.prototype._createBottomSurface=function(e){if(e.length){var i=this._getMinHeight(e),n=[];for(let t=0;t<e.length;t++){var a=this._ellipsoidToLonLat(e[t]);n.push(a.longitude),n.push(a.latitude),n.push(i)}var t=new G.PolygonGeometry({polygonHierarchy:new G.PolygonHierarchy(G.Cartesian3.fromDegreesArrayHeights(n)),perPositionHeight:!0}),t=G.PolygonGeometry.createGeometry(t),r=new G.Material({fabric:{type:"Image",uniforms:{image:this.bottomImg}}}),r=new G.MaterialAppearance({translucent:!1,flat:!0,material:r});this.bottomSurface=new G.Primitive({geometryInstances:new G.GeometryInstance({geometry:t}),appearance:r,asynchronous:!1}),this.viewer.scene.primitives.add(this.bottomSurface)}},t.prototype._createWellWall=function(t,e){var i=this._getMinHeight(t),n=[],a=[];for(let t=0;t<e.length;t++)n.push(this._ellipsoidToLonLat(e[t]).altitude),a.push(i);var t=new G.WallGeometry({positions:e,maximumHeights:n,minimumHeights:a}),t=G.WallGeometry.createGeometry(t),r=new G.Material({fabric:{type:"Image",uniforms:{image:this.wallImg}}}),r=new G.MaterialAppearance({translucent:!1,flat:!0,material:r});this.wellWall=new G.Primitive({geometryInstances:new G.GeometryInstance({geometry:t,attributes:{color:G.ColorGeometryInstanceAttribute.fromColor(G.Color.GREY)},id:"PitWall"}),appearance:r,asynchronous:!1}),this.viewer.scene.primitives.add(this.wellWall)},t.prototype._switchExcavate=function(t){t?(this.viewer.scene.globe.material=G.Material.fromType("WaJue"),this.wellWall.show=!0,this.bottomSurface.show=!0):(this.viewer.scene.globe.material=null,this.wellWall.show=!1,this.bottomSurface.show=!1)},t.prototype._updateExcavateDepth=function(t){this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall);for(var e=this.wellData.lerp_pos,i=[],n=e.length,a=0;a<n;a++)i.push(G.Cartesian3.fromRadians(e[a].longitude,e[a].latitude,this.excavateMinHeight-t));this.wellData.bottom_pos=i,this._createWell(this.wellData),this.viewer.scene.primitives.add(this.bottomSurface),this.viewer.scene.primitives.add(this.wellWall)},G.Scene.TerrainClipPlan=t},buildLightScanGraphics:function(t){if(this._viewer&&t){for(var l=this,e=function(e,t,i){var n,a,r,o,s,l,c=e.positionList,h=0,x=0;function d(t){n=c[t+1][0]-c[t][0],a=c[t+1][1]-c[t][1],r=n/e.number,o=a/e.number,x=0}d(h),t.polygon.hierarchy=new G.CallbackProperty(function(){return Math.abs(s)>=Math.abs(n)&&Math.abs(l)>=Math.abs(a)&&((h+=1)===c.length-1&&(h=0),i[0]=i[0]+s,i[1]=i[1]+l,i[2]=i[2]+s,i[3]=i[3]+l,d(h)),s=x*r,l=x*o,x++,new G.PolygonHierarchy(G.Cartesian3.fromDegreesArrayHeights([e.observer[0],e.observer[1],e.observer[2],i[0]+s,i[1]+l,0,i[2]+s,i[3]+l,0]))},!1)},i=l._getCirclePoints(t.circle[0],t.circle[1],t.circle[2],t.circle[3]),n=function(t,e){for(var i=e.observer[0],n=e.observer[1],a=e.observer[2],r=[],o=0;o<t.length;o++){var s=o===t.length-1?new G.PolygonHierarchy(G.Cartesian3.fromDegreesArrayHeights([i,n,a,t[o].x,t[o].y,0,t[0].x,t[0].y,0])):new G.PolygonHierarchy(G.Cartesian3.fromDegreesArrayHeights([i,n,a,t[o].x,t[o].y,0,t[o+1].x,t[o+1].y,0])),s=l._pluginLayer.entities.add({name:"三角形",polygon:{hierarchy:s,outline:!1,perPositionHeight:!0,material:e.material}});r.push(s)}return r}(i,t),a=0;a<n.length;a++)a!==n.length-1?e(t,n[a],[i[a].x,i[a].y,i[a+1].x,i[a+1].y]):e(t,n[a],[i[a].x,i[a].y,i[0].x,i[0].y]);return n}},buildPathRoaming:function(t){if(this._viewer&&t&&t.paths){for(var e=t.paths,i=this.createGraphics(),n=[],a=0;a<e.length;a++){var r=G.Cartesian3.fromDegrees(Number(e[a].lng),Number(e[a].lat),Number(e[a].alt));n.push(r)}if(i.position=this._createSampledPosition(n),i.name=t.name||"路径漫游",i.availability=new G.TimeIntervalCollection([new G.TimeInterval({start:this.startTime,stop:this.stopTime})]),i.orientation=this._sampleOrientation(),t.polyline){const{width:e,material:a,clampToGround:r,...o}=t.polyline;i.polyline={positions:new G.CallbackProperty(function(){return n},!1),width:e||10,material:a||new G.PolylineGlowMaterialProperty({glowPower:1,color:G.Color.RED}),clampToGround:r||!0,resOpt:o}}return t.model&&(i.model=this.getModelGraphics(t.model)),t.label&&(i.label=this.getLabelGraphics(t)),t.billboard&&(i.billboard=this.getBillboardGraphics(t)),this.droneEntity=i,this._beginRoamTrace(t),this._viewer.entities.add(i)}},_beginRoamTrace(i){this._viewer.clock.onTick.addEventListener(()=>{var t,e;this._viewer.clock.shouldAnimate&&(e=this._viewer.clock.currentTime,t=this.droneEntity.position.getValue(e),e=this.droneEntity.orientation.getValue(e),t)&&e&&(e=G.Matrix4.fromRotationTranslation(G.Matrix3.fromQuaternion(e),t),this._viewer.camera.lookAtTransform(e,i.cameraOffset()))})},_createSampledPosition(e){this.startTime=G.JulianDate.now(),this.stopTime=G.JulianDate.addSeconds(this.startTime,60*e.length,new G.JulianDate),this._viewer.clock.startTime=this.startTime.clone(),this._viewer.clock.stopTime=this.stopTime.clone(),this._viewer.clock.currentTime=this.startTime.clone(),this._viewer.clock.clockRange=G.ClockRange.CLAMPED;var i=new G.SampledPositionProperty;for(let t=0;t<e.length;t++){var n=G.JulianDate.addSeconds(this.startTime,60*t,new G.JulianDate),a=e[t];i.addSample(n,a)}return i},_sampleOrientation(){let a,r,o;return new G.CallbackProperty(t=>{var e=this.droneEntity.position.getValue(t);if(r=this.droneEntity.position.getValue(G.JulianDate.addSeconds(t,1/60,new G.JulianDate)),e&&r){a=e;const t=G.Cartesian3.subtract(r,a,new G.Cartesian3),i=G.Cartesian3.normalize(t,new G.Cartesian3),n=G.Transforms.rotationMatrixFromPositionVelocity(a,i,G.Ellipsoid.WGS84);o=G.Quaternion.fromRotationMatrix(n)}return o},!1)},_installCss3Renderer:function(){function t(t,e){this._scratch=new G.Cartesian2,this._viewer=i,this._scene=i.scene,this._camera=i.camera,this._container=null,this._elements=t,this._isBackHide=e,this.init()}var i;this._viewer&&(i=this._viewer,t.prototype.init=function(){var a=document.createElement("div"),r=(a.className="ys-css3-container",document.getElementById("info-warp").appendChild(a),this._container=a,this._elements.forEach(function(t){a.insertAdjacentHTML("beforeend",t.element)}),this);this._scene.preRender.addEventListener(function(){for(var t=0;t<a.children.length;t++){var e,i=G.Cartesian3.fromDegrees(r._elements[t].position[0],r._elements[t].position[1],r._elements[t].position[2]||0),n=r._scene.cartesianToCanvasCoordinates(i,r._scratch);G.defined(n)&&(a.children[t].style.left=parseFloat(n.x)+parseFloat(r._elements[t].offset[0])+"px",a.children[t].style.top=parseFloat(n.y)+parseFloat(r._elements[t].offset[1])+"px",r._isBackHide)&&(n=r._camera.position,e=r._scene.globe.ellipsoid.cartesianToCartographic(n).height,e+=+r._scene.globe.ellipsoid.maximumRadius,G.Cartesian3.distance(n,i)>e?a.children[t].style.display="none":a.children[t].style.display="block")}})},t.prototype.remove=function(t){this._elements=this._elements.filter(function(t){t.id}),this._container.removeChild(document.getElementById(t))},t.prototype.append=function(t){this._elements.push(t),this._container.insertAdjacentHTML("beforeend",t.element)},t.prototype.removeEntityLayer=function(t){this._viewer.entities.removeById(t+"_1"),this._viewer.entities.removeById(t+"_2"),this._viewer.entities.removeById(t+"_3"),this.remove(t)},t.prototype.addEntityLayer=function(t){var e=t.position[0],i=t.position[1],n=this,a=(setTimeout(function(t){},300),G.Math.toRadians(30)),r=G.Math.toRadians(30),o=t.boxHeight||300,s=t.boxHeightMax||400,l=t.boxHeightDif||10,c=!0;t.boxShow?this._viewer.entities.add({id:t.id+"_1",name:"立方体盒子",position:new G.CallbackProperty(function(){return(o+=l)>=s&&(o=s),G.Cartesian3.fromDegrees(e,i,o/2)},!1),box:{dimensions:new G.CallbackProperty(function(){return(o+=l)>=s&&(o=s,c)&&(c=!1,n.append(t,!0)),new G.Cartesian3(t.boxSide||100,t.boxSide||100,o)},!1),material:t.boxMaterial||G.Color.DEEPSKYBLUE.withAlpha(.5)}}):setTimeout(function(){n.append(t,!0)},100),t.circleShow&&(t.circleSize=t.circleSize||120,this._viewer.entities.add({id:t.id+"_2",name:"椭圆",position:G.Cartesian3.fromDegrees(e,i),ellipse:{semiMinorAxis:new G.CallbackProperty(function(){return.001},!1),semiMajorAxis:new G.CallbackProperty(function(){return.001},!1),material:this.getDfSt(["plugin","Css3Renderer_one"])||"static/data/images/Textures/circle2.png",rotation:new G.CallbackProperty(function(){return a+=.05},!1),stRotation:new G.CallbackProperty(function(){return a+=.05},!1),zIndex:2}}),this._viewer.entities.add({id:t.id+"_3",name:"椭圆",position:G.Cartesian3.fromDegrees(e,i),ellipse:{semiMinorAxis:new G.CallbackProperty(function(){return.001},!1),semiMajorAxis:new G.CallbackProperty(function(){return.001},!1),material:this.getDfSt(["plugin","Css3Renderer_two"])||"static/data/images/Textures/circle1.png",rotation:new G.CallbackProperty(function(){return r-=.03},!1),stRotation:new G.CallbackProperty(function(){return r-=.03},!1),zIndex:3}}))},G.Scene.Css3Renderer=t)}};let P=null;function nt(t,e,i){t&&(P=e,this._analysisLayer=new P.CustomDataSource("analysisLayer"),this.$math3d=new z(t,e),this.$graphics=new y(t,e),t)&&t.dataSources.add(this._analysisLayer)}function at(t){if(t&&t.positions){var e=t.positions,i=t.that,n=[],t=[],a=[],r=i.transformWGS84ToCartesian(e[0]),e=i.transformWGS84ToCartesian(e[1]),n=i.$graphics.createPointsGraphics({point:!0,positions:[r,e]}),o=i.$math3d.getIntersectObj(r,e,n,!0);if(0===o.length)return alert("没有取到相交点 , 请检查是否开启深度检测。"),!1;for(let t=o.length-1;0<=t;t--){const l=o[t];P.defined(l.position)||o.splice(t,1)}if(!P.defined(o[0].position))throw new P.DeveloperError("position is undefined");var s=o[0].position,l=P.Cartesian3.distance(s,e)<5,s=[r,o[0].position],s=i._analysisLayer.entities.add({polyline:{positions:s,width:10,arcType:P.ArcType.NONE,material:new P.PolylineArrowMaterialProperty(P.Color.GREEN)}});t.push(s),l||(s=[o[0].position,e],s=i._analysisLayer.entities.add({polyline:{positions:s,width:10,arcType:P.ArcType.NONE,material:new P.PolylineArrowMaterialProperty(P.Color.RED)}}),t.push(s));for(let t=0;t<o.length;++t){var c,h=o[t].object;h&&(h instanceof P.Cesium3DTileFeature?(a.push(h),h.oldColor=h.color.clone(),h.color=P.Color.fromAlpha(P.Color.YELLOW,h.color.alpha)):h.id instanceof P.Entity&&(c=(h=h.id).polygon||h.polyline,a.push(h),h=c.material.color.getValue(),c.oldColor=h.clone(),c.material=P.Color.fromAlpha(P.Color.YELLOW,h.alpha))),n.push(i._analysisLayer.entities.add({position:o[t].position,ellipsoid:{radii:new P.Cartesian3(.8,.8,.8),material:P.Color.RED}}))}var s=P.Cartographic.fromCartesian(r),t=P.Cartographic.fromCartesian(e),s={longitude:s.longitude/Math.PI*180,latitude:s.latitude/Math.PI*180,height:s.height},t={longitude:t.longitude/Math.PI*180,latitude:t.latitude/Math.PI*180,height:t.height},r=Math.sqrt(Math.pow(r.x-e.x,2)+Math.pow(r.y-e.y,2)+Math.pow(r.z-e.z,2)),e=Math.abs(t.height-s.height),x=Math.sqrt(Math.pow(r,2)+Math.pow(e,2)),l=l?"是":"否",s="起点坐标: ("+s.longitude.toFixed(6)+"°,"+s.latitude.toFixed(6)+"°,"+s.height.toFixed(2)+")\n终点坐标: ("+t.longitude.toFixed(6)+"°,"+t.latitude.toFixed(6)+"°,"+t.height.toFixed(2)+")\n垂直距离: "+e.toFixed(2)+"m\n水平距离: "+r.toFixed(2)+"m\n空间距离: "+x.toFixed(2)+"m\n是否可视: "+l;n&&n[0]&&(n[0].label={text:s,showBackground:!0,font:"14px monospace",fillColor:P.Color.YELLOW,pixelOffset:{x:0,y:-20},verticalOrigin:P.VerticalOrigin.BOTTOM,horizontalOrigin:P.HorizontalOrigin.LEFT})}at.prototype.remove=function(){}}function rt(t){if(!t&&!t.center&&!t.radius&&t.that)return alert("没有获取到分析参数"),!1;var l=t.that,e=this;if(!l._viewer.scene.globe.depthTestAgainstTerrain)return alert("请开启深度检测"),!1;var c=t.viewHeight||10,i=P.Cartographic.fromCartesian(t.center);try{var n=t.radius,a={},r=(a.semiMinorAxis=n,a.semiMajorAxis=n,a.rotation=0,a.center=t.center,a.granularity=Math.PI/45,l.computeEllipseEdgePositions(a));for(let t=0;t<r.outerPositions.length;t+=3){var o=new P.Cartesian3(r.outerPositions[t],r.outerPositions[t+1],r.outerPositions[t+2]),s=P.Cartographic.fromCartesian(o),h=5e-5*Math.PI/180,x=l.computeInterpolateLineCartographic(i,s,h);l.computeCartographicPointsTerrainData(x,function(r){if(0<r.length){let i=!0,n=[],a=[];for(let t=1;t<r.length;t++){let e=!0;if(1<t){var o=new P.Cartographic(r[0].longitude,r[0].latitude,r[0].height+c);if(i)e=l.computeInterpolateIndexLineHeightCartographic(o,r[t],t,t-1).height>=r[t-1].height?i=!0:i=!1;else{var s=l.computeInterpolateIndexLineHeightCartographic(o,r[t],t,t-1);for(let t=0;t<s.length;t++){if(!(s[t].height>=r[t].height)){i=!1,e=!1;break}i=!0,e=!0}}}o=P.Cartesian3.fromRadians(r[t].longitude,r[t].latitude,r[t].height+1);n.push(o),e?(a.push(0),a.push(0),a.push(1)):(a.push(1),a.push(0),a.push(0)),a.push(1)}e._pointsKSYResult=new P.Scene.PointsPrimitive({viewer:l._viewer,Cartesians:n,Colors:a})}else alert("高程异常!")})}}catch(t){console.log(t)}rt.prototype.remove=function(){}}function ot(t){if(t&&t.positions){for(var e=t.positions,i=t.that,n=i.transformWGS84ToCartesian(e[0]),a=i.transformWGS84ToCartesian(e[1]),r=[P.Cartographic.fromCartesian(n)],o=new P.Cartesian3,s=[0],l=[0],c=1;c<=10;c++){P.Cartesian3.lerp(n,a,c/10,o);var h=P.Cartographic.fromCartesian(o),x=i._viewer.scene.globe.getHeight(h),x=(h.height=x,r.push(h),r[c-1]),d=P.Cartesian3.distance(P.Cartographic.toCartesian(x),P.Cartographic.toCartesian(h));l.push(l[c-1]+d),h=Math.asin((h.height-x.height)/d),s.push(100*Math.tan(h))}t=document.createElement("div");t.className="echart-viewer",i._viewer.container.appendChild(t,"dark",{renderer:"canvas",width:640,height:480}),t.style.position="absolute",t.style.left="20px",t.style.bottom="20px",t.style.height="300px",t.style.width="640px",t.style.overflow="hidden",t.style.zIndex="9999",t.style.opacity=.9,u.init(t).setOption({title:{text:"剖面示意图",left:"center",subtext:"",textStyle:{color:"white",fontSize:15}},tooltip:{trigger:"axis"},legend:{data:[""]},toolbox:{show:!1,feature:{mark:{show:!0},dataView:{show:!0,readOnly:!1},magicType:{show:!0,type:["line","bar"]},restore:{show:!0},saveAsImage:{show:!0}}},calculable:!0,xAxis:[{type:"category",name:"长度(米)",boundaryGap:!1,data:l,axisLabel:{textStyle:{color:"white"}},axisLine:{lineStyle:{color:"white"}}}],yAxis:[{type:"value",name:"坡度(%)",axisLabel:{formatter:function(t){return t.toFixed(2)+"%"},textStyle:{color:"white"}},axisLine:{lineStyle:{color:"white"}}}],series:[{name:"坡度",type:"line",areaStyle:{},smooth:!0,data:s,markPoint:{data:[{type:"max",name:"最大值"},{type:"min",name:"最小值"}]},markLine:{data:[{type:"average",name:"平均值"}]}}]})}}function st(t){if(t&&t.positions&&t.that){var e=t.that,i=t.positions,t=this,n=e._viewer.terrainProvider.availability;if(n){for(var a=15e3,r=0;r<i.length;r++){var o=P.Cartographic.fromCartesian(i[r]),s=e._viewer.scene.globe.getHeight(o);s<a&&(a=s),n.computeMaximumLevelAtPosition(o)}var l=Math.PI/Math.pow(2,11);l/=64;for(var c,h,x,d,u,p,g,m,l=new P.PolygonGeometry.fromPositions({positions:i,vertexFormat:P.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,granularity:l}),f=new P.PolygonGeometry.createGeometry(l),v=0,y=0,b=new P.Cartesian3,r=0;r<f.indices.length;r+=3){c=f.indices[r],h=f.indices[r+1],u=f.indices[r+2],p=f.attributes.position.values,b.x=p[3*c],b.y=p[3*c+1],b.z=p[3*c+2],o=P.Cartographic.fromCartesian(b),c=e._viewer.scene.globe.getHeight(o),x=P.Cartesian3.fromRadians(o.longitude,o.latitude,c),g=P.Cartesian3.fromRadians(o.longitude,o.latitude,0),y<c&&(y=c),b.x=p[3*h],b.y=p[3*h+1],b.z=p[3*h+2],o=P.Cartographic.fromCartesian(b),h=e._viewer.scene.globe.getHeight(o),d=P.Cartesian3.fromRadians(o.longitude,o.latitude,h),w=P.Cartesian3.fromRadians(o.longitude,o.latitude,0),y<h&&(y=h),b.x=p[3*u],b.y=p[3*u+1],b.z=p[3*u+2],o=P.Cartographic.fromCartesian(b),p=e._viewer.scene.globe.getHeight(o),u=P.Cartesian3.fromRadians(o.longitude,o.latitude,p),m=P.Cartesian3.fromRadians(o.longitude,o.latitude,0),y<p&&(y=p),g=g,w=w,m=m,C=void 0,C=P.Cartesian3.distance(g,w),w=P.Cartesian3.distance(w,m),m=P.Cartesian3.distance(m,g),g=(C+w+m)/2,v+=Math.sqrt(g*(g-C)*(g-w)*(g-m))*(c-a+h-a+p-a)/3;var C=[],w=(C.push(x),C.push(d),C.push(u),{polygon:{hierarchy:{positions:C},extrudedHeight:0,perPositionHeight:!0,material:P.Color.fromRandom().withAlpha(.5),outline:!0,closeTop:!0,closeBottom:!0,outlineColor:P.Color.WHITE,outlineWidth:2}});e._analysisLayer.entities.add(w)}l=function(t){for(var e=[],i=[],n=0;n<t.length;n++){var a=P.Cartographic.fromCartesian(t[n]);e.push(a.longitude),i.push(a.latitude)}for(var r,o,s,l=0,c=0,h=0,x=0,d=0,n=0;n<t.length;n++)h+=s=(r=e[n])*(c=n==t.length-1?(l=e[0],i[0]):(l=e[n+1],i[n+1]))-l*(o=i[n]),x+=(r+l)*s,d+=(o+c)*s;return x/=6*(h*=.5),d/=6*h,new P.Cartographic(x,d)}(i),t._volumeLabel=e._analysisLayer.entities.add({position:P.Cartesian3.fromRadians(l.longitude,l.latitude,y+1e3),label:{text:"Cut Volume "+v.toString()+"m3"}})}else alert("未获取到地形")}}nt.prototype={createVisibilityAnalysis:function(i){i=i||{};var n=this;n.drawLineGraphics({type:"straightLine",clampToGround:!1,callback:function(t,e){t=new at({positions:t,that:n});n._graphicsLayer&&n._graphicsLayer.entities.remove(e),"function"==typeof i.callback&&i.callback(t)}})},createLookAroundAnalysis:function(i){var n;i=i||{},this._viewer&&i&&(n=this).drawCircleGraphics({callback:function(t,e){n._drawLayer.entities.remove(e);e=new rt({that:n,radius:t.radius,center:t.center});"function"==typeof i.callback&&i.callback(e)}})},createVisualFieldAnalysis:function(t){var i,n;t=t||{},this._viewer&&t&&(n=null,(i=this).bindHandelEvent({leftClick:function(t,e){t=i._viewer.scene.pickPosition(t.position);if(!t)return!1;P.defined(n)?e.destroy():(n=new P.Scene.ShadowPrimitive({scene:i._viewer.scene,viewerPosition:t}),i._analysisLayer._primitives.add(n))},mouseMove:function(t){t=i._viewer.scene.pickPosition(t.endPosition);if(!t)return!1;n&&n.setPoseByTargetPoint(t)}}))},createClipPlanAnalysis:function(i){var n,a,r,o,s;i=i||{},this._viewer&&i&&(n=this,a=i.height||30,r=i.splitNum||50,o=i.wallImg||this.getDfSt(["amalysis","createClipPlanAnalysis_wallImg"])||"static/data/images/file/excavate_side_min.jpg",s=i.bottomImg||this.getDfSt(["amalysis","createClipPlanAnalysis_bottomImg"])||"static/data/images/file/excavate_bottom_min.jpg",n.drawPolygonGraphics({callback:function(t,e){n._drawLayer.entities.remove(e);e=new P.Scene.TerrainClipPlan(n._viewer,{height:a,splitNum:r,wallImg:o,bottomImg:s}),t=n.transformWGS84ArrayToCartesianArray(t);e.updateData(t),"function"==typeof i.callback&&i.callback(e)}}))},createSubmergedAnalysis:function(t){var e,n,a,r,o;t=t||{},this._viewer&&t&&(n=t.maxH||15,a=t.speed||1,r=t.interval||10,o=(e=this).getDfSt(["amalysis","createSubmergedAnalysis"])||"static/data/images/file/water.png",e.drawPolygonGraphics({height:1,callback:function(t,i){if(!e._viewer.scene.globe.depthTestAgainstTerrain)return alert("请开启深度检测"),!1;i&&setTimeout(()=>{i.polygon.heightReference="CLAMP_TO_GROUND",i.polygon.material=o;var t=0,e=(i.polygon.extrudedHeight=t,setInterval(function(){(t+=a)>=n&&(t=n,clearTimeout(e)),i.polygon.extrudedHeight=t},r))},2e3)}}))},createSlopeAnalysis:function(i){if(i=i||{},!u)return alert("需要引入echarts库"),!1;var n=this;this._viewer&&i&&n.drawLineGraphics({type:"straightLine",clampToGround:!1,callback:function(t,e){t=new ot({positions:t,that:n});n._graphicsLayer&&n._graphicsLayer.entities.remove(e),"function"==typeof i.callback&&i.callback(t)}})},createCutVolumeAnalysis:function(e){var i;e=e||{},this._viewer&&e&&(i=this).drawWallGraphics({callback:function(t){t=new st({positions:i.transformWGS84ArrayToCartesianArray(t,100),that:i});"function"==typeof e.callback&&e.callback(t)}})}};var W={version:"1.0.0",PlotUtils:{}},M=(W.PlotUtils.distance=function(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))},W.PlotUtils.wholeDistance=function(t){for(var e=0,i=0;i<t.length-1;i++)e+=W.PlotUtils.distance(t[i],t[i+1]);return e},W.PlotUtils.getBaseLength=function(t){return Math.pow(W.PlotUtils.wholeDistance(t),.99)},W.PlotUtils.mid=function(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]},W.PlotUtils.getCircleCenterOfThreePoints=function(t,e,i){var n=[(t[0]+e[0])/2,(t[1]+e[1])/2],e=[n[0]-t[1]+e[1],n[1]+t[0]-e[0]],a=[(t[0]+i[0])/2,(t[1]+i[1])/2],t=[a[0]-t[1]+i[1],a[1]+t[0]-i[0]];return W.PlotUtils.getIntersectPoint(n,e,a,t)},W.PlotUtils.getIntersectPoint=function(t,e,i,n){var a,r,o;return t[1]==e[1]?[(a=(n[0]-i[0])/(n[1]-i[1]))*(t[1]-i[1])+i[0],r=t[1]]:i[1]==n[1]?[(o=(e[0]-t[0])/(e[1]-t[1]))*(i[1]-t[1])+t[0],r=i[1]]:(o=(e[0]-t[0])/(e[1]-t[1]),a=(n[0]-i[0])/(n[1]-i[1]),[o*(r=(o*t[1]-t[0]-a*i[1]+i[0])/(o-a))-o*t[1]+t[0],r])},W.PlotUtils.getAzimuth=function(t,e){var i,n=Math.asin(Math.abs(e[1]-t[1])/W.PlotUtils.distance(t,e));return e[1]>=t[1]&&e[0]>=t[0]?i=n+Math.PI:e[1]>=t[1]&&e[0]<t[0]?i=W.Constants.TWO_PI-n:e[1]<t[1]&&e[0]<t[0]?i=n:e[1]<t[1]&&e[0]>=t[0]&&(i=Math.PI-n),i},W.PlotUtils.getAngleOfThreePoints=function(t,e,i){t=W.PlotUtils.getAzimuth(e,t)-W.PlotUtils.getAzimuth(e,i);return t<0?t+W.Constants.TWO_PI:t},W.PlotUtils.isClockWise=function(t,e,i){return(i[1]-t[1])*(e[0]-t[0])>(e[1]-t[1])*(i[0]-t[0])},W.PlotUtils.getPointOnLine=function(t,e,i){return[e[0]+t*(i[0]-e[0]),e[1]+t*(i[1]-e[1])]},W.PlotUtils.getCubicValue=function(t,e,i,n,a){var r=1-(t=Math.max(Math.min(t,1),0)),o=t*t,s=o*t,l=r*r,c=l*r;return[c*e[0]+3*l*t*i[0]+3*r*o*n[0]+s*a[0],c*e[1]+3*l*t*i[1]+3*r*o*n[1]+s*a[1]]},W.PlotUtils.getThirdPoint=function(t,e,i,n,a){t=W.PlotUtils.getAzimuth(t,e),a=a?t+i:t-i,t=n*Math.cos(a),i=n*Math.sin(a);return[e[0]+t,e[1]+i]},W.PlotUtils.getArcPoints=function(t,e,i,n){for(var a=[],r=(r=n-i)<0?r+W.Constants.TWO_PI:r,o=0;o<=W.Constants.FITTING_COUNT;o++){var s=i+r*o/W.Constants.FITTING_COUNT,l=t[0]+e*Math.cos(s),s=t[1]+e*Math.sin(s);a.push([l,s])}return a},W.PlotUtils.getBisectorNormals=function(t,e,i,n){var a,r,o=W.PlotUtils.getNormal(e,i,n),s=Math.sqrt(o[0]*o[0]+o[1]*o[1]),l=o[0]/s,o=o[1]/s,c=W.PlotUtils.distance(e,i),h=W.PlotUtils.distance(i,n),s=s>W.Constants.ZERO_TOLERANCE?W.PlotUtils.isClockWise(e,i,n)?(a=[i[0]-(r=t*c)*o,i[1]+r*l],[i[0]+(r=t*h)*o,i[1]-r*l]):(a=[i[0]+(r=t*c)*o,i[1]-r*l],[i[0]-(r=t*h)*o,i[1]+r*l]):(a=[i[0]+t*(e[0]-i[0]),i[1]+t*(e[1]-i[1])],[i[0]+t*(n[0]-i[0]),i[1]+t*(n[1]-i[1])]);return[a,s]},W.PlotUtils.getNormal=function(t,e,i){var n=t[0]-e[0],t=t[1]-e[1],a=Math.sqrt(n*n+t*t),a=(n/=a,t/=a,i[0]-e[0]),i=i[1]-e[1],e=Math.sqrt(a*a+i*i);return[n+(a/=e),t+(i/=e)]},W.PlotUtils.getCurvePoints=function(t,e){for(var i=[W.PlotUtils.getLeftMostControlPoint(e)],n=0;n<e.length-2;n++)var a=e[n],r=e[n+1],o=e[n+2],o=W.PlotUtils.getBisectorNormals(t,a,r,o),i=i.concat(o);for(var s=W.PlotUtils.getRightMostControlPoint(e),l=(i.push(s),[]),n=0;n<e.length-1;n++){for(a=e[n],r=e[n+1],l.push(a),t=0;t<W.Constants.FITTING_COUNT;t++){var c=W.PlotUtils.getCubicValue(t/W.Constants.FITTING_COUNT,a,i[2*n],i[2*n+1],r);l.push(c)}l.push(r)}return l},W.PlotUtils.getLeftMostControlPoint=function(e){var i,n,a,r,o,s=e[0],l=e[1],e=e[2],c=W.PlotUtils.getBisectorNormals(0,s,l,e)[0],e=W.PlotUtils.getNormal(s,l,e),e=Math.sqrt(e[0]*e[0]+e[1]*e[1])>W.Constants.ZERO_TOLERANCE?(e=W.PlotUtils.mid(s,l),a=s[0]-e[0],i=s[1]-e[1],n=2/W.PlotUtils.distance(s,l),r=c[0]-e[0],c=c[1]-e[1],o=e[0]+((i=-n*i)*i-(n=n*a)*n)*r+(a=2*i*n)*c,e[1]+a*r+(n*n-i*i)*c):(o=s[0]+t*(l[0]-s[0]),s[1]+t*(l[1]-s[1]));return[o,e]},W.PlotUtils.getRightMostControlPoint=function(e){var i,n,a,r,o,s=e.length,l=e[s-3],c=e[s-2],e=e[s-1],s=W.PlotUtils.getBisectorNormals(0,l,c,e)[1],l=W.PlotUtils.getNormal(l,c,e),l=Math.sqrt(l[0]*l[0]+l[1]*l[1])>W.Constants.ZERO_TOLERANCE?(l=W.PlotUtils.mid(c,e),a=e[0]-l[0],i=e[1]-l[1],n=2/W.PlotUtils.distance(c,e),r=s[0]-l[0],s=s[1]-l[1],o=l[0]+((i=-n*i)*i-(n=n*a)*n)*r+(a=2*i*n)*s,l[1]+a*r+(n*n-i*i)*s):(o=e[0]+t*(c[0]-e[0]),e[1]+t*(c[1]-e[1]));return[o,l]},W.PlotUtils.getBezierPoints=function(t){if(t.length<=2)return t;for(var e=[],i=t.length-1,n=0;n<=1;n+=.01){for(var a=0,r=0,o=0;o<=i;o++){var s=W.PlotUtils.getBinomialFactor(i,o),l=Math.pow(n,o),c=Math.pow(1-n,i-o);a+=s*l*c*t[o][0],r+=s*l*c*t[o][1]}e.push([a,r])}return e.push(t[i]),e},W.PlotUtils.getBinomialFactor=function(t,e){return W.PlotUtils.getFactorial(t)/(W.PlotUtils.getFactorial(e)*W.PlotUtils.getFactorial(t-e))},W.PlotUtils.getFactorial=function(t){if(t<=1)return 1;if(2==t)return 2;if(3==t)return 6;if(4==t)return 24;if(5==t)return 120;for(var e=1,i=1;i<=t;i++)e*=i;return e},W.PlotUtils.getQBSplinePoints=function(t){if(t.length<=2)return t;var e=[],i=t.length-2-1;e.push(t[0]);for(var n=0;n<=i;n++)for(var a=0;a<=1;a+=.05){for(var r=0,o=0,s=0;s<=2;s++){var l=W.PlotUtils.getQuadricBSplineFactor(s,a);r+=l*t[n+s][0],o+=l*t[n+s][1]}e.push([r,o])}return e.push(t[t.length-1]),e},W.PlotUtils.getQuadricBSplineFactor=function(t,e){return 0==t?Math.pow(e-1,2)/2:1==t?(-2*Math.pow(e,2)+2*e+1)/2:2==t?Math.pow(e,2)/2:0},W.Constants={TWO_PI:2*Math.PI,HALF_PI:Math.PI/2,FITTING_COUNT:100,ZERO_TOLERANCE:1e-4},{version:"1.0.0",createTime:"2018.6.19",author:"xupinhui"}),lt="doublearrow",ct={headHeightFactor:.18,headWidthFactor:.3,neckHeightFactor:.85,neckWidthFactor:.15,tailWidthFactor:.1,headTailFactor:.8,swallowTailFactor:1},ht={tailWidthFactor:.15,neckWidthFactor:.2,headWidthFactor:.25,headAngle:Math.PI/8.5,neckAngle:Math.PI/13};M.algorithm={},M.algorithm.doubleArrow=function(t,e){this.connPoint=null;var i={controlPoint:this.tempPoint4=null,polygonalPoint:null};if(!((o=(this.points=t).length)<2)){if(2==o)return t;var n=this.points[0],a=this.points[1],r=this.points[2],o=t.length,o=(this.tempPoint4=3==o?M.algorithm.getTempPoint4(n,a,r):this.points[3],this.connPoint=3==o||4==o?W.PlotUtils.mid(n,a):this.points[4],t=W.PlotUtils.isClockWise(n,a,r)?(h=M.algorithm.getArrowPoints(n,this.connPoint,this.tempPoint4,!1),M.algorithm.getArrowPoints(this.connPoint,a,r,!0)):(h=M.algorithm.getArrowPoints(a,this.connPoint,r,!1),M.algorithm.getArrowPoints(this.connPoint,n,this.tempPoint4,!0)),h.length),s=(o-5)/2,l=h.slice(0,s),c=h.slice(s,5+s),h=h.slice(5+s,o),x=t.slice(0,s),d=t.slice(s,5+s),t=t.slice(5+s,o),x=W.PlotUtils.getBezierPoints(x),s=W.PlotUtils.getBezierPoints(t.concat(l.slice(1))),h=W.PlotUtils.getBezierPoints(h),o=x.concat(d,s,c,h),t=M.algorithm.array2Dto1D(o);i.controlPoint=[n,a,r,this.tempPoint4,this.connPoint],i.polygonalPoint=e.Cartesian3.fromDegreesArray(t)}return i},M.algorithm.threeArrow=function(t){this.connPoint=null,this.tempPoint4=null;var e={controlPoint:this.tempPoint5=null,polygonalPoint:null};if(2<=(r=(this.points=t).length)){if(2==r)return t;var i=this.points[0],n=this.points[1],a=this.points[2],r=(3==(r=t.length)?(this.tempPoint4=M.algorithm.getTempPoint4(i,n,a),this.tempPoint5=W.PlotUtils.mid(a,this.tempPoint4)):(this.tempPoint4=this.points[3],this.tempPoint5=this.points[4]),this.connPoint=r<6?W.PlotUtils.mid(i,n):this.points[5],t=W.PlotUtils.isClockWise(i,n,a)?(c=M.algorithm.getArrowPoints(i,this.connPoint,this.tempPoint4,!1),M.algorithm.getArrowPoints(this.connPoint,n,a,!0)):(c=M.algorithm.getArrowPoints(n,this.connPoint,a,!1),M.algorithm.getArrowPoints(this.connPoint,i,this.tempPoint4,!0)),c.length),o=(r-5)/2,s=c.slice(0,o),l=c.slice(o,5+o),c=c.slice(5+o,r),h=t.slice(0,o),x=t.slice(o,5+o),t=t.slice(5+o,r),h=W.PlotUtils.getBezierPoints(h),o=W.PlotUtils.getBezierPoints(t.concat(s.slice(1))),c=W.PlotUtils.getBezierPoints(c),r=h.concat(x,o,l,c),t=M.algorithm.array2Dto1D(r);e.controlPoint=[i,n,a,this.tempPoint4,this.tempPoint5,this.connPoint],e.polygonalPoint=Cesium.Cartesian3.fromDegreesArray(t)}return e},M.algorithm.array2Dto1D=function(t){var e=[];return t.forEach(function(t){e.push(t[0]),e.push(t[1])}),e},M.algorithm.getArrowPoints=function(t,e,i,n){this.type=lt,this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15;var a=W.PlotUtils.mid(t,e),r=W.PlotUtils.distance(a,i),o=W.PlotUtils.getThirdPoint(i,a,0,.3*r,!0),s=W.PlotUtils.getThirdPoint(i,a,0,.5*r,!0),o=[a,W.PlotUtils.getThirdPoint(a,o,W.Constants.HALF_PI,r/5,n),W.PlotUtils.getThirdPoint(a,s,W.Constants.HALF_PI,r/4,n),i],a=M.algorithm.getArrowHeadPoints(o,this.headHeightFactor,this.headWidthFactor,this.neckHeightFactor,this.neckWidthFactor),s=a[0],r=a[4],n=W.PlotUtils.distance(t,e)/W.PlotUtils.getBaseLength(o)/2,i=M.algorithm.getArrowBodyPoints(o,s,r,n),o=i.length,n=i.slice(0,o/2),i=i.slice(o/2,o);return n.push(s),i.push(r),(n=n.reverse()).push(e),(i=i.reverse()).push(t),n.reverse().concat(a,i)},M.algorithm.getArrowHeadPoints=function(t,e,i){this.type=lt,this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15;var n=W.PlotUtils.getBaseLength(t)*this.headHeightFactor,a=t[t.length-1],e=(W.PlotUtils.distance(e,i),n*this.headWidthFactor),i=n*this.neckWidthFactor,r=n*this.neckHeightFactor,n=W.PlotUtils.getThirdPoint(t[t.length-2],a,0,n,!0),t=W.PlotUtils.getThirdPoint(t[t.length-2],a,0,r,!0),r=W.PlotUtils.getThirdPoint(a,n,W.Constants.HALF_PI,e,!1),n=W.PlotUtils.getThirdPoint(a,n,W.Constants.HALF_PI,e,!0);return[W.PlotUtils.getThirdPoint(a,t,W.Constants.HALF_PI,i,!1),r,a,n,W.PlotUtils.getThirdPoint(a,t,W.Constants.HALF_PI,i,!0)]},M.algorithm.getArrowBodyPoints=function(t,e,i,n){for(var a=W.PlotUtils.wholeDistance(t),r=W.PlotUtils.getBaseLength(t)*n,o=(r-W.PlotUtils.distance(e,i))/2,s=0,l=[],c=[],h=1;h<t.length-1;h++){var x=W.PlotUtils.getAngleOfThreePoints(t[h-1],t[h],t[h+1])/2,d=(r/2-(s+=W.PlotUtils.distance(t[h-1],t[h]))/a*o)/Math.sin(x),u=W.PlotUtils.getThirdPoint(t[h-1],t[h],Math.PI-x,d,!0),x=W.PlotUtils.getThirdPoint(t[h-1],t[h],x,d,!1);l.push(u),c.push(x)}return l.concat(c)},M.algorithm.getTempPoint4=function(t,e,i){var n,a,r,e=W.PlotUtils.mid(t,e),o=W.PlotUtils.distance(e,i),i=W.PlotUtils.getAngleOfThreePoints(t,e,i),o=i<W.Constants.HALF_PI?(n=o*Math.sin(i),a=o*Math.cos(i),r=W.PlotUtils.getThirdPoint(t,e,W.Constants.HALF_PI,n,!1),W.PlotUtils.getThirdPoint(e,r,W.Constants.HALF_PI,a,!0)):i>=W.Constants.HALF_PI&&i<Math.PI?(n=o*Math.sin(Math.PI-i),a=o*Math.cos(Math.PI-i),r=W.PlotUtils.getThirdPoint(t,e,W.Constants.HALF_PI,n,!1),W.PlotUtils.getThirdPoint(e,r,W.Constants.HALF_PI,a,!1)):i>=Math.PI&&i<1.5*Math.PI?(n=o*Math.sin(i-Math.PI),a=o*Math.cos(i-Math.PI),r=W.PlotUtils.getThirdPoint(t,e,W.Constants.HALF_PI,n,!0),W.PlotUtils.getThirdPoint(e,r,W.Constants.HALF_PI,a,!0)):(n=o*Math.sin(2*Math.PI-i),a=o*Math.cos(2*Math.PI-i),r=W.PlotUtils.getThirdPoint(t,e,W.Constants.HALF_PI,n,!0),W.PlotUtils.getThirdPoint(e,r,W.Constants.HALF_PI,a,!1));return o},M.algorithm.tailedAttackArrow=function(t,e){t=M.algorithm.dereplication(t),this.tailWidthFactor=ct.tailWidthFactor,this.swallowTailFactor=ct.swallowTailFactor,this.swallowTailPnt=ct.swallowTailPnt;var i={controlPoint:null,polygonalPoint:null};if(!((i.controlPoint=t).length<2)){if(2==t.length)return i.polygonalPoint=t,i;var n=t[0],a=t[1],t=(W.PlotUtils.isClockWise(t[0],t[1],t[2])&&(n=t[1],a=t[0]),[W.PlotUtils.mid(n,a)].concat(t.slice(2))),r=M.algorithm.getAttackArrowHeadPoints(t,n,a,ct),o=r[0],s=r[4],l=W.PlotUtils.distance(n,a),c=W.PlotUtils.getBaseLength(t),h=c*this.tailWidthFactor*this.swallowTailFactor;this.swallowTailPnt=W.PlotUtils.getThirdPoint(t[1],t[0],0,h,!0);h=M.algorithm.getAttackArrowBodyPoints(t,o,s,l/c),t=h.length,l=[n].concat(h.slice(0,t/2));l.push(o);c=[a].concat(h.slice(t/2,t));c.push(s),l=W.PlotUtils.getQBSplinePoints(l),c=W.PlotUtils.getQBSplinePoints(c),n=M.algorithm.array2Dto1D(l.concat(r,c.reverse(),[this.swallowTailPnt,l[0]])),i.polygonalPoint=e.Cartesian3.fromDegreesArray(n)}return i},M.algorithm.getAttackArrowHeadPoints=function(t,e,i,n){this.headHeightFactor=n.headHeightFactor,this.headTailFactor=n.headTailFactor,this.headWidthFactor=n.headWidthFactor,this.neckWidthFactor=n.neckWidthFactor,this.neckHeightFactor=n.neckHeightFactor;var n=W.PlotUtils.getBaseLength(t)*this.headHeightFactor,a=t[t.length-1],r=W.PlotUtils.distance(a,t[t.length-2]),e=W.PlotUtils.distance(e,i),i=(n=n>e*this.headTailFactor?e*this.headTailFactor:n)*this.headWidthFactor,e=n*this.neckWidthFactor,r=(n=r<n?r:n)*this.neckHeightFactor,n=W.PlotUtils.getThirdPoint(t[t.length-2],a,0,n,!0),t=W.PlotUtils.getThirdPoint(t[t.length-2],a,0,r,!0),r=W.PlotUtils.getThirdPoint(a,n,W.Constants.HALF_PI,i,!1),n=W.PlotUtils.getThirdPoint(a,n,W.Constants.HALF_PI,i,!0);return[W.PlotUtils.getThirdPoint(a,t,W.Constants.HALF_PI,e,!1),r,a,n,W.PlotUtils.getThirdPoint(a,t,W.Constants.HALF_PI,e,!0)]},M.algorithm.getAttackArrowBodyPoints=function(t,e,i,n){for(var a=W.PlotUtils.wholeDistance(t),r=W.PlotUtils.getBaseLength(t)*n,o=(r-W.PlotUtils.distance(e,i))/2,s=0,l=[],c=[],h=1;h<t.length-1;h++){var x=W.PlotUtils.getAngleOfThreePoints(t[h-1],t[h],t[h+1])/2,d=(r/2-(s+=W.PlotUtils.distance(t[h-1],t[h]))/a*o)/Math.sin(x),u=W.PlotUtils.getThirdPoint(t[h-1],t[h],Math.PI-x,d,!0),x=W.PlotUtils.getThirdPoint(t[h-1],t[h],x,d,!1);l.push(u),c.push(x)}return l.concat(c)},M.algorithm.dereplication=function(t){var e=t[t.length-1],i=!1,n=[],n=t.filter(function(t){if(t[0]!=e[0]&&t[1]!=e[1])return t;i=!0});return i&&n.push(e),n},M.algorithm.fineArrow=function(t,e,i){var n,a,r,o,s,l,c;if(!(t.length<2||e.length<2))return n=ht.tailWidthFactor,c=ht.neckWidthFactor,s=ht.headWidthFactor,o=ht.headAngle,l=ht.neckAngle,(a=[])[0]=t,a[1]=e,t=a[0],e=a[1],c=(a=W.PlotUtils.getBaseLength(a))*c,s=a*s,n=W.PlotUtils.getThirdPoint(e,t,W.Constants.HALF_PI,a=a*n,!0),a=W.PlotUtils.getThirdPoint(e,t,W.Constants.HALF_PI,a,!1),r=W.PlotUtils.getThirdPoint(t,e,o,s,!1),o=W.PlotUtils.getThirdPoint(t,e,o,s,!0),s=W.PlotUtils.getThirdPoint(t,e,l,c,!1),l=W.PlotUtils.getThirdPoint(t,e,l,c,!0),(c=[]).push(n[0],n[1],s[0],s[1],r[0],r[1],e[0],e[1],o[0],o[1],l[0],l[1],a[0],a[1],t[0],t[1]),c.some(t=>isNaN(t))?"":i.Cartesian3.fromDegreesArray(c)};let xt=null;function i(t,e){this.viewer=t,xt=e,this.handler=new xt.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.fillMaterial=xt.Color.RED.withAlpha(.5),this.positions=[],this.state=-1,this.floatPoint=null,this.arrowEntity=null,this.pointArr=[],this.selectPoint=null,this.clickStep=0,this.modifyHandler=null,this.xp=M}i.prototype.clear=function(){this.state=0,this.firstPoint&&this.viewer.entities.remove(this.firstPoint),this.floatPoint&&this.viewer.entities.remove(this.floatPoint),this.arrowEntity&&this.viewer.entities.remove(this.arrowEntity),this.state=-1},i.prototype.disableHandler=function(){this.handler&&(this.handler.destroy(),this.handler=new xt.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)};let Z=null;function S(t,e){i.call(this,t,e),Z=e,this.type="AttackArrow",this.fillMaterial=Z.Color.RED.withAlpha(.5)}function dt(t,e){t=e.camera.getPickRay(t);return t?e.scene.globe.pick(t,e.scene):null}S.prototype={disable:function(){this.positions=[],this.arrowEntity&&(this.viewer.entities.remove(this.arrowEntity),this.arrowEntity=null),this.state=-1,this.handler&&(this.handler.destroy(),this.handler=new Z.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.floatPoint&&(this.viewer.entities.remove(this.floatPoint),this.floatPoint=null),this.selectPoint&&(this.viewer.entities.remove(this.selectPoint),this.selectPoint=null);for(var t=0;t<this.pointArr.length;t++)this.pointArr[t]&&this.viewer.entities.remove(this.pointArr[t]);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null),this.clickStep=0},startDraw:function(e){this.objId=Number((new Date).getTime()+""+Number(1e3*Math.random()).toFixed(0));var i=this;this.state=1,this.handler||(this.handler=new Z.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.handler.setInputAction(function(t){(t=dt(t.position,i.viewer))&&(0==i.positions.length&&(i.floatPoint=i.creatPoint(t),i.floatPoint.wz=-1),i.positions.push(t),t=i.creatPoint(t),2<i.positions.length?t.wz=i.positions.length-1:t.wz=i.positions.length,i.pointArr.push(t))},Z.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction(function(t){!i.floatPoint||i.positions.length<2||(t=dt(t.endPosition,i.viewer))&&(i.floatPoint.position.setValue(t),2<=i.positions.length)&&(Z.defined(i.arrowEntity)?(i.positions.pop(),i.positions.push(t)):(i.positions.push(t),i.arrowEntity=i.showArrowOnMap(i.positions),i.arrowEntity.objId=i.objId,e&&e(i.objId)))},Z.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(t){if(t=dt(t.position,i.viewer)){for(var e=0;e<i.pointArr.length;e++)i.pointArr[e].show=!1;i.floatPoint.show=!1,i.viewer.entities.remove(i.floatPoint),i.floatPoint=null;t=i.creatPoint(t);t.show=!1,t.wz=i.positions.length,i.pointArr.push(t),i.positions=[],i.pointArr=[],i.arrowEntity=null}},Z.ScreenSpaceEventType.RIGHT_CLICK)},createByData:function(t){this.positions=[],this.state=-1,this.floatPoint=null,this.pointArr=[],this.selectPoint=null,this.clickStep=0,this.modifyHandler=null;for(var e=[],i=0;i<t.length;i++){var n=Z.Cartesian3.fromDegrees(t[i][0],t[i][1]);e.push(n)}for(this.positions=e,i=0;i<this.positions.length;i++){var a=this.creatPoint(this.positions[i]);a.show=!1,a.wz=i+1,this.pointArr.push(a)}this.arrowEntity=this.showArrowOnMap(this.positions),this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var n=this,t=0;t<n.pointArr.length;t++)n.pointArr[t].show=!0;this.modifyHandler||(this.modifyHandler=new Z.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.modifyHandler.setInputAction(function(t){var e=n.viewer.scene.pick(t.position);if(Z.defined(e)&&e.id)n.clickStep++,e.id.objId||(n.selectPoint=e.id);else{for(var i=0;i<n.pointArr.length;i++)n.pointArr[i].show=!1;n.floatPoint&&(n.floatPoint.show=!1),n.state=-1,n.modifyHandler.destroy(),n.modifyHandler=null}2==n.clickStep&&(n.clickStep=0,e=dt(t.position,n.viewer))&&n.selectPoint&&(n.selectPoint.position.setValue(e),n.selectPoint=null)},Z.ScreenSpaceEventType.LEFT_CLICK),this.modifyHandler.setInputAction(function(t){(t=dt(t.endPosition,n.viewer))&&n.selectPoint&&(n.selectPoint.position.setValue(t),n.positions[n.selectPoint.wz-1]=t)},Z.ScreenSpaceEventType.MOUSE_MOVE)},getLnglats:function(){for(var t=[],e=0;e<this.positions.length;e++){var i=this.cartesianToLatlng(this.positions[e]);t.push(i)}return t},getPositions:function(){return this.positions},creatPoint:function(t){t=this.viewer.entities.add({position:t,point:{pixelSize:10,color:Z.Color.YELLOW}});return t.attr="editPoint",t},showArrowOnMap:function(r){var o=this;return this.viewer.entities.add({id:o.objId,polygon:new Z.PolygonGraphics({hierarchy:new Z.CallbackProperty(function(){if(r.length<3)return null;for(var t=[],e=0;e<r.length;e++){var i=o.cartesianToLatlng(r[e]);t.push(i)}var n=o.xp.algorithm.tailedAttackArrow(t,Z),a=[];return-1==JSON.stringify(n.polygonalPoint).indexOf("null")&&(a=n.polygonalPoint),new Z.PolygonHierarchy(a)},!1),show:!0,fill:!0,material:o.fillMaterial})})},cartesianToLatlng:function(t){var t=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(t),e=Z.Math.toDegrees(t.latitude);return[Z.Math.toDegrees(t.longitude),e]}},(S.prototype=Object.create(Object.assign({},S.prototype,i.prototype))).constructor=S;let V=null;function T(t,e){i.call(this,t,e),V=e,this.type="StraightArrow",this.fillMaterial=V.Color.fromCssColorString("#0000FF").withAlpha(.8)}function ut(t,e){t=e.camera.getPickRay(t);return t?e.scene.globe.pick(t,e.scene):null}T.prototype={disable:function(){this.positions=[],this.firstPoint&&(this.viewer.entities.remove(this.firstPoint),this.firstPoint=null),this.floatPoint&&(this.viewer.entities.remove(this.floatPoint),this.floatPoint=null),this.arrowEntity&&(this.viewer.entities.remove(this.arrowEntity),this.arrowEntity=null),this.state=-1,this.handler&&(this.handler.destroy(),this.handler=new V.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.selectPoint&&(this.viewer.entities.remove(this.selectPoint),this.selectPoint=null),this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null),this.clickStep=0},startDraw:function(e){this.objId=Number((new Date).getTime()+""+Number(1e3*Math.random()).toFixed(0));var i=this;this.state=1,this.handler.setInputAction(function(t){(t=ut(t.position,i.viewer))&&(0==i.positions.length&&(i.firstPoint=i.creatPoint(t),i.firstPoint.type="firstPoint",i.floatPoint=i.creatPoint(t),i.floatPoint.type="floatPoint",i.positions.push(t)),i.firstPoint.position.setValue(t),i.firstPoint.show=!0,i.positions&&3==i.positions.length&&(i.firstPoint.show=!1,i.positions=[],i.pointArr=[],i.arrowEntity=null),i.positions.push(t.clone()))},V.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction(function(t){i.positions.length<1||(t=ut(t.endPosition,i.viewer))&&(i.floatPoint.position.setValue(t),2<=i.positions.length)&&(V.defined(i.arrowEntity)?(i.positions.pop(),i.positions.push(t)):(i.positions.push(t),i.arrowEntity=i.showArrowOnMap(i.positions),e&&e(i.objId)))},V.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(t){(t=ut(t.position,i.viewer))&&(i.firstPoint.show=!1,i.positions=[],i.pointArr=[],i.arrowEntity=null,i.positions.push(t.clone()))},V.ScreenSpaceEventType.RIGHT_CLICK)},startModify:function(){this.state=2,this.firstPoint.show=!0,this.floatPoint.show=!0;var i=this;this.clickStep=0,this.modifyHandler||(this.modifyHandler=new V.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.modifyHandler.setInputAction(function(t){var e=i.viewer.scene.pick(t.position);V.defined(e)&&e.id?(i.clickStep++,e.id.objId||(i.selectPoint=e.id)):(i.modifyHandler.destroy(),i.modifyHandler=null,i.firstPoint.show=!1,i.floatPoint.show=!1,i.state=-1),2==i.clickStep&&(i.clickStep=0,e=ut(t.position,i.viewer))&&i.selectPoint&&(i.selectPoint.position.setValue(e),i.selectPoint=null)},V.ScreenSpaceEventType.LEFT_CLICK),this.modifyHandler.setInputAction(function(t){i.selectPoint&&(t=ut(t.endPosition,i.viewer))&&(i.selectPoint.position.setValue(t),"firstPoint"==i.selectPoint.type&&(i.positions[1]=t),"floatPoint"==i.selectPoint.type)&&(i.positions[2]=t)},V.ScreenSpaceEventType.MOUSE_MOVE)},createByData:function(t){this.state=-1,this.positions=[];for(var e=[],i=0;i<t.length;i++){var n=V.Cartesian3.fromDegrees(t[i][0],t[i][1]);e.push(n)}this.positions=e,this.firstPoint=this.creatPoint(this.positions[1]),this.firstPoint.type="firstPoint",this.floatPoint=this.creatPoint(this.positions[2]),this.floatPoint.type="floatPoint",this.arrowEntity=this.showArrowOnMap(this.positions),this.firstPoint.show=!1,this.floatPoint.show=!1,this.arrowEntity.objId=this.objId},getLnglats:function(){for(var t=[],e=0;e<this.positions.length;e++){var i=this.cartesianToLatlng(this.positions[e]);t.push(i)}return t},getPositions:function(){return this.positions},creatPoint:function(t){t=this.viewer.entities.add({position:t,point:{pixelSize:10,color:V.Color.YELLOW}});return t.attr="editPoint",t},showArrowOnMap:function(o){var s=this;return this.viewer.entities.add({id:s.objId,polygon:new V.PolygonGraphics({hierarchy:new V.CallbackProperty(function(){if(o.length<2)return null;var t=o[1],e=o[2],t=s.cartesianToLatlng(t),e=s.cartesianToLatlng(e),i=[],n=s.xp.algorithm.fineArrow([t[0],t[1]],[e[0],e[1]],V);if(-1!=JSON.stringify(n).indexOf("null"))return[];for(var a=0;a<n.length;a++){var r=new V.Cartesian3(n[a].x,n[a].y,n[a].z);i.push(r)}return new V.PolygonHierarchy(i)},!1),show:!0,fill:!0,material:s.fillMaterial})})},cartesianToLatlng:function(t){var t=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(t),e=V.Math.toDegrees(t.latitude);return[V.Math.toDegrees(t.longitude),e]}},(T.prototype=Object.create(Object.assign({},T.prototype,i.prototype))).constructor=T;let B=null;function D(t,e){i.call(this,t,e),B=e,this.type="PincerArrow",this.fillMaterial=B.Color.YELLOW.withAlpha(.8)}function pt(t,e){t=e.camera.getPickRay(t);return t?e.scene.globe.pick(t,e.scene):null}D.prototype={disable:function(){this.positions=[],this.arrowEntity&&(this.viewer.entities.remove(this.arrowEntity),this.arrowEntity=null),this.state=-1,this.handler&&(this.handler.destroy(),this.handler=new B.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.floatPoint&&(this.viewer.entities.remove(this.floatPoint),this.floatPoint=null),this.selectPoint&&(this.viewer.entities.remove(this.selectPoint),this.selectPoint=null);for(var t=0;t<this.pointArr.length;t++)this.pointArr[t]&&this.viewer.entities.remove(this.pointArr[t]);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null),this.clickStep=0},startDraw:function(e){this.objId=Number((new Date).getTime()+""+Number(1e3*Math.random()).toFixed(0));var n=this;this.state=1,this.handler.setInputAction(function(t){if(t=pt(t.position,n.viewer))if(0==n.positions.length&&(n.floatPoint=n.creatPoint(t)),4<n.positions.length){(i=n.creatPoint(t)).wz=n.positions.length,n.pointArr.push(i);for(var e=0;e<n.pointArr.length;e++)n.pointArr[e].show=!1;n.floatPoint&&(n.floatPoint.show=!1,n.viewer.entities.remove(n.floatPoint),n.floatPoint=null),n.positions=[],n.pointArr=[],n.arrowEntity=null}else{n.positions.push(t);var i=n.creatPoint(t);2<n.positions.length?i.wz=n.positions.length-1:i.wz=n.positions.length,n.pointArr.push(i)}},B.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction(function(t){!n.floatPoint||n.positions.length<2||(t=pt(t.endPosition,n.viewer))&&(n.floatPoint.position.setValue(t),2<=n.positions.length)&&(B.defined(n.arrowEntity)?(n.positions.pop(),n.positions.push(t)):(n.positions.push(t),n.arrowEntity=n.showArrowOnMap(n.positions),n.arrowEntity.objId=n.objId,e&&e(n.objId)))},B.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(t){if(4<=n.positions.length&&(t=pt(t.position,n.viewer))){for(var e=0;e<n.pointArr.length;e++)n.pointArr[e].show=!1;n.floatPoint.show=!1,n.viewer.entities.remove(n.floatPoint),n.floatPoint=null;t=n.creatPoint(t);t.show=!1,t.wz=n.positions.length,n.pointArr.push(t),n.positions=[],n.pointArr=[],n.arrowEntity=null}},B.ScreenSpaceEventType.RIGHT_CLICK)},createByData:function(t){this.positions=[],this.state=-1,this.floatPoint=null,this.pointArr=[],this.selectPoint=null,this.clickStep=0,this.modifyHandler=null;for(var e=[],i=0;i<t.length;i++){var n=B.Cartesian3.fromDegrees(t[i][0],t[i][1]);e.push(n)}for(this.positions=e,i=0;i<this.positions.length;i++){var a=this.creatPoint(this.positions[i]);a.show=!1,a.wz=i+1,this.pointArr.push(a)}this.arrowEntity=this.showArrowOnMap(this.positions),this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var n=this,t=0;t<n.pointArr.length;t++)n.pointArr[t].show=!0;this.modifyHandler||(this.modifyHandler=new B.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.modifyHandler.setInputAction(function(t){var e=n.viewer.scene.pick(t.position);if(B.defined(e)&&e.id)n.clickStep++,e.id.objId||(n.selectPoint=e.id);else{for(var i=0;i<n.pointArr.length;i++)n.pointArr[i].show=!1;n.state=-1,n.modifyHandler.destroy(),n.modifyHandler=null}2==n.clickStep&&(n.clickStep=0,e=pt(t.position,n.viewer))&&n.selectPoint&&(n.selectPoint.position.setValue(e),n.selectPoint=null)},B.ScreenSpaceEventType.LEFT_CLICK),this.modifyHandler.setInputAction(function(t){(t=pt(t.endPosition,n.viewer))&&n.selectPoint&&(n.selectPoint.position.setValue(t),n.positions[n.selectPoint.wz-1]=t)},B.ScreenSpaceEventType.MOUSE_MOVE)},getLnglats:function(){for(var t=[],e=0;e<this.positions.length;e++){var i=this.cartesianToLatlng(this.positions[e]);t.push(i)}return t},getPositions:function(){return this.positions},creatPoint:function(t){return this.viewer.entities.add({position:t,point:{pixelSize:10,color:B.Color.YELLOW}})},showArrowOnMap:function(r){var o=this;return this.viewer.entities.add({id:o.objId,polygon:new B.PolygonGraphics({hierarchy:new B.CallbackProperty(function(){if(r.length<3)return null;for(var t=[],e=0;e<r.length;e++){var i=o.cartesianToLatlng(r[e]);t.push(i)}var n=o.xp.algorithm.doubleArrow(t,B),a=[];return-1==JSON.stringify(n.polygonalPoint).indexOf("null")&&(a=n.polygonalPoint),new B.PolygonHierarchy(a)},!1),show:!0,fill:!0,material:o.fillMaterial})})},cartesianToLatlng:function(t){var t=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(t),e=B.Math.toDegrees(t.latitude);return[B.Math.toDegrees(t.longitude),e]}},(D.prototype=Object.create(Object.assign({},D.prototype,i.prototype))).constructor=D;let k=null;function gt(t,e,i){t&&(this._viewer=t,k=e,this._installPlugin())}gt.prototype={_installPlugin:function(){this._installCounputeVertex(),this._installCylinderGeometry(),this._installRadarPrimitive()},_installCylinderGeometry:function(){function _(t){this.length=t.length,this.topRadius=t.topRadius,this.bottomRadius=t.bottomRadius,this.slices=t.slices||64,this.zReverse=t.zReverse}var G=new k.Cartesian2,A=new k.Cartesian3,P=new k.Ray;_._createGeometry=function(t){var e=t.length,i=t.topRadius,n=t.bottomRadius,a=t.slices,r=2*Math.PI/(a-1),o=[],s=[],l=[],c=[],h=[n,i],x=[0,t.zReverse?-e:e],d=0,t=Math.atan2(n-i,e),u=G;u.z=Math.sin(t);for(var p=Math.cos(t),g=0;g<x.length;g++){c[g]=[];for(var m=h[g],f=0;f<a;f++){c[g].push(d++);var v=r*f,y=m*Math.cos(v),b=m*Math.sin(v);o.push(y,b,x[g]),y=p*Math.cos(v),b=p*Math.sin(v),s.push(y,b,u.z),l.push(g/(x.length-1),0)}}for(var C=[],g=1;g<x.length;g++)for(f=1;f<a;f++){var w=c[g-1][f-1],I=c[g][f-1],_=c[g][f],A=c[g-1][f];C.push(_),C.push(A),C.push(w),C.push(_),C.push(w),C.push(I),f==c[g].length-1&&(w=c[g-1][f],I=c[g][f],_=c[g][0],A=c[g-1][0],C.push(_),C.push(A),C.push(w),C.push(_),C.push(w),C.push(I))}C=new Int16Array(C),o=new Float32Array(o),s=new Float32Array(s),l=new Float32Array(l),n={position:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o}),normal:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:s}),st:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:l})},i=k.BoundingSphere.fromVertices(o),e=new k.Geometry({attributes:n,indices:C,primitiveType:k.PrimitiveType.TRIANGLES,boundingSphere:i});return o=[],C=[],l=[],e},_.createGeometry=function(t,e){if(!e)return _._createGeometry(t);k.Matrix4.multiplyByPoint(e,k.Cartesian3.ZERO,A),A.clone(P.origin);var i=t.length,n=t.topRadius,a=(t.bottomRadius,t.slices),r=2*Math.PI/(a-1),o=[],s=[],l=[],c=[],h=[0,t.zReverse?-i:i],x=0,x=0;o.push(0,0,0),s.push(1,1),x++;for(var d=new k.Cartesian3,u=n/15,p=0;p<16;p++){for(var g=u*p,m=[],f=0;f<a;f++){var v=r*f,y=g*Math.cos(v),v=g*Math.sin(v);d.x=y,d.y=v,d.z=h[1],(0,k.Scene.extend2Earth)(d,e,P)?(m.push(x),o.push(y,v,h[1]),s.push(p/15,1),x++):m.push(-1)}c.push(m)}for(var b,C,w=[0,c.length-1],I=0;I<w.length;I++)for(p=w[I],f=1;f<c[p].length;f++)b=c[p][f-1],C=c[p][f],0<=b&&0<=C&&l.push(0,b,C);o=new Float32Array(o),l=new Int32Array(l),s=new Float32Array(s),t={position:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o}),st:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:s})},i=k.BoundingSphere.fromVertices(o),n=new k.Geometry({attributes:t,indices:l,primitiveType:k.PrimitiveType.TRIANGLES,boundingSphere:i});return(0,k.Scene.computeVertexNormals)(n),o=[],l=[],n},_.createOutlineGeometry=function(t){var e=t.length,i=t.topRadius,n=t.bottomRadius,a=t.slices,r=2*Math.PI/(a-1),o=[],s=[],l=[],c=[],h=[n,i],x=[0,t.zReverse?-e:e],d=0,t=Math.atan2(n-i,e),u=G;u.z=Math.sin(t);for(var p=Math.cos(t),g=0;g<x.length;g++){c[g]=[];for(var m=h[g],f=0;f<a;f++){c[g].push(d++);var v=r*f,y=m*Math.cos(v),b=m*Math.sin(v);o.push(y,b,x[g]),y=p*Math.cos(v),b=p*Math.sin(v),s.push(y,b,u.z),l.push(g/(x.length-1),0)}}for(var C=[],g=1;g<x.length;g++)for(f=1;f<a;f+=1){var w=c[g-1][f-1],I=c[g][f-1];c[g][f],c[g-1][f],f%8==1&&C.push(w,I)}C=new Int16Array(C),o=new Float32Array(o),s=new Float32Array(s),l=new Float32Array(l),n={position:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o}),normal:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:s}),st:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:l})},i=k.BoundingSphere.fromVertices(o),e=new k.Geometry({attributes:n,indices:C,primitiveType:k.PrimitiveType.LINES,boundingSphere:i});return o=[],C=[],l=[],e},_.fromAngleAndLength=function(t,e,i){return t=k.Math.toRadians(t),new _({topRadius:Math.tan(t)*e/2,bottomRadius:0,length:e,zReverse:i})},k.Scene.CylinderGeometry=_},_installRadarPrimitive:function(){var i;function t(t,e){e=e||{},i=t.scene.globe.ellipsoid,this._geometry=null,this._angle=e.angle,this._radius=e.radius||5,this._position=e.position,this._rotation=e.rotation||{heading:0,pitch:0,roll:0},this._trackedEntity=e.trackedEntity,this.defaultColor=e.color||k.Color.YELLOW,this.defaultLineColor=e.lineColor||this.defaultColor,this._show=k.defaultValue(e.show,!0),this._outline=k.defaultValue(e.outline,!1),this._topShow=k.defaultValue(e.top,!0),this._topOutline=k.defaultValue(e.topOutline,!0),this._modelMatrix=k.Matrix4.clone(k.Matrix4.IDENTITY),this._quaternion=new k.Quaternion,this._translation=new k.Cartesian3,this._scale=new k.Cartesian3(1,1,1),this._matrix=new k.Matrix4,this._inverseMatrix=new k.Matrix4,this._positionCartographic=new k.Cartographic,this._positionCartesian=null,this._drawCommands=[],this._outlinePositions=[],this.viewer=t,this.viewer.scene.primitives.add(this),this.updateGeometry(),this._groundArea=k.defaultValue(e.groundArea,!1),this.addGroundAreaEntity(this._groundArea)}Object.defineProperties(t.prototype,{trackedEntity:{get:function(){return this._trackedEntity},set:function(t){this._trackedEntity=t}},color:{get:function(){return this.defaultColor},set:function(t){this.defaultColor=t}},lineColor:{get:function(){return this.defaultLineColor},set:function(t){this.defaultLineColor=t}},show:{get:function(){return this._show},set:function(t){this._show=t}},outline:{get:function(){return this._outline},set:function(t){this._outline=t,this.updateGeometry()}},top:{get:function(){return this._topShow},set:function(t){this._topShow=t,this.updateGeometry()}},topOutline:{get:function(){return this._topOutline},set:function(t){this._topOutline=t,this.updateGeometry()}},groundArea:{get:function(){return this._groundArea},set:function(t){this._groundArea=t,this.addGroundAreaEntity(this._groundArea)}},angle:{get:function(){return this._angle},set:function(t){this._angle=t,this.updateGroundCircleRadius(),this.updateGeometry()}},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this.updateGroundCircleRadius(),this.updateGeometry()}},heading:{get:function(){return this._rotation.heading},set:function(t){this._rotation.heading=t}},pitch:{get:function(){return this._rotation.pitch},set:function(t){this._rotation.pitch=t}},roll:{get:function(){return this._rotation.roll},set:function(t){this._rotation.roll=t}},position:{get:function(){return this._position},set:function(t){this._position=t}}}),t.prototype.updateGroundCircleRadius=function(){this._ground_radius=this._radius*Math.cos(k.Math.toRadians(this._angle))},t.prototype.addGroundAreaEntity=function(t){var e;t&&!this.groundAreaEntity&&((e=this).updateGroundCircleRadius(),this.groundAreaEntity=viewer.entities.add({position:this._position,ellipse:{show:0===this._rotation.pitch&&0===this._rotation.roll,semiMinorAxis:new k.CallbackProperty(function(t){return e._ground_radius},!1),semiMajorAxis:new k.CallbackProperty(function(t){return e._ground_radius},!1),material:this.defaultColor},polyline:{show:this._trackedEntityPosition&&(0!==this._rotation.pitch||0!==this._rotation.roll),positions:new k.CallbackProperty(function(t){return!e._trackedEntityPosition||k.Cartesian3.distance(e._position,e._trackedEntityPosition)>e._radius?[]:[e._position,e._trackedEntityPosition]},!1),followSurface:!1,material:new k.PolylineDashMaterialProperty({color:k.Color.CYAN}),width:1}}))};var n=new k.Cartesian3;t.prototype.computeMatrix=function(t,e){return this._positionCartesian||(this._positionCartesian=new k.Cartesian3),this.position instanceof k.Cartesian3?this._positionCartesian=this.position:"function"==typeof this.position.getValue?this._positionCartesian=this.position.getValue(t):this.position._value&&this.position._value instanceof k.Cartesian3&&(this._positionCartesian=this.position._value),this._trackedEntity&&this._trackedEntity.position&&(this._positionCartesian,t=k.Property.getValueOrUndefined(this._trackedEntity.position,t,n))&&(this._trackedEntityPosition=t,this._rotation.heading=0,this._rotation.pitch=40,this._rotation.roll=0),this._modelMatrix=k.Transforms.eastNorthUpToFixedFrame(this._positionCartesian,i,this._modelMatrix),this._positionCartographic=k.Cartographic.fromCartesian(this._positionCartesian,i,this._positionCartographic),k.Transforms.eastNorthUpToFixedFrame(this._positionCartesian,i,this._modelMatrix),k.Quaternion.fromHeadingPitchRoll(this._rotation,this._quaternion),this._matrix=k.Matrix4.fromTranslationQuaternionRotationScale(this._translation,this._quaternion,this._scale,this._matrix),k.Matrix4.multiplyTransformation(this._modelMatrix,this._matrix,this._matrix),k.Matrix4.inverseTransformation(this._matrix,this._inverseMatrix),this._matrix},t.prototype.getTopGeometry=function(){for(var t=this.radius,e=[],i=[],n=[],a=[],r=90-parseInt(this.angle),o=r<1?r/8:1,s=2*Math.PI/127,l=0,c=this.angle;c<91;c+=o){for(var h=k.Math.toRadians(c<90?c:90),h=Math.cos(h)*t,x=[],d=0;d<128;d++){var u=s*d,p=h*Math.cos(u),u=h*Math.sin(u),g=Math.sqrt(t*t-p*p-u*u);e.push(p,u,g),i.push(1,1),x.push(l++)}a.push(x)}for(c=1;c<a.length;c++)for(d=1;d<a[c].length;d++){var m=a[c-1][d-1],f=a[c][d-1],v=a[c][d],y=a[c-1][d];n.push(m,f,v),n.push(m,v,y)}var e=new Float32Array(e),n=new Int32Array(n),i=new Float32Array(i),r={position:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e}),st:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:i})},b=k.BoundingSphere.fromVertices(e),r=new k.Geometry({attributes:r,indices:n,primitiveType:k.PrimitiveType.TRIANGLES,boundingSphere:b});return(0,k.Scene.computeVertexNormals)(r),r},t.prototype.getTopOutlineGeometry=function(){for(var t=this.radius,e=[],i=[],n=[],a=[],r=90-parseInt(this.angle),o=r<1?r/8:1,s=2*Math.PI/127,l=0,c=this.angle;c<91;c+=o){for(var h=k.Math.toRadians(c<90?c:90),h=Math.cos(h)*t,x=[],d=0;d<128;d++){var u=s*d,p=h*Math.cos(u),u=h*Math.sin(u),g=Math.sqrt(t*t-p*p-u*u);e.push(p,u,g),i.push(1,1),x.push(l++)}a.push(x)}for(c=1;c<a.length;c++)for(d=1;d<a[c].length;d++){var m=a[c-1][d-1],f=a[c][d-1],v=a[c][d];a[c-1][d],d%8==1&&n.push(m,f),c%8==1&&n.push(f,v)}var e=new Float32Array(e),n=new Int32Array(n),i=new Float32Array(i),r={position:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e}),st:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:i})},y=k.BoundingSphere.fromVertices(e),r=new k.Geometry({attributes:r,indices:n,primitiveType:k.PrimitiveType.LINES,boundingSphere:y});return(0,k.Scene.computeVertexNormals)(r),r},t.prototype.updateGeometry=function(){this._geometry=k.Scene.CylinderGeometry.createGeometry(new k.Scene.CylinderGeometry({topRadius:this._radius*Math.cos(k.Math.toRadians(this.angle)),bottomRadius:0,length:this._radius*Math.sin(k.Math.toRadians(this.angle))})),this._topGeometry=this.getTopGeometry(),this._topOutlineGeometry=this.getTopOutlineGeometry(),this._outlineGeometry=k.Scene.CylinderGeometry.createOutlineGeometry(new k.Scene.CylinderGeometry({topRadius:this._radius*Math.cos(k.Math.toRadians(this.angle)),bottomRadius:0,slices:128,length:this._radius*Math.sin(k.Math.toRadians(this.angle))})),this._positions=new Float32Array(this._geometry.attributes.position.values.length);for(var t=0;t<this._positions.length;t++)this._positions[t]=this._geometry.attributes.position.values[t];this._drawCommands&&this._drawCommands.length&&(this._drawCommands.forEach(function(t){t.vertexArray=t.vertexArray&&t.vertexArray.destroy()}),this._drawCommands.splice(0,this._drawCommands.length))},t.prototype.update=function(e){this._show&&(this.computeMatrix(e.time),e.mode===k.SceneMode.SCENE3D?(this._geometry.boundingSphere=k.BoundingSphere.fromVertices(this._geometry.attributes.position.values),this._drawCommands&&this._drawCommands.length||(this._drawCommands.push(this.createDrawCommand(this._geometry,e)),this._outline&&this._drawCommands.push(this.createDrawCommand(this._outlineGeometry,e)),this._topShow&&(this._drawCommands.push(this.createDrawCommand(this._topGeometry,e)),this._topOutline)&&this._drawCommands.push(this.createDrawCommand(this._topOutlineGeometry,e))),this._drawCommands.forEach(function(t){e.commandList.push(t)}),this.groundAreaEntity&&(this.groundAreaEntity.ellipse.show=this._groundArea&&0===this._rotation.pitch&&0===this._rotation.roll,this.groundAreaEntity.polyline.show=!1)):(this.groundAreaEntity||this.addGroundAreaEntity(!0),this.groundAreaEntity.ellipse.show=0===this._rotation.pitch&&0===this._rotation.roll,this.groundAreaEntity.polyline.show=this._trackedEntityPosition&&(0!==this._rotation.pitch||0!==this._rotation.roll)))},t.prototype.getFragmentShaderSource=function(t){return"#version 300 es\n in vec3 v_position;\n in vec3 v_normal; \n uniform float picked; \n uniform vec4 pickedColor; \n uniform vec4 defaultColor; \n uniform float specular; \n uniform float shininess; \n uniform vec3 emission; \n in vec2 v_st; \n uniform bool isLine; \n uniform float glowPower; \n void main() { \n vec3 positionToEyeEC = -v_position; \n vec3 normalEC = normalize(v_normal); \n vec4 color = defaultColor; \n if (picked != 0.0) { \n color = pickedColor; \n } \n czm_material material; \n material.specular = specular; \n material.shininess = shininess; \n material.normal = normalEC; \n material.emission = emission;//vec3(0.2,0.2,0.2);\n material.diffuse = color.rgb ;\n if(isLine){\n material.alpha = 1.0; \n }\n else{ \n material.alpha = color.a; \n }\n if(v_st.x==0.0){ \n out_FragColor =color ;\n }else { \n out_FragColor = czm_phong(normalize(positionToEyeEC), material,czm_lightDirectionEC) ; \n } \n }"},t.prototype.getVertexShaderSource=function(t){return"#version 300 es\n #ifdef GL_ES\n precision highp float;\n #endif\n\n in vec3 position;\n in vec2 st;\n in vec3 normal;\n uniform mat4 modelViewMatrix;\n uniform mat3 normalMatrix;\n uniform mat4 projectionMatrix;\n out vec3 v_position;\n out vec3 v_normal;\n out vec2 v_st;\n\n out vec3 v_light0Direction;\n\n void main(void) \n {\n vec4 pos = modelViewMatrix * vec4( position,1.0);\n v_normal = normalMatrix * normal;\n v_st = st;\n v_position = pos.xyz;\n v_light0Direction = mat3( modelViewMatrix) * vec3(1.0,1.0,1.0);\n gl_Position = projectionMatrix * pos;\n }"},t.prototype.createDrawCommand=function(t,e,i){var n=e.context,a=new k.Cartesian3,a=(k.Matrix4.multiplyByPoint(this._matrix,t.boundingSphere.center,a),new k.BoundingSphere(a,t.boundingSphere.radius)),i=new k.DrawCommand({modelMatrix:i||this._matrix,owner:this,primitiveType:t.primitiveType,pass:k.Pass.TRANSLUCENT,boundingVolume:a}),r=this,a=k.GeometryPipeline.createAttributeLocations(t);return i.vertexArray=k.VertexArray.fromGeometry({context:n,geometry:t,attributeLocations:a,bufferUsage:k.BufferUsage.STATIC_DRAW}),i.vertexArray._attributeLocations=a,i.shaderProgram=k.ShaderProgram.replaceCache({context:n,vertexShaderSource:this.getVertexShaderSource(t),fragmentShaderSource:this.getFragmentShaderSource(t),attributeLocations:a}),i.renderState=k.RenderState.fromCache({blending:k.BlendingState.ALPHA_BLEND,depthTest:{enabled:!0,func:k.DepthFunction.LESS},cull:{enabled:!1,face:k.CullFace.BACK}}),i.uniformMap={},i.uniformMap.projectionMatrix=function(){return e.context.uniformState.projection},i.uniformMap.modelViewMatrix=function(){return e.context.uniformState.modelView},i.uniformMap.shininess=function(){return r.shininess||(r.shininess=0),r.shininess},i.uniformMap.emission=function(){return r.emission||(r.emission=new k.Cartesian3(.2,.2,.2)),r.emission},i.uniformMap.specular=function(){return r.specular||(r.specular=0),r.specular},i.uniformMap.isLine=function(){return t.primitiveType==k.PrimitiveType.LINES||t.primitiveType==k.PrimitiveType.LINE_STRIP},i.uniformMap.defaultColor=function(){return t.primitiveType==k.PrimitiveType.LINES||t.primitiveType==k.PrimitiveType.LINE_STRIP?(r.defaultLineColor||(r.defaultLineColor=new k.Color(1,1,0,1)),r.defaultLineColor):(r.defaultColor||(r.defaultColor=new k.Color(1,0,0,1)),r.defaultColor)},i.uniformMap.picked=function(){return r.picked||(r.picked=0),r.picked},i.uniformMap.pickedColor=function(){return r.pickedColor||(r.pickedColor=new k.Color(1,1,0,1)),r.pickedColor},i.uniformMap.normalMatrix=function(){return e.context.uniformState.normal},i.uniformMap.glowPower=function(){return.25},i},t.prototype.remove=function(){this.viewer.scene.primitives.remove(this),this.groundAreaEntity&&this.viewer.entities.remove(this.groundAreaEntity)},t.prototype.addToScene=function(){this.viewer.scene.primitives.add(this),this.groundAreaEntity&&this.viewer.entities.add(this.groundAreaEntity)},t.prototype.destroy=function(t){t&&(this.viewer.scene.primitives.remove(this),this.groundAreaEntity&&this.viewer.entities.remove(this.groundAreaEntity),this._drawCommands.forEach(function(t){t.vertexArray=t.vertexArray&&t.vertexArray.destroy()}),this._drawCommands=[])},k.Scene.RadarPrimitiveRight=t},_installCounputeVertex:function(){var a=new k.Cartesian3,r=(new k.Ray,new k.Cartographic);k.Scene.computeVertexNormals=function(t){var e=t.indices,i=t.attributes,n=e.length;if(i.position){var a=i.position.values;if(void 0===i.normal)i.normal=new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:new Float32Array(a.length)});else for(var r=i.normal.values,o=0;o<n;o++)r[o]=0;for(var s,l,c,h=i.normal.values,x=new k.Cartesian3,d=new k.Cartesian3,u=new k.Cartesian3,p=new k.Cartesian3,g=new k.Cartesian3,o=0;o<n;o+=3)s=3*e[o+0],l=3*e[o+1],c=3*e[o+2],k.Cartesian3.fromArray(a,s,x),k.Cartesian3.fromArray(a,l,d),k.Cartesian3.fromArray(a,c,u),k.Cartesian3.subtract(u,d,p),k.Cartesian3.subtract(x,d,g),k.Cartesian3.cross(p,g,p),h[s]+=p.x,h[1+s]+=p.y,h[2+s]+=p.z,h[l]+=p.x,h[1+l]+=p.y,h[2+l]+=p.z,h[c]+=p.x,h[1+c]+=p.y,h[2+c]+=p.z;for(var m,f,v,y,b=t.attributes.normal.values,C=0;C<b.length;C+=3)m=b[C],f=b[C+1],v=b[C+2],y=1/Math.sqrt(m*m+f*f+v*v),b[C]=m*y,b[C+1]=f*y,b[C+2]=v*y;i.normal.needsUpdate=!0}return t},k.Scene.extend2Earth=function(t,e,i,n){n=n||k.Ellipsoid.WGS84,k.Matrix4.multiplyByPoint(e,t,a),k.Cartesian3.subtract(a,i.origin,i.direction),k.Cartesian3.normalize(i.direction,i.direction);e=k.IntersectionTests.rayEllipsoid(i,n),n=null;if(n=e?k.Ray.getPoint(i,e.start):n)try{k.Cartographic.fromCartesian(n,null,r)}catch(t){return null}return n}}};class e{constructor(t){return this.init(t)}init({cesiumGlobal:t,containerId:e,viewerConfig:i={},extraConfig:n={},MapImageryList:a=[],defaultStatic:r,baseExtendsCom:o=[],extendsCom:s,extendsComName:l}){if(!t)throw"Missing cesiumGlobal parameter, please check the calling function initCesium.";if(e)return{viewer:e=new N(t).init({containerId:e,viewerConfig:i,extraConfig:n,MapImageryList:a}),[l]:this.prototypeExtends(e,t,r)(o,s)};throw"Missing containerId parameter, please check the calling function initCesium."}prototypeExtends(n,r,o){return function(t,a){var e=null;function i(t){for(var e=Object.keys(t.prototype),i=0,n=e.length;i<n;i++)a.prototype[e[i]]=t.prototype[e[i]]}return Array.isArray(t)?(t.forEach(t=>{i(t)}),e=new a(n,r,o),t.forEach(t=>{t.call(e,n,r,o)})):(i(t),e=new a(n,r,o),t.call(e,n,r,o)),e}}}class mt extends e{constructor(t){return super({...t,baseExtendsCom:[b,z,Q],extendsCom:U,extendsComName:"draw"})}}class ft extends e{constructor(t){return super({...t,baseExtendsCom:b,extendsCom:$,extendsComName:"customCesiumPlugin"})}}R.Analysis=class extends e{constructor(t){return super({...t,baseExtendsCom:[b,U,it],extendsCom:nt,extendsComName:"analysis"})}},R.CustomCesiumPlugin=class{constructor(t){var e=new ft(t);return this._initInter(e,t)}_initInter(t,e){return new gt(t.viewer,e.cesiumGlobal,e.defaultStatic),t}},R.Draw=class{constructor(t){var e=new mt(t);return this._initCurrMeasure(t,e)}_initCurrMeasure(t,e){var i=new S(e.viewer,t.cesiumGlobal),n=new T(e.viewer,t.cesiumGlobal),t=new D(e.viewer,t.cesiumGlobal);return{...e,attackArrowObj:i,straightArrowObj:n,pincerArrowObj:t}}},R.Graphics=class extends e{constructor(t){return super({...t,baseExtendsCom:b,extendsCom:y,extendsComName:"graphics"})}},R.Material=class extends e{constructor(t){return super({...t,baseExtendsCom:[b,Y],extendsCom:E,extendsComName:"material"})}},R.PassEffect=class extends e{constructor(t){return super({...t,baseExtendsCom:[b,Y],extendsCom:J,extendsComName:"passEffect"})}},R.Plugin=class extends e{constructor(t){return super({...t,baseExtendsCom:[b,y],extendsCom:it,extendsComName:"plugin"})}},R.Primitive=class extends e{constructor(t){return super({...t,baseExtendsCom:b,extendsCom:L,extendsComName:"primitive"})}},R.initCesium=function({cesiumGlobal:t,containerId:e,viewerConfig:i={},extraConfig:n={},MapImageryList:a=[],defaultStatic:r}){if(!t)throw"Missing cesiumGlobal parameter, please check the calling function initCesium.";var o,s,l,c,h,x,d,u,p,g,m,f,v;if(e)return e=new N(t).init({containerId:e,viewerConfig:i,extraConfig:n,MapImageryList:a}),m=e,f=t,v=r,n=(i=function(t,a){var e=null;function i(t){for(var e=Object.keys(t.prototype),i=0,n=e.length;i<n;i++)a.prototype[e[i]]=t.prototype[e[i]]}return Array.isArray(t)?(t.forEach(t=>{i(t)}),e=new a(m,f,v),t.forEach(t=>{t.call(e,m,f,v)})):(i(t),e=new a(m,f,v),t.call(e,m,f,v)),e})([b,Y],E),a=i(b,y),r=i(b,z),o=i(b,L),s=i([b,z,Q],U),l=i([b,Y],J),c=i(b,$),h=i(b,et),x=i([b,y],it),d=new b(e,t),i=i([b,U,it],nt),u=new S(e,t),p=new T(e,t),g=new D(e,t),new gt(e,t),{viewer:e,material:n,graphics:a,math3d:r,primitive:o,draw:s,passEffect:l,customCesiumPlugin:c,control:h,plugin:x,base:d,analysis:i,attackArrowObj:u,straightArrowObj:p,pincerArrowObj:g};throw"Missing containerId parameter, please check the calling function initCesium."},Object.defineProperty(R,"__esModule",{value:!0})});
5
+ `),-1!==a.indexOf(r)&&(n[e]=n[e].replace(r,t))}}getCurCenterlonLat(t){t=t.camera.pickEllipsoid(new o.Cartesian2(t.canvas.clientWidth/2,t.canvas.clientHeight/2)),t=o.Ellipsoid.WGS84.cartesianToCartographic(t);return{lon:180*t.longitude/Math.PI,lat:180*t.latitude/Math.PI}}}let u=null;function y(t,e,i){t&&(u=e,this._graphicsLayer=new u.CustomDataSource("graphicsLayer"),t)&&t.dataSources.add(this._graphicsLayer)}y.prototype={getPointGraphics:function(t){if(t=t||{})return new u.PointGraphics({color:t.color||u.Color.GREEN,pixelSize:t.pixelSize||5,outlineColor:t.outlineColor||u.Color.WHITE,outlineWidth:t.outlineWidth||1})},getLineGraphics:function(t){if((t=t||{})&&t.positions)return new u.PolylineGraphics({show:!0,positions:t.positions,material:t.material||u.Color.YELLOW,width:t.width||1,clampToGround:t.clampToGround||!1})},getLineVolumeGraphics:function(a){if((a=a||{})&&a.positions)return new u.PolylineVolumeGraphics({show:!0,positions:new u.Cartesian3.fromDegreesArrayHeights(a.positions),material:a.material||new u.Scene.PolylineFlowWaterMaterialProperty({riverColor:u.Color.SKYBLUE,flowDuration:1e4}),shape:new u.CallbackProperty(function(){for(var t=[],e=0;e<180;e++){var i=a.width*Math.cos(2*Math.PI*e/720),n=.1*Math.sin(2*Math.PI*e/720);t.push(new u.Cartesian2(i,n))}return t},!1),cornerType:a.cornerType||u.CornerType.ROUNDED})},getPolygonGraphics:function(t){if((t=t||{})&&t.positions)return new u.PolygonGraphics({hierarchy:{positions:t.positions},material:t.material||u.Color.RED.withAlpha(.2),clampToGround:t.clampToGround||!1})},getLabelGraphics:function(t){if((t=t||{})&&t.l_text)return new u.LabelGraphics({text:t.l_text,font:t.l_font||"14px sans-serif",fillColor:t.l_fillColor||u.Color.GOLD,style:t.l_style||u.LabelStyle.FILL_AND_OUTLINE,outlineWidth:t.l_outlineWidth||2,showBackground:t.l_showBackground||!1,backgroundColor:t.l_backgroundColor||new u.Color(.165,.165,.165,.8),verticalOrigin:t.l_verticalOrigin||u.VerticalOrigin.BOTTOM,pixelOffset:t.l_pixelOffset||new u.Cartesian2(0,-30)})},getBillboardGraphics:function(t){if((t=t||{})&&t.b_img)return new u.BillboardGraphics({image:t.b_img,width:t.b_width||35,height:t.b_height||35,clampToGround:t.b_clampToGround||!0,scale:t.b_scale||1,pixelOffset:t.b_pixelOffset||new u.Cartesian2(0,-20),scaleByDistance:t.b_scaleByDistance||void 0})},getPathGraphics:function(t){if(t=t||{})return new u.PathGraphics({resolution:t.resolution||1,material:new u.PolylineGlowMaterialProperty({glowPower:t.glowPower||.1,color:t.color||u.Color.YELLOW}),width:t.width||30})},getModelGraphics:function(t){if(t=t||{})return new u.ModelGraphics({uri:t.m_url||t.url,scale:t.m_scale||t.scale||10,clampAnimations:!0})},getEllipseGraphics:function(t){if(t=t||{})return new u.EllipseGraphics({semiMajorAxis:t.e_semiMinorAxis||1e6,semiMinorAxis:t.e_semiMinorAxis||1e6,metarial:t.e_metarial||u.Color.RED.withAlpha(.5),outline:t.e_outline||!0})},getEllipsoidGraphics:function(t){var e;if(t=t||{})return e=t.radii||1e6,new u.EllipsoidGraphics({radii:new u.Cartesian3(e,e,e),maximumCone:t.maximumCone||u.Math.PI_OVER_TWO,stackPartitions:t.stackPartitions||56,slicePartitions:t.slicePartitions||56,outlineWidth:t.outlineWidth||2,outlineColor:t.outlineColor||u.Color.YELLOW,outline:t.outline||!0,fill:t.fill||!0,material:t.material||u.Color.RED.withAlpha(.1)})},getBoxGraphics:function(t){if(t=t||{show:!0,outline:!1,fill:!0})return new u.BoxGraphics({show:t.show,fill:t.fill,dimensions:t.dimensions||new u.Cartesian3(0,0,0),material:t.material,outline:t.outline,outlineColor:t.outlineColor||u.Color.BLACK,distanceDisplayCondition:t.distanceDisplayCondition||void 0})},getPlaneGraphics:function(t){if(t=t||{})return new u.PlaneGraphics({plane:t.plane||new u.Plane(u.Cartesian3.UNIT_Y,0),dimensions:t.dimensions||new u.Cartesian2(170,130),material:t.material||u.Color.BLUE})},getCylinderGraphics:function(t){if(t=t||{})return new u.CylinderGraphics({HeightReference:u.HeightReference.RELATIVE_TO_GROUND,length:t.length||250,topRadius:t.topRadius||0,bottomRadius:t.bottomRadius||0,material:t.material||new u.Color(0,1,1,.4),slices:t.slices||128})},createPointsGraphics:function(t){if(t&&t.positions){var e,i=[];for(e in t.positions){var n=t.positions[e],a=this.createGraphics();a.name=t.name||"",a.oid=t.oid||"point",a.position=n,t.point&&(a.point=this.getPointGraphics()),t.billboard&&(a.billboard=this.getBillboardGraphics(t.billboard)),t.label&&(a.label=this.getLabelGraphics(t.label)),i.push(this._graphicsLayer.entities.add(a))}return i}},createLineGraphics:function(t){var e;if(t&&t.positions)return(e=this.createGraphics()).name=t.name||"",e.oid=t.oid||"line",e.position=t.positions,e.polyline=this.getLineGraphics(t),this._graphicsLayer.entities.add(e)},createLineVolumeGraphics:function(t){var e;if(t&&t.positions)return(e=this.createGraphics()).name=t.name||"lineVolumeWater",e.oid=t.oid||"lineVolume",e.polylineVolume=this.getLineVolumeGraphics(t),this._graphicsLayer.entities.add(e)},createPolygonGraphics:function(t){var e;if(t=t||{})return(e=this.createGraphics()).polygon=this.getPolygonGraphics(t),e.clampToS3M=t.clampToS3M||!1,this._graphicsLayer.entities.add(e)},createBoxGraphics:function(t){var e;if(t=t||{})return(e=this.createGraphics()).position=t.position,e.name=t.name||"box_graphic",e.box=this.getBoxGraphics(t.box),this._graphicsLayer.entities.add(e)},createModelGraphics:function(t){var e;if(t&&t.position)return(e=this.createGraphics()).model=this.getModelGraphics(t),e.position=t.position,this._graphicsLayer.entities.add(e)},craeteCorridorGraphics:function(t){var e;if(t&&t.positions)return(e=this.createGraphics()).corridor={positions:t.positions,height:t.height||6,width:t.width||15,material:t.material||new u.Scene.WarnLinkMaterialProperty({freely:"cross",color:u.Color.YELLOW,duration:1e3,count:1,direction:"+"})},this._graphicsLayer.entities.add(e)},craeteDynamicPolyLineGraphics:function(t){var e;if(t&&t.positions)return(e=this.createGraphics()).polyline={show:!0,positions:[],material:t.material||u.Color.CHARTREUSE,width:t.width||5,clampToGround:t.clampToGround||!1},e.polyline.positions=new u.CallbackProperty(function(){return t.positions},!1),this._graphicsLayer.entities.add(e)},craeteDynamicCylinderGraphics:function(t){var i,n,e={};if(t&&t.cylinder)return i=t.entity,t=t.cylinder,e.cylinder=(n=this).getCylinderGraphics(t),e.position=new u.CallbackProperty(function(){var t=i.position.getValue(n._viewer.clock.currentTime),t=n._viewer.scene.globe.ellipsoid.cartesianToCartographic(t),e=u.Math.toDegrees(t.latitude),t=u.Math.toDegrees(t.longitude);return u.Cartesian3.fromDegrees(t,e,0)},!1),e.cylinder.length=new u.CallbackProperty(function(){var t=i.position.getValue(n._viewer.clock.currentTime);return 2*n._viewer.scene.globe.ellipsoid.cartesianToCartographic(t).height},!1),e},createFadeCylinderGraphics:function(t){var e;if((t=t||{})&&t.position)return(e=this.createGraphics()).position=t.position,t.material=new u.Scene.CircleFadeMaterialProperty({color:t.color||u.Color.fromCssColorString("#02ff00"),duration:t.duration||2e3}),e.cylinder=this.getCylinderGraphics(t),this._drawLayer.entities.add(e)},craeteRotateCylinderGraphics:function(t){var e;if(t&&t.position)return(e=this.createGraphics()).cylinder={HeightReference:u.HeightReference.RELATIVE_TO_GROUND,length:t.length||500,topRadius:t.topRadius||500,bottomRadius:t.bottomRadius||500,material:t.material||new u.ImageMaterialProperty({image:t.img||this.getDfSt(["graphic","craeteRotateCylinderGraphics"])||"static/data/images/file/cc2.png",transparent:!0,repeat:{x:1,y:-1}}),slices:t.slices||128},e.position=t.position,this.setGraphicsRotate({entity:e,position:this.transformCartesianToWGS84(t.position),rotateAmount:4}),this._graphicsLayer.entities.add(e)},craeteDynamicBlinkCircleGraphics:function(t){var e,i,n;if(t&&t.position)return e=this.createGraphics(),i=t.alp||1,n=t.flog||!0,e.position=t.position,e.ellipse={semiMinorAxis:t.semiMinorAxis||2e3,semiMajorAxis:t.semiMajorAxis||2e3,height:t.height||10,material:new u.ColorMaterialProperty(new u.CallbackProperty(function(){return n?(i-=.05)<=0&&(n=!1):1<=(i+=.05)&&(n=!0),u.Color.RED.withAlpha(i)},!1))},this._graphicsLayer.entities.add(e)},craeteDynamicCricleGraphics:function(i){if(i&&i.center){var n=this.createGraphics(),a=this,r=i.center,o=i.radius||800,s=i.rotateAmount||.05,l=0,c=i.height||1,h=i.scale||null,d=i.scale2||null,i=i.material||new u.ImageMaterialProperty({image:i.imge||this.getDfSt(["graphic","craeteDynamicCricleGraphics"])||"static/data/images/Textures/circle_bg.png",transparent:!0});n.position=new u.CallbackProperty(function(){return a.transformWGS84ToCartesian(r)},!1),n.orientation=new u.CallbackProperty(function(){return u.Transforms.headingPitchRollQuaternion(a.transformWGS84ToCartesian(r),new u.HeadingPitchRoll(u.Math.toRadians(0),u.Math.toRadians(0),u.Math.toRadians(0)))},!1);let t=o,e=!1;return n.ellipse={material:i,height:c,semiMajorAxis:new u.CallbackProperty(function(){return o},!1),semiMinorAxis:new u.CallbackProperty(function(){return o},!1),stRotation:new u.CallbackProperty(function(){return 0<s&&360<=(l+=s)&&(l=0),h&&((e=h<=o||o<=t?!e:e)?o+=2:o-=2),d&&(o<=d?o+=2:o=t),l},!1)},this._graphicsLayer.entities.add(n)}},craeteDynamicShadeWallGraphics:function(t){var e,i,n,a,r;if(t&&t.positions)return e=t.alp||1,i=t.num||20,n=t.color||u.Color.RED,a=t.speed||.003,(r=this.createGraphics()).wall={positions:t.positions,material:new u.ImageMaterialProperty({image:t.img||this.getDfSt(["graphic","craeteDynamicShadeWallGraphics"])||"static/data/images/Textures/fence.png",transparent:!0,color:new u.CallbackProperty(function(){return i%2==0?e-=a:e+=a,(e<=.1||1<=e)&&i++,n.withAlpha(e)},!1)})},this._graphicsLayer.entities.add(r)},createCustomDefBillboardGraphics:function(e){if(e&&e.position){var i=this,n=document.createElement("img");n.src=e.img||this.getDfSt(["graphic","createCustomDefBillboardGraphics"])||"static/data/images/file/div1.png";n.onload=function(){e.image=n;var t=i._graphicsLayer.entities.add({position:e.position,billboard:{image:function(t){var e,i;if(t.image)return(e=document.createElement("canvas")).width=t.width||150,e.height=t.height||80,(i=e.getContext("2d")).drawImage(t.image,0,0),t=t.text,i.font="15px bold 宋体",i.fillStyle="#f4fff0",i.fillText(t,55,36),e}(e),scaleByDistance:new u.NearFarScalar(150,.7,15e6,.5),verticalOrigin:u.VerticalOrigin.BOTTOM,pixelOffset:e.b_pixelOffset||new u.Cartesian2(80,-35),width:140,height:100,scale:e.b_scale||1.5,disableDepthTestDistance:Number.POSITIVE_INFINITY,imageSubRegion:{x:0,y:0,width:200,height:150}}});"function"==typeof e.callback&&e.callback(t)}}},craeteRotatePlaneGraphics:function(t){var e,i,n,a;if(t&&t.center&&t.positions)return e=this.createGraphics(),i=0,n=t.positions,a=n[0],e.position=new u.CallbackProperty(function(){return 0==i?(a=n[0],i+=1):i<n.length-1?(a=n[i],i+=1):i==n.length-1&&(a=n[i],i=0),a},!1),e.plane={plane:new u.Plane(u.Cartesian3.UNIT_Y,0),dimensions:t.dimensions||new u.Cartesian2(200,150),material:new u.ImageMaterialProperty({image:t.image})},this._graphicsLayer.entities.add(e)},createVideoPlaneGraphics:function(t){var e;if(t&&t.position)return(e=this.createGraphics()).position=t.position,e.plane={plane:new u.Plane(t.normal||u.Cartesian3.UNIT_Y,0),dimensions:t.dimensions||new u.Cartesian2(200,150),material:new u.ImageMaterialProperty({image:t.videoElement})},this._graphicsLayer.entities.add(e)},createGifBillboardGraphics:function(t){var e,i,n,a,r,o,s;if(l&&t&&t.position)return i=t.url,n=0,a=i,r=e=[],(o=document.createElement("img")).src=a,o.setAttribute("rel:animated_src",a),o.setAttribute("rel:auto_play","0"),document.body.appendChild(o),s=new l({gif:o}),new Promise(t=>{s.load(()=>{for(let t=1;t<=s.get_length();t++)s.move_to(t),r.push(s.get_canvas().toDataURL());t(r)})}),this._graphicsLayer.entities.add({position:t.position,billboard:{verticalOrigin:u.VerticalOrigin.BASELINE,image:new u.CallbackProperty(function(){return e.length?(n<6*(e.length-1)?n++:n=0,e[Math.floor(n/6)]):i},!1),scale:.2}})},setGraphicsRotate:function(t){var e,i,n,a;t&&t.entity&&t.rotateAmount&&(e=t.entity,i=t.rotateAmount,n=t.position,a=this,n.heading=0,n.pitch=0,n.roll=0,e.position=new u.CallbackProperty(function(){return a.transformWGS84ToCartesian(n)},!1),e.orientation=new u.CallbackProperty(function(){return 0<i&&(n.heading+=i,360===n.heading)&&(n.heading=0),u.Transforms.headingPitchRollQuaternion(a.transformWGS84ToCartesian(n),new u.HeadingPitchRoll(u.Math.toRadians(n.heading),u.Math.toRadians(n.pitch),u.Math.toRadians(n.roll)))},!1))},setGraphicsFloat:function(t){if(t&&t.entity&&t.maxHeiht)try{var e=t.entity,n=t.minHeiht||5,a=t.maxHeiht||100,r=t.cartesians,o=t.speed||.06,s=this,l=n,c=!1;r.length?e.positions=new u.CallbackProperty(function(){var t,e=s.transformCartesianArrayToWGS84Array(r);for(t in e){var i=e[t];(c=a<=n||n<=l?!c:c)?n+=o:n-=o,i.alt=n}return s.transformWGS84ArrayToCartesianArray(e)},!1):e.position=new u.CallbackProperty(function(){var t=s.transformCartesianToWGS84(r);return(c=a<=n||n<=l?!c:c)?n+=o:n-=o,t.alt=n,s.transformWGS84ToCartesian(t)},!1)}catch(t){console.log(t)}},createCanvasGraphics:function(a){a&&a.positions&&(this._graphicsLayer.entities.add({rectangle:{coordinates:a.positions,material:new u.ImageMaterialProperty({image:new u.CallbackProperty(function(){var t=0,e=document.createElement("canvas"),i=e.getContext("2d"),n=new Image;if(n.src=a.img||"../../images/ysCesium/logo.png",i.clearRect(0,0,a.cwidth,a.cheight),!(t<=a.cwidth))return t=0,t+=3,e;i.drawImage(n,t,0)},!1),transparent:!0})}}),"function"==typeof a.callback)&&a.callback()},createFanShape:function({viewer:t,longitude:e,latitude:i,alt:n,custMaterial:a,speed:r=0,direction:o="+"}){var s,l,c;if(t)return s=this.createGraphics(),l=0,c=this._calcPoints(e,i,n,l),s.wall={positions:new u.CallbackProperty(()=>u.Cartesian3.fromDegreesArrayHeights(c),!1),material:a||u.Color.AQUAMARINE.withAlpha(.5)},t.clock.onTick.addEventListener(()=>{0<r&&(l+=r,c=this._calcPoints(e,i,n,o+l))}),this._graphicsLayer.entities.add(s)},_computeCirclularFlight(e,i,n,a,r,o){var s=[],l=(s.push(e),s.push(i),s.push(0),u.Cartesian3.distance(u.Cartesian3.fromDegrees(e,i),u.Cartesian3.fromDegrees(n,a)));for(let t=r;t<=r+o;t++){var c=l*Math.sin(t*Math.PI/180),h=Math.cos(t*Math.PI/180),d=(a-i)*h+i;s.push((n-e)*h+e),s.push(d),s.push(c)}return s},_calcPoints(t,e,i,n){var a=u.Transforms.eastNorthUpToFixedFrame(u.Cartesian3.fromDegrees(t,e)),r=i*Math.cos(n*Math.PI/180),i=i*Math.sin(n*Math.PI/180),n=u.Cartesian3.fromElements(r,i,0),r=u.Matrix4.multiplyByPoint(a,n,new u.Cartesian3),i=u.Cartographic.fromCartesian(r),a=u.Math.toDegrees(i.longitude),n=u.Math.toDegrees(i.latitude);return this._computeCirclularFlight(t,e,a,n,0,90)}};let p=null;function E(t,e,i){t&&(p=e,this._installMaterial())}function Y(){}E.prototype={addMaterialLineGraphics:function(t){var e;if(this._viewer&&t&&t.image)return this._initPolylineCustomMaterialProperty(t),(e=this.createGraphics()).polyline={positions:t.positions,material:new p.PolylineCustomMaterialProperty({color:t.color||p.Color.RED,duration:t.duration||500}),width:t.width},this._viewer.entities.add(e)},getCustomMaterialLine:function(t){if(this._viewer&&t&&t.image)return this._initPolylineCustomMaterialProperty(t)},_initPolylineCustomMaterialProperty(i){if(i){var t=p.Color,e=p.defaultValue,n=p.defined,a=Object.defineProperties,r=p.Event,o=p.createPropertyDescriptor,s=p.Property,l=p.Material,c=t.WHITE,h=i.MaterialType||"wallType"+parseInt(1e3*Math.random());const d=function(t){t=e(t,e.EMPTY_OBJECT),this._definitionChanged=new r,this._color=void 0,this._colorSubscription=void 0,this.color=t.color||p.Color.BLUE,this.duration=t.duration||1e3,this._time=void 0};return a(d.prototype,{isvarant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:o("color")}),d.prototype.getType=function(){return h},d.prototype.getValue=function(t,e){return(e=n(e)?e:{}).color=s.getValueOrClonedDefault(this._color,t,c,e.color),e.image=i.image,void 0===this._time&&(this._time=t.secondsOfDay),e.time=1e3*(t.secondsOfDay-this._time)/this.duration,e},d.prototype.equals=function(t){return this===t||t instanceof d&&s.equals(this._color,t._color)},l._materialCache.addMaterial(h,{fabric:{type:h,uniforms:{color:i.color||new p.Color(1,0,0,.5),image:i.image,time:i.color.time||0},source:this._getDynamicLineShader({get:!0})},translucent:function(){return!0}}),new d(i)}},addMaterialWallGraphics:function(t){var e;if(this._viewer&&t&&t.image)return this._initWallCustomMaterialProperty(t),(e=this.createGraphics()).wall={positions:t.positions,material:new p.Scene.WallLinkCustomMaterialProperty({color:t.color||p.Color.RED,duration:t.duration||500}),width:t.width},this._viewer.entities.add(e)},getCustomMaterialWall:function(t){if(this._viewer&&t&&t.image)return this._initWallCustomMaterialProperty(t)},_initWallCustomMaterialProperty(i){var n=p.Color,e=p.defaultValue,a=p.defined,t=Object.defineProperties,r=p.Event,o=p.createPropertyDescriptor,s=p.Property,l=p.Material,c=i.MaterialType||"wallType"+parseInt(1e3*Math.random());function h(t){t=e(t,e.EMPTY_OBJECT),this._definitionChanged=new r,this._color=void 0,this._colorSubscription=void 0,this.color=t.color||n.BLUE,this.duration=t.duration||3e3,this._time=(new Date).getTime()}return t(h.prototype,{isvarant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:o("color")}),h.prototype.getType=function(){return c},h.prototype.getValue=function(t,e){return(e=a(e)?e:{}).color=s.getValueOrClonedDefault(this._color,t,n.WHITE,e.color),e.image=i.image,e.time=((new Date).getTime()-this._time)%this.duration/this.duration,e},h.prototype.equals=function(t){return this===t||t instanceof h&&s.equals(this._color,t._color)},l._materialCache.addMaterial(c,{fabric:{type:c,uniforms:{color:new n(1,0,0,.5),image:i.image,time:0},source:this._getDirectionWallShader({get:!0,count:i.count,freely:i.freely,direction:i.direction})},translucent:function(){return!0}}),new(p.Scene.WallLinkCustomMaterialProperty=h)(i)},_installMaterial:function(){this._installWaveCircleMaterial(),this._installCircleFadeMaterial(),this._installCityLineMaterial(),this._installWarnMaterial(),this._installFlowMaterial()},_installWaveCircleMaterial:function(){var e=p.Color,i=p.defaultValue,t=Object.defineProperties,n=p.Event,a=p.Property,r=p.Material;function o(t){t=t||{},this._definitionChanged=new n,this._color=void 0,this._colorSubscription=void 0,this._duration=void 0,this._durationSubscription=void 0,this.color=i(t.color,e.fromBytes(0,255,255,255)),this.duration=i(t.duration,45),this.count=Math.max(i(t.count,2),1),this.gradient=i(t.gradient,.1),this.gradient<0?this.gradient=0:1<this.gradient&&(this.gradient=1)}t(o.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),o.prototype.getType=function(){return r.CircleWaveType},o.prototype.getValue=function(t,e){return(e=e||{}).color=a.getValueOrUndefined(this._color,t),e.duration=this._duration,e.count=this.count,e.gradient=this.gradient,e},o.prototype.equals=function(t){return this===t||t instanceof o&&p.Property.equals(this._color,t._color)},t(o.prototype,{color:p.createPropertyDescriptor("color"),duration:p.createPropertyDescriptor("duration")}),p.Scene.CircleWaveMaterialProperty=o,r.CircleWaveType="CircleWave",r._materialCache.addMaterial(r.CircleWaveType,{fabric:{type:r.CircleWaveType,uniforms:{color:new e(1,0,0,.7),duration:45,count:1,gradient:.1},source:this._getDynamicCircleShader({get:!0})},translucent:function(){return!0}})},_installCircleFadeMaterial:function(){var t=p.Color,e=p.defaultValue,i=Object.defineProperties,n=p.Event,a=p.Property,r=p.Material,o=new t(0,0,0,0);function s(t){t=e(t,e.EMPTY_OBJECT),this._definitionChanged=new n,this._color=void 0,this._colorSubscription=void 0,this.color=e(t.color,o),this._duration=t.duration||1e3,this._time=void 0}i(s.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),s.prototype.getType=function(){return r.CircleFadeMaterialType},s.prototype.getValue=function(t,e){return(e=e||{}).color=a.getValueOrClonedDefault(this._color,t,o,e.color),void 0===this._time&&(this._time=(new Date).getTime()),e.time=((new Date).getTime()-this._time)/this._duration,e},s.prototype.equals=function(t){return this===t||t instanceof s&&p.Property.equals(this._color,t._color)},i(s.prototype,{color:p.createPropertyDescriptor("color")}),p.Scene.CircleFadeMaterialProperty=s,r.CircleFadeMaterialType="CircleFadeMaterial",r._materialCache.addMaterial(r.CircleFadeMaterialType,{fabric:{type:r.CircleFadeMaterialType,uniforms:{color:new t(1,0,0,1),time:1},source:this._getCircleFadeShader({get:!0})},translucent:function(){return!0}})},_installCityLineMaterial:function(){var t=p.Color,e=p.defaultValue,i=p.defined,n=Object.defineProperties,a=p.Event,r=p.createPropertyDescriptor,o=p.Property,s=p.Material,l=t.WHITE;function c(t){t=e(t,e.EMPTY_OBJECT),this._definitionChanged=new a,this._color=void 0,this._colorSubscription=void 0,this.color=t.color||p.Color.BLUE,this.duration=t.duration||1e3,this._time=void 0,this._img=t.imgUrl||s.PolylineCityLinkImage}n(c.prototype,{isvarant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:r("color")}),c.prototype.getType=function(){return s.PolylineCityLinkType},c.prototype.getValue=function(t,e){return(e=i(e)?e:{}).color=o.getValueOrClonedDefault(this._color,t,l,e.color),e.image=this._img,void 0===this._time&&(this._time=t.secondsOfDay),e.time=1e3*(t.secondsOfDay-this._time)/this.duration,e},c.prototype.equals=function(t){return this===t||t instanceof c&&o.equals(this._color,t._color)},p.Scene.PolylineCityLinkMaterialProperty=c,s.PolylineCityLinkType="PolylineCityLink",s.PolylineCityLinkImage=this.getDfSt(["material","PolylineCityLinkMaterialProperty"])||"static/data/images/Textures/meteor_01.png",s._materialCache.addMaterial(s.PolylineCityLinkType,{fabric:{type:s.PolylineCityLinkType,uniforms:{color:new t(1,0,0,1),image:s.PolylineCityLinkImage,time:0},source:this._getDynamicLightLineShader({get:!0})},translucent:function(){return!0}})},_installWarnMaterial:function(){var i=p.Color,e=p.defaultValue,n=p.defined,t=Object.defineProperties,a=p.Event,r=p.createPropertyDescriptor,o=p.Property,s=p.Material;function l(t){t=e(t,e.EMPTY_OBJECT),this._definitionChanged=new a,this._color=void 0,this._colorSubscription=void 0,this.color=t.color||i.BLUE,this.duration=t.duration||3e3,this._time=(new Date).getTime()}t(l.prototype,{isvarant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),l.prototype.getType=function(){return s.WarnLinkType},l.prototype.getValue=function(t,e){return(e=n(e)?e:{}).color=o.getValueOrClonedDefault(this._color,t,i.WHITE,e.color),e.image=s.WarnLinkImage,e.time=((new Date).getTime()-this._time)%this.duration/this.duration,e},l.prototype.equals=function(t){return this===t||t instanceof l&&o.equals(this._color,t._color)},t(l.prototype,{color:r("color")}),p.Scene.WarnLinkMaterialProperty=l,s.WarnLinkType="WarnWallLinkType",s.WarnLinkImage=this.getDfSt(["material","WarnLinkMaterialProperty"])||"static/data/images/Textures/jsx2.png",s._materialCache.addMaterial(s.WarnLinkType,{fabric:{type:s.WarnLinkType,uniforms:{color:new i(1,0,0,.5),image:s.WarnLinkImage,time:0},source:this._getDirectionWallShader({get:!0,count:10,freely:"cross",direction:"-"})},translucent:function(){return!0}})},_installFlowMaterial:function(){var e=p.Color,i=p.defaultValue,t=Object.defineProperties,n=p.Event,a=p.createPropertyDescriptor,r=p.Property,o=p.Material;function s(t){t=i(t,i.EMPTY_OBJECT),this._definitionChanged=new n,this._color=void 0,this._colorSubscription=void 0,this.color=t.color||e.fromBytes(0,255,255,255),this._duration=void 0,this._durationSubscription=void 0,this.duration=i(t.duration,45)}t(s.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}}),s.prototype.getType=function(){return o.PolylineFlowType},s.prototype.getValue=function(t,e){return(e=e||{}).color=r.getValueOrClonedDefault(this._color,t,p.Color.WHITE,e.color),e.duration=this._duration,e},s.prototype.equals=function(t){return this===t||t instanceof s&&r.equals(this._color,t._color)},t(s.prototype,{color:a("color"),duration:a("duration")}),p.Scene.PolylineFlowMaterialProperty=s,o.PolylineFlowType="PolylineFlow",o._materialCache.addMaterial(o.PolylineFlowType,{fabric:{type:o.PolylineFlowType,uniforms:{color:new e(1,1,2,.7),duration:45},source:this._getFlowLineShader({get:!0})},translucent:function(){return!0}})}},Y.prototype={_getFlowLineShader:function(){return"uniform vec4 color;\n uniform float duration;\n \n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float t =fract(czm_frameNumber / duration);\n t *= 1.03;\n float alpha = smoothstep(t- 0.03, t, st.s) * step(-t, -st.s);\n alpha += 0.1;\n vec4 fragColor;\n fragColor.rgb = (color.rgb) / 0.5;\n fragColor = czm_gammaCorrect(fragColor);\n material.diffuse = fragColor.rgb;\n material.alpha = alpha;\n material.emission = fragColor.rgb;\n return material;\n }\n "},_getDynamicLineShader:function(t){if(t&&t.get)return"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n \n if(texture(image, vec2(0.0, 0.0)).a == 1.0){\n discard;\n }else{\n material.alpha = texture(image, vec2(1.0 - fract(time - st.s), st.t)).a * color.a;\n }\n \n material.diffuse = max(color.rgb * material.alpha * 3.0, color.rgb);\n \n return material;\n }\n "},_getDynamicLightLineShader:function(t){if(t&&t.get)return"czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n \n vec4 colorImage = texture(image, vec2(fract(1.0 *st.s - time), fract(st.t)));\n \n vec4 fragColor;\n fragColor.rgb = (colorImage.rgb+color.rgb) / 1.0;\n fragColor = czm_gammaCorrect(fragColor);\n material.diffuse = colorImage.rgb;\n material.alpha = colorImage.a;\n material.emission = fragColor.rgb;\n \n return material;\n }\n "},_getDirectionWallShader:function(t){var e;if(t&&t.get)return e="czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n \n ","vertical"==t.freely?e+="vec4 colorImage = texture(image, vec2(fract(float("+t.count+")*st.t "+t.direction+" time), fract(st.s)));\n ":e+="vec4 colorImage = texture(image, vec2(fract(float("+t.count+")*st.s "+t.direction+" time), fract(st.t)));\n ",(e+="vec4 fragColor;\n fragColor.rgb = (colorImage.rgb+color.rgb) / 1.0;\n fragColor = czm_gammaCorrect(fragColor);\n ")+" material.diffuse = colorImage.rgb;\n material.alpha = colorImage.a;\n material.emission = fragColor.rgb;\n \n return material;\n }\n "},_getCircleFadeShader:function(t){if(t&&t.get)return"czm_material czm_getMaterial(czm_materialInput materialInput)\n \n {\n \n czm_material material = czm_getDefaultMaterial(materialInput);\n \n material.diffuse = 1.5 * color.rgb;\n \n vec2 st = materialInput.st;\n \n float dis = distance(st, vec2(0.5, 0.5));\n \n float per = fract(time);\n \n if(dis > per * 0.5){\n \n //material.alpha = 0.0;\n \n discard;\n \n }else {\n \n material.alpha = color.a * dis / per / 2.0;\n \n }\n \n return material;\n \n }"},_getDynamicCircleShader:function(t){if(t&&t.get)return"uniform vec4 color;\n uniform float duration;\n uniform float count;\n uniform float gradient;\n \n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n vec3 str = materialInput.str;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(czm_frameNumber / duration);\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis > 0.5){\n discard;\n } else {\n float perDis = 0.5 / count;\n float disNum;\n float bl = .0;\n for (int i = 0; i <= 10; i++) {\n if (float(i) <= count) {\n disNum = perDis * float(i) - dis + per / count;\n if (disNum > 0.0) {\n if (disNum < perDis) {\n bl = 1.0 - disNum / perDis;\n } else if (disNum - perDis < perDis) {\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl, gradient);\n }\n }\n }\n }\n return material;\n }\n "},_getRadarScanShader:function(t){if(t&&t.get)return"uniform sampler2D colorTexture;\n uniform sampler2D depthTexture;\n in vec2 v_textureCoordinates;\n uniform vec4 u_scanCenterEC;\n uniform vec3 u_scanPlaneNormalEC;\n uniform vec3 u_scanLineNormalEC;\n out vec4 myOutputColor;\n uniform float u_radius;\n uniform vec4 u_scanColor;\n \n vec4 toEye(in vec2 uv, in float depth){\n vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));\n vec4 posInCamera =czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera =posInCamera / posInCamera.w;\n return posInCamera;\n }\n \n bool isPointOnLineRight(in vec3 ptOnLine, in vec3 lineNormal, in vec3 testPt){\n vec3 v01 = testPt - ptOnLine;\n normalize(v01);\n vec3 temp = cross(v01, lineNormal);\n float d = dot(temp, u_scanPlaneNormalEC);\n return d > 0.5;\n }\n \n vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point){\n vec3 v01 = point -planeOrigin;\n float d = dot(planeNormal, v01) ;\n return (point - planeNormal * d);\n }\n \n float distancePointToLine(in vec3 ptOnLine, in vec3 lineNormal, in vec3 testPt){\n vec3 tempPt = pointProjectOnPlane(lineNormal, ptOnLine, testPt);\n return length(tempPt - ptOnLine);\n }\n \n float getDepth(in vec4 depth){\n float z_window = czm_unpackDepth(depth);\n z_window = czm_reverseLogDepth(z_window);\n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n return (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n }\n \n void main(){\n myOutputColor = texture(colorTexture, v_textureCoordinates);\n float depth = getDepth( texture(depthTexture, v_textureCoordinates));\n vec4 viewPos = toEye(v_textureCoordinates, depth);\n vec3 prjOnPlane = pointProjectOnPlane(u_scanPlaneNormalEC.xyz, u_scanCenterEC.xyz, viewPos.xyz);\n float dis = length(prjOnPlane.xyz - u_scanCenterEC.xyz);\n float twou_radius = u_radius * 2.0;\n if(dis < u_radius){\n float f0 = 1.0 -abs(u_radius - dis) / u_radius;\n f0 = pow(f0, 64.0);\n vec3 lineEndPt = vec3(u_scanCenterEC.xyz) + u_scanLineNormalEC * u_radius;\n float f = 0.0;\n if(isPointOnLineRight(u_scanCenterEC.xyz, u_scanLineNormalEC.xyz, prjOnPlane.xyz)){\n float dis1= length(prjOnPlane.xyz - lineEndPt);\n f = abs(twou_radius -dis1) / twou_radius;\n f = pow(f, float("+t.width+"));\n }\n if(float("+t.border+") > 0.0){\n myOutputColor = mix(myOutputColor, u_scanColor, f + f0);\n } else {\n myOutputColor = mix(myOutputColor, u_scanColor, f);\n }\n }\n }\n "},_getCircleScanShader:function(t){if(t&&t.get)return"uniform sampler2D colorTexture;\n uniform sampler2D depthTexture;\n in vec2 v_textureCoordinates;\n uniform vec4 u_scanCenterEC;\n uniform vec3 u_scanPlaneNormalEC;\n uniform float u_radius;\n out vec4 myOutputColor;\n uniform vec4 u_scanColor;\n \n vec4 toEye(in vec2 uv, in float depth){\n vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));\n vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera =posInCamera / posInCamera.w;\n return posInCamera;\n }\n \n vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point){\n vec3 v01 = point - planeOrigin;\n float d = dot(planeNormal, v01) ;\n return (point - planeNormal * d);\n }\n \n float getDepth(in vec4 depth){\n float z_window = czm_unpackDepth(depth);\n z_window = czm_reverseLogDepth(z_window);\n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n return (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n }\n \n void main(){\n myOutputColor = texture(colorTexture, v_textureCoordinates);\n float depth = getDepth(texture(depthTexture, v_textureCoordinates));\n vec4 viewPos = toEye(v_textureCoordinates, depth);\n vec3 prjOnPlane = pointProjectOnPlane(u_scanPlaneNormalEC.xyz, u_scanCenterEC.xyz, viewPos.xyz);\n float dis = length(prjOnPlane.xyz - u_scanCenterEC.xyz);\n if(dis < u_radius){\n float f = 1.0 - abs(u_radius - dis) / u_radius;\n f = pow(f, float("+t.border+"));\n myOutputColor = mix(myOutputColor, u_scanColor, f);\n }\n }\n "}};let _={},r=void 0;function b(t,e,i){t&&(this._viewer=t,_=e,r=i,_.Ion.defaultAccessToken="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmYzkwZWEwYy1mMmIwLTQwYjctOWJlOC00OWU4ZWU1YTZhOTkiLCJpZCI6MTIxODIsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NjA0OTUyNDN9.wagvw7GxUjxvHXO6m2jjX5Jh9lN0UyTJhNGEcSm2pgE",this._drawLayer=new _.CustomDataSource("drawLayer"),t&&t.dataSources.add(this._drawLayer),this.myname="BASE",this._installBaiduImageryProvider(),this._installGooGleImageryProvider(),this._installAmapImageryProvider(),this._installTencentImageryProvider(),this._installTdtImageryProvider(),this._installGroundSkyBox())}b.prototype={createGraphics:function(){return new _.Entity},getDfSt(t){if(r)return t=t.reduce((t,e)=>(t||r)[e],void 0),r.baseService+t},setOneSkyBox:function(){return new _.SkyBox({sources:{positiveX:this.getDfSt(["skyBox","one","positiveX"])||"static/data/images/SkyBox/00h+00.jpg",negativeX:this.getDfSt(["skyBox","one","negativeX"])||"static/data/images/SkyBox/12h+00.jpg",positiveY:this.getDfSt(["skyBox","one","positiveY"])||"static/data/images/SkyBox/06h+00.jpg",negativeY:this.getDfSt(["skyBox","one","negativeY"])||"static/data/images/SkyBox/18h+00.jpg",positiveZ:this.getDfSt(["skyBox","one","positiveZ"])||"static/data/images/SkyBox/06h+90.jpg",negativeZ:this.getDfSt(["skyBox","one","negativeZ"])||"static/data/images/SkyBox/06h-90.jpg"}})},setTwoSkyBox:function(){return new _.SkyBox({sources:{positiveX:this.getDfSt(["skyBox","two","negativeZ"])||"static/data/images/SkyBox/Version2_dark_px.jpg",negativeX:this.getDfSt(["skyBox","two","negativeX"])||"static/data/images/SkyBox/Version2_dark_mx.jpg",positiveY:this.getDfSt(["skyBox","two","positiveY"])||"static/data/images/SkyBox/Version2_dark_py.jpg",negativeY:this.getDfSt(["skyBox","two","negativeY"])||"static/data/images/SkyBox/Version2_dark_my.jpg",positiveZ:this.getDfSt(["skyBox","two","positiveZ"])||"static/data/images/SkyBox/Version2_dark_pz.jpg",negativeZ:this.getDfSt(["skyBox","two","negativeZ"])||"static/data/images/SkyBox/Version2_dark_mz.jpg"}})},setThreeSkyBox:function(){return new _.SkyBox({sources:{positiveX:this.getDfSt(["skyBox","three","negativeZ"])||"static/data/images/SkyBox/tycho2t3_80_pxs.jpg",negativeX:this.getDfSt(["skyBox","three","negativeX"])||"static/data/images/SkyBox/tycho2t3_80_mxs.jpg",positiveY:this.getDfSt(["skyBox","three","positiveY"])||"static/data/images/SkyBox/tycho2t3_80_pys.jpg",negativeY:this.getDfSt(["skyBox","three","negativeY"])||"static/data/images/SkyBox/tycho2t3_80_mys.jpg",positiveZ:this.getDfSt(["skyBox","three","positiveZ"])||"static/data/images/SkyBox/tycho2t3_80_pzs.jpg",negativeZ:this.getDfSt(["skyBox","three","negativeZ"])||"static/data/images/SkyBox/tycho2t3_80_mzs.jpg"}})},setOneGroundSkyBox:function(){return new _.Scene.GroundSkyBox({sources:{positiveX:this.getDfSt(["skyBox","nearOne","positiveX"])||"static/data/images/SkyBox/rightav9.jpg",negativeX:this.getDfSt(["skyBox","nearOne","negativeX"])||"static/data/images/SkyBox/leftav9.jpg",positiveY:this.getDfSt(["skyBox","nearOne","positiveY"])||"static/data/images/SkyBox/frontav9.jpg",negativeY:this.getDfSt(["skyBox","nearOne","negativeY"])||"static/data/images/SkyBox/backav9.jpg",positiveZ:this.getDfSt(["skyBox","nearOne","positiveZ"])||"static/data/images/SkyBox/topav9.jpg",negativeZ:this.getDfSt(["skyBox","nearOne","negativeZ"])||"static/data/images/SkyBox/bottomav9.jpg"}})},setTwoGroundSkyBox:function(){return new _.Scene.GroundSkyBox({sources:{positiveX:this.getDfSt(["skyBox","nearTwo","positiveX"])||"static/data/images/SkyBox/SunSetRight.png",negativeX:this.getDfSt(["skyBox","nearTwo","negativeX"])||"static/data/images/SkyBox/SunSetLeft.png",positiveY:this.getDfSt(["skyBox","nearTwo","positiveY"])||"static/data/images/SkyBox/SunSetFront.png",negativeY:this.getDfSt(["skyBox","nearTwo","negativeY"])||"static/data/images/SkyBox/SunSetBack.png",positiveZ:this.getDfSt(["skyBox","nearTwo","positiveZ"])||"static/data/images/SkyBox/SunSetUp.png",negativeZ:this.getDfSt(["skyBox","nearTwo","negativeZ"])||"static/data/images/SkyBox/SunSetDown.png"}})},setThreeGroundSkyBox:function(){return new _.Scene.GroundSkyBox({sources:{positiveX:this.getDfSt(["skyBox","nearThree","positiveX"])||"static/data/images/SkyBox/Right.jpg",negativeX:this.getDfSt(["skyBox","nearThree","negativeX"])||"static/data/images/SkyBox/Left.jpg",positiveY:this.getDfSt(["skyBox","nearThree","positiveY"])||"static/data/images/SkyBox/Front.jpg",negativeY:this.getDfSt(["skyBox","nearThree","negativeY"])||"static/data/images/SkyBox/Back.jpg",positiveZ:this.getDfSt(["skyBox","nearThree","positiveZ"])||"static/data/images/SkyBox/Up.jpg",negativeZ:this.getDfSt(["skyBox","nearThree","negativeZ"])||"static/data/images/SkyBox/Down.jpg"}})},setDarkEffect:function(t){return t=t||{},this._viewer.scene.postProcessStages.add(new _.PostProcessStage({name:"darkEffect",fragmentShader:"uniform sampler2D colorTexture;\nin vec2 v_textureCoordinates;\nuniform float scale;\nuniform vec3 offset;\nvoid main() {\n vec4 color = texture(colorTexture, v_textureCoordinates);\n out_FragColor = vec4(color.r*0.2,color.g * 0.4,color.b*0.6, 1.0);\n}\n",uniforms:{scale:1,offset:function(){return t.offset||new _.Cartesian3(.1,.2,.3)}}}))},setBlurBloom:function(t){if(this._viewer&&t)return this._viewer.scene.postProcessStages.add(new _.PostProcessStage({name:"blur_x_direction",fragmentShader:"uniform float height;\nuniform float width;\nuniform sampler2D colorTexture1;\n\nin vec2 v_textureCoordinates;\n\nconst int SAMPLES = 9;\nvoid main()\n{\nvec2 st = v_textureCoordinates;\nfloat wr = float(1.0 / width);\nfloat hr = float(1.0 / height);\nvec4 result = vec4(0.0);\nint count = 0;\nfor(int i = -SAMPLES; i <= SAMPLES; ++i){\nfor(int j = -SAMPLES; j <= SAMPLES; ++j){\nvec2 offset = vec2(float(i) * wr, float(j) * hr);\nresult += texture(colorTexture1, st + offset);\n}\n}\nresult = result / float(count);\nout_FragColor = result;\n}\n",uniforms:{width:t.width,height:t.height,colorTexture1:"Bright"}}))},setRainEffect:function(){if(this._viewer)return this._viewer.scene.postProcessStages.add(new _.PostProcessStage({name:"rainEffect",fragmentShader:"uniform sampler2D colorTexture;\n in vec2 v_textureCoordinates;\n \n float hash(float x){\n return fract(sin(x*23.3)*13.13);\n }\n \n void main(){\n float time = czm_frameNumber / 60.0;\n vec2 resolution = czm_viewport.zw;\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 c=vec3(.6,.7,.8);\n float a=-.4;\n float si=sin(a),co=cos(a);\n uv*=mat2(co,-si,si,co);\n uv*=length(uv+vec2(0,4.9))*.3+1.;\n float v=1.-sin(hash(floor(uv.x*100.))*2.);\n float b=clamp(abs(sin(20.*time*v+uv.y*(5./(2.+v))))-.95,0.,1.)*20.;\n c*=v*b;\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(c, 1), 0.2);\n }\n "}))},setSnowEffect:function(){if(this._viewer)return this._viewer.scene.postProcessStages.add(new _.PostProcessStage({name:"snowEffect",fragmentShader:"uniform sampler2D colorTexture;\n in vec2 v_textureCoordinates;\n float snow(vec2 uv,float scale){\n float time = czm_frameNumber / 60.0;\n float w=smoothstep(1.,0.,-uv.y*(scale/10.));\n if(w<.1)return 0.;\n uv+=time/scale;\n uv.y+=time*2./scale;\n uv.x+=sin(uv.y+time*.5)/scale;\n uv*=scale;\n vec2 s=floor(uv),f=fract(uv),p;\n float k=3.,d;\n p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7,3,6,5))*5.))-f;\n d=length(p);\n k=min(d,k);\n k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\n return k*w;\n }\n \n void main(){\n vec2 resolution = czm_viewport.zw;\n vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n vec3 finalColor=vec3(0);\n float c = 0.0;\n c+=snow(uv,30.)*.0;\n c+=snow(uv,20.)*.0;\n c+=snow(uv,15.)*.0;\n c+=snow(uv,10.);\n c+=snow(uv,8.);\n c+=snow(uv,6.);\n c+=snow(uv,5.);\n finalColor=(vec3(c));\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.3);\n \n }\n "}))},setFogEffect:function(){if(this._viewer)return this._viewer.scene.postProcessStages.add(new _.PostProcessStage({fragmentShader:"float getDistance(sampler2D depthTexture, vec2 texCoords) \n{ \n float depth = czm_unpackDepth(texture(depthTexture, texCoords)); \n if (depth == 0.0) { \n return czm_infinity; \n } \n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depth); \n return -eyeCoordinate.z / eyeCoordinate.w; \n} \nfloat interpolateByDistance(vec4 nearFarScalar, float distance) \n{ \n float startDistance = nearFarScalar.x; \n float startValue = nearFarScalar.y; \n float endDistance = nearFarScalar.z; \n float endValue = nearFarScalar.w; \n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0); \n return mix(startValue, endValue, t); \n} \nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor) \n{ \n return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a); \n} \nuniform sampler2D colorTexture; \nuniform sampler2D depthTexture; \nuniform vec4 fogByDistance; \nuniform vec4 fogColor; \nin vec2 v_textureCoordinates; \nvoid main(void) \n{ \n float distance = getDistance(depthTexture, v_textureCoordinates); \n vec4 sceneColor = texture(colorTexture, v_textureCoordinates); \n float blendAmount = interpolateByDistance(fogByDistance, distance); \n vec4 finalFogColor = vec4(fogColor.rgb, fogColor.a * blendAmount); \n out_FragColor = alphaBlend(finalFogColor, sceneColor); \n} \n",uniforms:{fogByDistance:new _.Cartesian4(10,0,200,.3),fogColor:_.Color.AZURE}}))},setDefSceneConfig:function(){this._viewer&&(this._viewer.scene.sun.show=!1,this._viewer.scene.moon.show=!1,this._viewer.scene.fxaa=!0,this._viewer.scene.globe.depthTestAgainstTerrain=!0,this._viewer.scene.undergroundMode=!1,this._viewer.scene.terrainProvider.isCreateSkirt=!1,this._viewer.scene.skyAtmosphere.show=!1,this._viewer.scene.globe.showGroundAtmosphere=!1,this._viewer.scene.globe.enableLighting=!0,this._viewer.scene.fog.enabled=!1,this._viewer.cesiumWidget.creditContainer.style.display="none")},setBloomLightScene:function(){this._viewer&&(this._viewer.scene.postProcessStages.bloom.enabled=!0,this._viewer.scene.postProcessStages.bloom.uniforms.contrast=119,this._viewer.scene.postProcessStages.bloom.uniforms.brightness=-.4,this._viewer.scene.postProcessStages.bloom.uniforms.glowOnly=!1,this._viewer.scene.postProcessStages.bloom.uniforms.delta=.9,this._viewer.scene.postProcessStages.bloom.uniforms.sigma=3.78,this._viewer.scene.postProcessStages.bloom.uniforms.stepSize=5,this._viewer.scene.postProcessStages.bloom.uniforms.isSelected=!1)},removePostProcessStage:function(t){t&&(Array.isArray(t)?t.forEach(t=>{this._viewer.scene.postProcessStages.contains(t)&&this._viewer.scene.postProcessStages.remove(t)}):this._viewer.scene.postProcessStages.contains(t)&&this._viewer.scene.postProcessStages.remove(t))},setView:function(t){var e;this._viewer&&t&&t.position&&(t.distance&&(e=new _.Cartesian3(0,t.distance,window.opt.distance),t.position=_.Cartesian3.add(t.position,e,new _.Cartesian3)),this._viewer.scene.camera.setView({destination:t.position,orientation:t.orientation||{heading:_.Math.toRadians(90),pitch:_.Math.toRadians(90),roll:_.Math.toRadians(0)}}))},flyTo:function(t){var e;this._viewer&&t&&t.position&&(t.distance&&(e=new _.Cartesian3(0,t.distance,t.distance),t.position=_.Cartesian3.add(t.position,e,new _.Cartesian3)),this._viewer.scene.camera.flyTo({destination:t.position,orientation:t.orientation||{heading:_.Math.toRadians(90),pitch:_.Math.toRadians(90),roll:_.Math.toRadians(0)},easingFunction:t.easingFunction||_.EasingFunction.LINEAR_NONE,duration:t.duration||3,complete:t.callback}))},transformCartesianToWGS84:function(t){if(this._viewer&&t)return t=_.Ellipsoid.WGS84.cartesianToCartographic(t),{lng:_.Math.toDegrees(t.longitude),lat:_.Math.toDegrees(t.latitude),alt:t.height}},transformWGS84ArrayToCartesianArray:function(t,e){var i;if(this._viewer&&t)return i=this,t?t.map(function(t){return i.transformWGS84ToCartesian(t,e)}):[]},transformWGS84ToCartesian:function(t,e){if(this._viewer)return t?_.Cartesian3.fromDegrees(t.lng||t.lon,t.lat,t.alt=e||t.alt,_.Ellipsoid.WGS84):_.Cartesian3.ZERO},transformCartesianArrayToWGS84Array:function(t){var e;if(this._viewer)return e=this,t?t.map(function(t){return e.transformCartesianToWGS84(t)}):[]},setCameraEotateHeading(l){if(l){let e=this._viewer,i=_.Cartesian3.fromDegrees(l.lng,l.lat,l.height),n=_.Math.toRadians(-30),a=12,r=5e3,t=_.JulianDate.fromDate(new Date),o=(e.clock.startTime=t.clone(),e.clock.currentTime=t.clone(),e.clock.clockRange=_.ClockRange.CLAMPED,e.clock.clockStep=_.ClockStep.SYSTEM_CLOCK,e.camera.heading),s=function(){var t=_.JulianDate.secondsDifference(e.clock.currentTime,e.clock.startTime),t=_.Math.toRadians(t*a)+o;e.scene.camera.setView({destination:i,orientation:{heading:t,pitch:n}}),e.scene.camera.moveBackward(r),0<=_.JulianDate.compare(e.clock.currentTime,e.clock.stopTime)&&e.clock.onTick.removeEventListener(s)};e.clock.onTick.addEventListener(s)}},transformWGS84ToCartographic:function(t){return t?_.Cartographic.fromDegrees(t.lng||t.lon,t.lat,t.alt):_.Cartographic.ZERO},getCatesian3FromPX:function(t){if(this._viewer&&t){var e,i,n=this._viewer.scene.pick(t),a=null,r=!1,o=!1;if((r=n instanceof _.Cesium3DTileFeature?!0:r)&&(a=this._viewer.scene.pickPosition(t))&&((e=_.Cartographic.fromCartesian(a)).height<0&&(e.height=0),s=_.Math.toDegrees(e.longitude),i=_.Math.toDegrees(e.latitude),e=e.height,a=this.transformWGS84ToCartesian({lng:s,lat:i,alt:e})),!n){var s=this._viewer.scene.camera.getPickRay(t);if(!s)return null;a=this._viewer.scene.globe.pick(s,this._viewer.scene),o=!0}return(a=r||o?a:this._viewer.scene.camera.pickEllipsoid(t,this._viewer.scene.globe.ellipsoid))?(i=this.transformCartesianToWGS84(a)).alt<0?this.transformWGS84ToCartesian(i,.1):a:!1}},getCameraPosition:function(){if(this._viewer){var t,e,i,n,a,r,o,s,l,c,h,d=this._viewer.scene.camera.pickEllipsoid(new _.Cartesian2(this._viewer.canvas.clientWidth/2,this._viewer.canvas.clientHeight/2));if(d)return t=180*(d=_.Ellipsoid.WGS84.cartesianToCartographic(d)).longitude/Math.PI,d=180*d.latitude/Math.PI,n=this._viewer.camera._direction,e=_.Math.toDegrees(n.x),i=_.Math.toDegrees(n.y),n=_.Math.toDegrees(n.z),a=this._viewer.camera.positionCartographic.height,r=_.Math.toDegrees(this._viewer.camera.heading),o=_.Math.toDegrees(this._viewer.camera.pitch),s=_.Math.toDegrees(this._viewer.camera.roll),c=(l=this._viewer.camera.computeViewRectangle()).west/Math.PI*180,h=l.north/Math.PI*180,c=(c+l.east/Math.PI*180)/2,h=(h+l.south/Math.PI*180)/2,{lon:t,lat:d,height:a,heading:r,pitch:o,roll:s,position:this._viewer.camera.position,cameraHeading:this._viewer.camera.heading,cameraPitch:this._viewer.camera.pitch,cameraRoll:this._viewer.camera.roll,center:{x:c,y:h},direction:new _.Cartesian3(e,i,n)}}},updateCameraState:function(t){this._viewer.scene._screenSpaceCameraController.enableRotate=t,this._viewer.scene._screenSpaceCameraController.enableTranslate=t,this._viewer.scene._screenSpaceCameraController.enableZoom=t,this._viewer.scene._screenSpaceCameraController.enableTilt=t,this._viewer.scene._screenSpaceCameraController.enableLook=t},bindHandelEvent:function({leftClick:e,mouseMove:i,doubleClick:n,leftDown:a,mouseWheel:r,leftUp:o}){var s;this._viewer&&(s=new _.ScreenSpaceEventHandler(this._viewer.canvas),e&&s.setInputAction(function(t){e(t,s)},_.ScreenSpaceEventType.LEFT_CLICK),i&&s.setInputAction(function(t){i(t,s)},_.ScreenSpaceEventType.MOUSE_MOVE),n&&s.setInputAction(function(t){n(t,s)},_.ScreenSpaceEventType.LEFT_DOUBLE_CLICK),a&&s.setInputAction(function(t){a(t,s)},_.ScreenSpaceEventType.LEFT_DOWN),r&&s.setInputAction(function(t){r(t,s)},_.ScreenSpaceEventType.WHEEL),o)&&s.setInputAction(function(t){o(t,s)},_.ScreenSpaceEventType.LEFT_UP)},getHandelPosition:function(e){var i,n;this._viewer&&(i=new _.ScreenSpaceEventHandler(this._viewer.scene.canvas),n=this,i.setInputAction(function(t){t=n._viewer.scene.camera.pickEllipsoid(t.endPosition,n._viewer.scene.globe.ellipsoid);"function"==typeof e&&e(n.transformCartesianToWGS84(t),i)},_.ScreenSpaceEventType.MOUSE_MOVE))},saveSceneImages:function(){var t,e;this._viewer&&(e=this._viewer.scene.canvas.toDataURL("image/png").replace("image/png","image/octet-stream"),t=document.createElement("a"),e=function(t){for(var t=t.split(","),e=t[0].match(/:(.*?);/)[1],i=atob(t[1]),n=i.length,a=new Uint8Array(n);n--;)a[n]=i.charCodeAt(n);return new Blob([a],{type:e})}(e),e=URL.createObjectURL(e),t.download="scene.png",t.href=e,t.click())},_installAmapImageryProvider:function(){_.Scene.AmapImageryProvider=function(t){return t.url="img"===t.style?"https://webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}":"http://webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}",t.subdomains||(t.subdomains=["01","02","03","04"]),new _.UrlTemplateImageryProvider(t)}},_installTdtImageryProvider:function(){_.Scene.TdtImageryProvider=function(t){return new _.UrlTemplateImageryProvider({url:"http://t{s}.tianditu.gov.cn/{layer}_c/wmts?service=WMTS&version=1.0.0&request=GetTile&tilematrix={TileMatrix}&layer={layer}&style={style}&tilerow={TileRow}&tilecol={TileCol}&tilematrixset={TileMatrixSet}&format=tiles&tk={key}".replace(/\{layer\}/g,t.style||"vec").replace(/\{key\}/g,t.key||""),style:"default",format:"tiles",tileMatrixSetID:"c",matrixSet:"c",wrapX:!0,crossOrigin:"anonymous",subdomains:[...Array(6).keys()].map(t=>(t+1).toString()),tileMatrixLabels:[...Array(18).keys()].map(t=>(t+1).toString()),tilingScheme:new _.GeographicTilingScheme,maximumLevel:18})}},_installTencentImageryProvider:function(){_.Scene.TencentImageryProvider=function(t){return t.layer="img",t.url="https://p2.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=229",t.subdomains||(t.subdomains=["0","1","2"]),t.customTags={sx:function(t,e,i,n){return e>>4},sy:function(t,e,i,n){return(1<<n)-i>>4}},new _.UrlTemplateImageryProvider(t)}},_installGooGleImageryProvider:function(){_.Scene.GoogleImageryProvider=function(t){return t.url="img"===t.style?"http://mt{s}.google.cn/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}&s=Gali":"ter"===t.style?"http://mt{s}.google.cn/vt/lyrs=t@131,r@227000000&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}&s=Galile":"http://mt{s}.google.cn/vt/lyrs=m@207000000&hl=zh-CN&gl=CN&src=app&x={x}&y={y}&z={z}&s=Galile",t.subdomains||(t.subdomains=["1","2","3","4","5"]),new _.UrlTemplateImageryProvider(t)}},_installBaiduImageryProvider:function(){var e="http://api{s}.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&scale=1&customid={style}";function t(t){e=t.temp_url||e,this._url=e,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=18,this._minimumLevel=1,this._tilingScheme=new _.WebMercatorTilingScheme({rectangleSouthwestInMeters:new _.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new _.Cartesian2(33554054,33746824)}),this._rectangle=this._tilingScheme.rectangle,this._credit=void 0,this._style=t.style||"normal"}Object.defineProperties(t.prototype,{url:{get:function(){return this._url}},token:{get:function(){return this._token}},tileWidth:{get:function(){if(this.ready)return this._tileWidth;throw new _.DeveloperError("tileWidth must not be called before the imagery provider is ready.")}},tileHeight:{get:function(){if(this.ready)return this._tileHeight;throw new _.DeveloperError("tileHeight must not be called before the imagery provider is ready.")}},maximumLevel:{get:function(){if(this.ready)return this._tileHeight;throw new _.DeveloperError("tileHeight must not be called before the imagery provider is ready.")}},minimumLevel:{get:function(){if(this.ready)return 0;throw new _.DeveloperError("minimumLevel must not be called before the imagery provider is ready.")}},tilingScheme:{get:function(){if(this.ready)return this._tilingScheme;throw new _.DeveloperError("tilingScheme must not be called before the imagery provider is ready.")}},rectangle:{get:function(){if(this.ready)return this._rectangle;throw new _.DeveloperError("rectangle must not be called before the imagery provider is ready.")}},ready:{get:function(){return!!this._url}},credit:{get:function(){return this._credit}}}),t.prototype.requestImage=function(t,e,i){var n,a;if(this.ready)return n=this._tilingScheme.getNumberOfXTilesAtLevel(i),a=this._tilingScheme.getNumberOfYTilesAtLevel(i),t=this._url.replace("{x}",t-n/2).replace("{y}",a/2-e-1).replace("{z}",i).replace("{s}",1).replace("{style}",this._style),_.ImageryProvider.loadImage(this,t);throw new _.DeveloperError("requestImage must not be called before the imagery provider is ready.")},_.Scene.BaiduImageryProvider=t},_installGroundSkyBox:function(){var o=_.BoxGeometry,s=_.Cartesian3,e=_.defaultValue,l=_.defined,i=_.destroyObject,c=_.DeveloperError,h=_.GeometryPipeline,t=_.Matrix3,d=_.Matrix4,u=_.Transforms,x=_.VertexFormat,p=_.BufferUsage,m=_.CubeMap,n=_.DrawCommand,g=_.loadCubeMap,f=_.RenderState,v=_.VertexArray,y=_.BlendingState,b=_.SceneMode,C=_.ShaderProgram,w=_.ShaderSource;function a(t){this.sources=t.sources,this._sources=void 0,this.show=e(t.show,!0),this._command=new n({modelMatrix:d.clone(d.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}l(d.getRotation)||(d.getRotation=d.getMatrix3);var I=new t;a.prototype.update=function(t,e){var i=this;if(this.show&&(t.mode===b.SCENE3D||t.mode===b.MORPHING)&&t.passes.render){var n=t.context;if(this._sources!==this.sources){this._sources=this.sources;var a=this.sources;if(!(l(a.positiveX)&&l(a.negativeX)&&l(a.positiveY)&&l(a.negativeY)&&l(a.positiveZ)&&l(a.negativeZ)))throw new c("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof a.positiveX!=typeof a.negativeX||typeof a.positiveX!=typeof a.positiveY||typeof a.positiveX!=typeof a.negativeY||typeof a.positiveX!=typeof a.positiveZ||typeof a.positiveX!=typeof a.negativeZ)throw new c("this.sources properties must all be the same type.");"string"==typeof a.positiveX?g(n,this._sources).then(function(t){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=t}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new m({context:n,source:a}))}var r=this._command;if(r.modelMatrix=u.eastNorthUpToFixedFrame(t.camera._positionWC),l(r.vertexArray)||(r.uniformMap={u_cubeMap:function(){return i._cubeMap},u_rotateMatrix:function(){return d.getRotation(r.modelMatrix,I)}},a=o.createGeometry(o.fromDimensions({dimensions:new s(2,2,2),vertexFormat:x.POSITION_ONLY})),t=this._attributeLocations=h.createAttributeLocations(a),r.vertexArray=v.fromGeometry({context:n,geometry:a,attributeLocations:t,bufferUsage:p._DRAW}),r.renderState=f.fromCache({blending:y.ALPHA_BLEND})),l(r.shaderProgram)&&this._useHdr===e||(a=new w({defines:[e?"HDR":""],sources:["uniform samplerCube u_cubeMap;\n in vec3 v_texCoord;\n void main()\n {\n vec4 color = texture(u_cubeMap, normalize(v_texCoord));\n out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);\n }\n "]}),r.shaderProgram=C.fromCache({context:n,vertexShaderSource:"in vec3 position;\n out vec3 v_texCoord;\n uniform mat3 u_rotateMatrix;\n void main()\n {\n vec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position.xyz;\n }\n ",fragmentShaderSource:a,attributeLocations:this._attributeLocations}),this._useHdr=e),l(this._cubeMap))return r}},a.prototype.isDestroyed=function(){return!1},a.prototype.destroy=function(){var t=this._command;return t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),i(this)},_.Scene.GroundSkyBox=a},removeHandlerByName(t=[]){t.forEach(t=>{this._viewer.screenSpaceEventHandler.removeInputAction(_.ScreenSpaceEventType[t])})}};let I={};function z(t,e){t&&(this._viewer=t,I=e)}z.prototype={splitCartesians3:function(t){for(var e=[],i=0;i<t.length;i+=3){var n=new I.Cartesian3(t[i],t[i+1],t[i+2]);e.push(n)}return e.push(e[0]),e},getLinkedPointList:function(t,e,i,n){if(this._viewer){var a=[],r=I.Cartographic.fromCartesian(t),o=I.Cartographic.fromCartesian(e),s=180*r.longitude/Math.PI,r=180*r.latitude/Math.PI,l=180*o.longitude/Math.PI,o=180*o.latitude/Math.PI,c=Math.sqrt((s-l)*(s-l)+(r-o)*(r-o))*i,h=I.Cartesian3.clone(t),d=I.Cartesian3.clone(e),u=I.Cartesian3.distance(h,I.Cartesian3.ZERO),x=I.Cartesian3.distance(d,I.Cartesian3.ZERO);if(I.Cartesian3.normalize(h,h),I.Cartesian3.normalize(d,d),0!=I.Cartesian3.distance(h,d)){var p=I.Cartesian3.angleBetween(h,d);a.push(t);for(var m=1;m<n-1;m++){var g=+m/(n-1),f=1-g,v=Math.sin(f*p)/Math.sin(p),y=Math.sin(g*p)/Math.sin(p),v=I.Cartesian3.multiplyByScalar(h,v,new I.Cartesian3),y=I.Cartesian3.multiplyByScalar(d,y,new I.Cartesian3),v=I.Cartesian3.add(v,y,new I.Cartesian3),y=g*Math.PI,f=u*f+x*g+Math.sin(y)*c,v=I.Cartesian3.multiplyByScalar(v,f,v);a.push(v)}a.push(e)}return a}},getPositionsAngle:function(t){var e,i,n,a;if(t)return i=t.position1,a=t.position2,n=I.Transforms.eastNorthUpToFixedFrame(i),n=I.Matrix4.inverse(n,new I.Matrix4),i=I.Matrix4.multiplyByPoint(n,i,new I.Cartesian3),n=I.Matrix4.multiplyByPoint(n,a,new I.Cartesian3),"pitch"===t.type?e=Math.atan2(n.z-i.z,n.x-i.x):"heading "===t.type&&(e=Math.atan2(n.y-i.y,n.x-i.x)),(a=e*(180/Math.PI))<0&&(a+=360),a},getPositionsArea:function(n){let t=0;if(n){let e=0,i=I.Ellipsoid.WGS84;n.push(n[0]);for(let t=1;t<n.length;t++){var a=i.cartographicToCartesian(this.transformWGS84ToCartographic(n[t-1])),r=i.cartographicToCartesian(this.transformWGS84ToCartographic(n[t]));e+=a.x*r.y-r.x*a.y}t=Math.abs(e).toFixed(2)}return t},getPolygonArea:function(t){if(this._viewer){for(var e=function(t,e){var i=t.lat*radiansPerDegree,t=t.lon*radiansPerDegree,n=e.lat*radiansPerDegree,e=e.lon*radiansPerDegree,i=-Math.atan2(Math.sin(t-e)*Math.cos(n),Math.cos(i)*Math.sin(n)-Math.sin(i)*Math.cos(n)*Math.cos(t-e));return i<0&&(i+=2*Math.PI),i*degreesPerRadian},i=0,n=0;n<t.length-2;n++){var a=(n+1)%t.length,r=(n+2)%t.length,o=(o=t[n],s=t[a],l=t[r],c=void 0,(c=e(s,o)-e(s,l))<0&&(c+=360),c);i+=this.getPositionsDistance(positions[n],positions[a])*this.getPositionsDistance(positions[a],positions[r])*Math.abs(Math.sin(o))}return(i/1e6).toFixed(4)}var o,s,l,c},getPointDistance:function(t,e){var i;if(this._viewer)return t=I.Cartographic.fromCartesian(t),e=I.Cartographic.fromCartesian(e),(i=new I.EllipsoidGeodesic).setEndPoints(t,e),i=i.surfaceDistance,Math.sqrt(Math.pow(i,2)+Math.pow(e.height-t.height,2))},getPositionDistance:function(e){let i=0;for(let t=0;t<e.length-1;t++){var n=this.transformWGS84ToCartographic(e[t]),a=this.transformWGS84ToCartographic(e[t+1]),r=new I.EllipsoidGeodesic,r=(r.setEndPoints(n,a),r.surfaceDistance),r=Math.sqrt(Math.pow(r,2)+Math.pow(a.height-n.height,2));i+=r}return i.toFixed(3)},getIntersectObj:function(t,e,i=[],n=!1){if(this._viewer)return e=I.Cartesian3.normalize(I.Cartesian3.subtract(e,t,new I.Cartesian3),new I.Cartesian3),t=new I.Ray(t,e),e=[],n?e=this._viewer.scene.drillPickFromRay(t,10,i):(n=this._viewer.scene.pickFromRay(t,i),I.defined(n)&&(e=[n])),e},getPointOnEllipsoid:function(t,e,i,n,a,r,o,s,l,c){var h,d,u,x;if(this._viewer)return h=new I.Cartesian3,d=new I.Cartesian3,u=new I.Quaternion,x=new I.Matrix3,e=t+e,I.Cartesian3.multiplyByScalar(n,Math.cos(e),h),I.Cartesian3.multiplyByScalar(i,Math.sin(e),d),I.Cartesian3.add(h,d,h),n=Math.cos(t),n*=n,i=Math.sin(t),i*=i,e=r/Math.sqrt(o*n+a*i)/s,I.Quaternion.fromAxisAngle(h,e,u),I.Matrix3.fromQuaternion(u,x),I.Matrix3.multiplyByVector(x,l,c),I.Cartesian3.normalize(c,c),I.Cartesian3.multiplyByScalar(c,s,c),c},raisePositionsToHeight:function(t,e,i){if(this._viewer){for(var n=new I.Cartesian3,a=new I.Cartesian3,r=new I.Cartesian3,o=new I.Cartesian3,s=e.ellipsoid,l=e.height,c=e.extrudedHeight,e=i?t.length/3*2:t.length/3,h=new Float64Array(3*e),d=t.length,u=i?d:0,x=0;x<d;x+=3){var p=x+1,m=x+2,g=I.Cartesian3.fromArray(t,x,n),f=(s.scaleToGeodeticSurface(g,g),I.Cartesian3.clone(g,a)),v=s.geodeticSurfaceNormal(g,o),y=I.Cartesian3.multiplyByScalar(v,l,r);I.Cartesian3.add(g,y,g),i&&(I.Cartesian3.multiplyByScalar(v,c,y),I.Cartesian3.add(f,y,f),h[x+u]=f.x,h[p+u]=f.y,h[m+u]=f.z),h[x]=g.x,h[p]=g.y,h[m]=g.z}return h}},computeEllipseEdgePositions:function(t){if(this._viewer){for(var e=new I.Cartesian3,i=new I.Cartesian3,n=new I.Cartesian3,a=new I.Cartesian3,r=t.semiMinorAxis,o=t.semiMajorAxis,s=t.rotation,l=t.center,t=t.granularity&&"number"==typeof t.granularity?t.granularity:Math.PI/180,c=((t=t>Math.PI/12?Math.PI/12:t)<Math.PI/180&&(t=Math.PI/180),r*r),h=o*o,d=o*r,u=I.Cartesian3.magnitude(l),x=I.Cartesian3.normalize(l,e),p=I.Cartesian3.cross(I.Cartesian3.UNIT_Z,l,i),p=I.Cartesian3.normalize(p,p),m=I.Cartesian3.cross(x,p,n),g=Math.ceil(2*I.Math.PI/t),f=t,v=a,y=0,b=[],C=0;C<g;C++)v=this.getPointOnEllipsoid(C*f,s,m,p,c,d,h,u,x,v),b[y++]=v.x,b[y++]=v.y,b[y++]=v.z;o={};return o.numPts=g,o.outerPositions=b,o}},computeSectorEdgePositions:function(t){if(this._viewer){for(var e=new I.Cartesian3,i=new I.Cartesian3,n=new I.Cartesian3,a=new I.Cartesian3,r=t.semiMinorAxis,o=t.semiMajorAxis,s=t.rotation,l=t.angle||2*Math.PI,c=t.center,t=t.granularity&&"number"==typeof t.granularity?t.granularity:Math.PI/180,h=((t=t>Math.PI/12?Math.PI/12:t)<Math.PI/180&&(t=Math.PI/180),r*r),d=o*o,u=o*r,x=I.Cartesian3.magnitude(c),p=I.Cartesian3.normalize(c,e),m=I.Cartesian3.cross(I.Cartesian3.UNIT_Z,c,i),m=I.Cartesian3.normalize(m,m),g=I.Cartesian3.cross(p,m,n),f=Math.ceil(l/t),v=t,y=a,b=0,C=[],w=0;w<f;w++)y=this.getPointOnEllipsoid(w*v,s,g,m,h,u,d,x,p,y),C[b++]=y.x,C[b++]=y.y,C[b++]=y.z;o={};return o.numPts=f,o.outerPositions=C,o}},computeLonlatPointsTerrainData:function(t,e){if(this._viewer){for(var i=[],n=0;n<t.length;n++)i.push(I.Cartographic.fromDegrees(t[n].lon,t[n].lat));this._viewer.scene.clampToHeightMostDetailed(i).then(function(t){e(t)})}},computeCartographicPointsTerrainData:function(t,a){if(this._viewer&&!(t.length<=0)){for(var e=[],i=0;i<t.length;i++)e.push(I.Cartesian3.fromRadians(t[i].longitude,t[i].latitude,t[i].height));var n=this._viewer.scene.clampToHeightMostDetailed(e),r=this;n.then(function(t){for(var e=[],i=r._viewer.scene.globe.ellipsoid,n=0;n<t.length;n++)e.push(i.cartesianToCartographic(t[n]));a(e)}).catch(function(t){console.log(t)})}},_checkLonDegree:function(t){return!(180<t||t<-180)},_checkLatDegree:function(t){return!(90<t||t<-90)},computeInterpolateLineLonlat:function(t,e){if(!t||!e)return null;if(t.lon||!t.lat||!e.lon||!e.lat)return null;if(!(this._checkLonDegree(t.lon)&&this._checkLonDegree(e.lon)&&this._checkLatDegree(t.lat)&&this._checkLatDegree(e.lat)))return null;var i=[],n=(i.push([t.lon,t.lat]),Math.sqrt(Math.pow(e.lon-t.lon,2)+Math.pow(e.lat-t.lat,2)));if(n<=1e-5)i.push([e.lon,e.lat]);else for(var a=n/1e-5,r=(e.lon-t.lon)/a,o=(e.lat-t.lat)/a,s=0;s<a;s++){var l=t.lon+(s+1)*r,c=t.lat+(s+1)*o;i.push([l,c])}return i},computeInterpolateLineCartographic:function(t,e,i){if(!t||!e)return null;if(!(t.longitude&&t.latitude&&e.longitude&&e.latitude))return null;var n=[],a=(n.push(new I.Cartographic(t.longitude,t.latitude)),Math.sqrt(Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2))),i=i&&"number"==typeof i?i:1e-5*Math.PI/180;if(a<=i)n.push(new I.Cartographic(e.longitude,e.latitude));else{for(var r=a/i,o=(e.longitude-t.longitude)/r,s=(e.latitude-t.latitude)/r,l=0;l<r;l++){var c=t.longitude+(l+1)*o,h=t.latitude+(l+1)*s;n.push(new I.Cartographic(c,h))}n.push(new I.Cartographic(e.longitude,e.latitude,e.height))}return n},computeInterpolateLineHeightCartographic:function(t,e){if(!t||!e)return null;if(!(t.longitude&&t.latitude&&e.longitude&&e.latitude))return null;var i=[],n=(i.push(new I.Cartographic(t.longitude,t.latitude,t.height)),Math.sqrt(Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2)));if(!(n<=1e-5*Math.PI/180))for(var a=n/1e-5*Math.PI/180,r=(e.longitude-t.longitude)/a,o=(e.latitude-t.latitude)/a,s=(e.height-t.height)/a,l=0;l<a;l++){var c=t.longitude+(l+1)*r,h=t.latitude+(l+1)*o,d=t.height+(l+1)*s;i.push(new I.Cartographic(c,h,d))}return i.push(new I.Cartographic(e.longitude,e.latitude,e.height)),i},computeInterpolate2IndexLineHeightCartographic:function(t,e,i,n){if(!t||!e)return null;if(!(t.longitude&&t.latitude&&e.longitude&&e.latitude))return null;var a=[];a.push(new I.Cartographic(t.longitude,t.latitude,t.height));for(var r=(e.longitude-t.longitude)/i,o=(e.latitude-t.latitude)/i,s=(e.height-t.height)/i,l=0;l<n;l++){var c=t.longitude+(l+1)*r,h=t.latitude+(l+1)*o,d=t.height+(l+1)*s;a.push(new I.Cartographic(c,h,d))}return a},computeInterpolateIndexLineHeightCartographic:function(t,e,i,n){var a,r;return t&&e&&t.longitude&&t.latitude&&e.longitude&&e.latitude?(a=(e.longitude-t.longitude)/i,r=(e.latitude-t.latitude)/i,e=(e.height-t.height)/i,i=t.longitude+n*a,a=t.latitude+n*r,r=t.height+n*e,new I.Cartographic(i,a,r)):null}};let F=null;function L(t,e,i){t&&(this._viewer=t,F=e,this._installPrimitives())}L.prototype={_installPrimitives:function(){this._installProbingPrimitive(),this._installTexturePrimitive(),this._installWaterPrimitive(),this._installPointsPrimitive(),this._installShadowPrimitive(),this._installArrowPolylinePrimitive(),this._installXyzAxisPrimitive(),this._installTetrahedronPrimitive(),this._installCustomPrimitive(),this._installFlowWaterPrimitive()},_installCustomPrimitive:function(){},_installTetrahedronPrimitive:function(){try{var i=F.Cartesian3,n=F.ComponentDatatype,o=F.PrimitiveType,a=F.BoundingSphere,r=F.GeometryAttribute,s=F.GeometryPipeline,l=F.Geometry,c=F.defined,h=F.RenderState,d=F.ShaderSource,u=F.ShaderProgram,x=F.DrawCommand,p=F.Pass,m=F.Appearance,g=F.BufferUsage,e=F.Color,f=F.VertexArray,v=(F.buildModuleUrl,F.Matrix4),y=F.Matrix3,b=F.Texture,t=F.Resource,C=F.Transforms,w=F.defaultValue,I=this._viewer,_=this.getDfSt(["primitive","TetrahedronPrimitive"])||"static/data/images/Textures/fence.png",A=function(t){this.show=!0,this._command=void 0,this._enuMatrix=void 0,this._scaleMatrix=void 0,this._localPosition=t.position,this._createCommand=G,this._angle=0,this._distance=w(t.distance,1),this._setInterval=void 0,this._viewer=I,this._speed=w(t.speed,1),this._color=w(t.color,new e(1,1,0,.8)),this._scale=w(t.scale,new i(10,10,15)),this._texture=void 0,this._imageUrl=_,this._modelMatrix=V(this),this._height=R(this),Z(this)};A.prototype.update=function(t){this.show&&(c(this._command)||(this._command=this._createCommand(t.context,this)),c(this._command))&&t.commandList.push(this._command)},A.prototype.isDestroyed=function(){return!1},A.prototype.destroy=function(){return c(this._command)&&(this._command.shaderProgram=this._command.shaderProgram&&this._command.shaderProgram.destroy()),destroyObject(this)},A.prototype.startAnimate=function(){let e=this;this._setInterval=setInterval(function(){e._angle=e._angle+.01,0<Math.sin(e._angle)?e._height=.01:e._height=-.01;var t=new F.Cartesian3(0,0,e._height),t=(v.multiplyByTranslation(e._modelMatrix,t,e._modelMatrix),v.fromRotationTranslation(y.fromRotationZ(F.Math.toRadians(e._speed))));v.multiply(e._modelMatrix,t,e._modelMatrix)},5)},A.prototype.closeAnimate=function(){clearInterval(this._setInterval)};const G=function(t,e){var i=M(),n=S(),a=m.getDefaultRenderState(!1,!0,void 0),a=h.fromCache(a),i=new d({sources:[i]}),n=new d({sources:[n]}),r={color:function(){return e._color},myImage:function(){return c(e._texture)?e._texture:e._viewer.scene.context.defaultTexture}},i=u.fromCache({context:t,vertexShaderSource:i,fragmentShaderSource:n,attributeLocations:{position:0,textureCoordinates:1}});return new x({vertexArray:P(t),primitiveType:o.TRIANGLES,renderState:a,shaderProgram:i,uniformMap:r,owner:this,pass:p.TRANSLUCENT,modelMatrix:e._modelMatrix})},P=function(t){var e=W(),e=new l({attributes:{position:new r({componentDatatype:n.FLOAT,componentsPerAttribute:3,values:e.positions}),textureCoordinates:new r({componentDatatype:n.FLOAT,componentsPerAttribute:2,values:e.sts})},indices:e.indices,primitiveType:o.TRIANGLES,boundingSphere:a.fromVertices(e.positions)}),e=s.computeNormal(e);return f.fromGeometry({context:t,geometry:e,attributeLocations:{position:0,textureCoordinates:1},bufferUsage:g.STATIC_DRAW})},W=function(){var t=new Float64Array(15),e=(t[0]=0,t[1]=1,t[2]=0,t[3]=-1,t[4]=0,t[5]=0,t[6]=0,t[7]=-1,t[8]=0,t[9]=1,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=-1,new Uint16Array(18));return e[0]=4,e[1]=2,e[2]=3,e[3]=4,e[4]=3,e[5]=0,e[6]=4,e[7]=0,e[8]=1,e[9]=4,e[10]=1,e[11]=2,e[12]=1,e[13]=2,e[14]=3,e[15]=1,e[16]=3,e[17]=0,{indices:e,positions:t,sts:new Float32Array([0,0,1,0,1,1,0,1,.5,.5])}},M=function(){return"#version 300 es\n in vec3 position;\n in vec3 normal;\n in vec2 st;\n in float batchId;\n out vec3 v_positionEC;\n out vec3 v_normalEC;\n out vec2 v_st;\n out vec4 v_pickColor;\n void main()\n {\n v_positionEC = (czm_modelView * vec4(position, 1.0)).xyz;\n v_normalEC = czm_normal * normal;\n v_st = st;\n // v_pickColor = czm_batchTable_pickColor(batchId);\n gl_Position = czm_modelViewProjection * vec4(position, 1.0);\n }\n "},S=function(){return"#version 300 es\n precision mediump float;\n in vec3 v_positionEC;\n in vec3 v_normalEC;\n in vec2 v_st;\n uniform vec4 color;\n in vec4 v_pickColor;\n uniform sampler2D myImage;\n void main()\n {\n vec3 positionToEyeEC = -v_positionEC;\n vec3 normalEC = normalize(v_normalEC);\n #ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n #endif\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n vec2 st = materialInput.st;\n czm_material material = czm_getDefaultMaterial(materialInput);\n float dt_a11 = fract(czm_frameNumber / 100.0) * 3.14159265 * 2.0;\n float dt_a12 = sin(dt_a11);\n float vst=smoothstep(0.7, 1.0, dt_a12)+0.4;\n vec4 colorImage = texture(myImage, vec2(fract(st.s- czm_frameNumber*0.003), st.t));\n material.alpha =mix(0.1,1.0,clamp((1.0-st.t) * color.a,0.0,1.0)) +(1.0-sign(st.t-czm_frameNumber*0.001))*0.2*(1.0-colorImage.r)+0.4;\n material.diffuse =(1.0-colorImage.a)*vec3(1.0,2.0,1.0)+colorImage.rgb*vec3(1.0,2.0,1.0);\n #ifdef FLAT\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n #else\n out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n #endif\n }\n "},Z=function(i){t.createIfNeeded(i._imageUrl).fetchImage().then(function(t){var e=i._viewer.scene.context,e=c(t.internalFormat)?new b({context:e,pixelFormat:t.internalFormat,width:t.naturalWidth,height:t.naturalHeight,source:{arrayBufferView:t.bufferView}}):new b({context:e,source:t});i._texture=e})},V=function(t){var e=C.eastNorthUpToFixedFrame(t._localPosition),i=v.fromScale(t._scale),n=v.multiply(e,i,new v);return t._scaleMatrix=i,t._enuMatrix=e,n},R=function(t){var e=i.fromElements(0,0,t._distance,new F.Cartesian3),e=F.Matrix4.multiplyByPoint(t._enuMatrix,e,new i),e=v.multiplyByPoint(t._viewer.scene.camera._viewMatrix,e,new i),t=v.multiplyByPoint(t._viewer.scene.camera.frustum.projectionMatrix,e,new i);return i.normalize(t,new i).z};F.Scene.TetrahedronPrimitive=A}catch(i){console.log(i)}},_installXyzAxisPrimitive:function(){function t(t){this._viewer=t.viewer,this._model=t.model,this._matrix=t.matrix,this._radius=void 0,this._layer=new F.CustomDataSource("xyz-axis"),this._viewer.dataSources.add(this._layer),this._handler=new F.ScreenSpaceEventHandler(this._viewer.scene.canvas),this._xyzState=!1,this._xyzPid=void 0,this._builds()}t.prototype={_builds(){this._createAxisXYZ(),this._bindHandler()},remove(){this._layer._primitives.removeAll(),this._handler.distory()},_createAxisXYZ:function(){this._model.readyPromise.then(t=>{var e=F.Matrix4.getTranslation(t.modelMatrix,new F.Cartesian3),t=t.boundingSphere,i=t.radius,n=new F.ArrowPolylinePrimitive({id:"axisZ",color:F.Color.RED,position:e,width:3,headWidth:5,length:2*i+50,headLength:10}),a=new F.ArrowPolylinePrimitive({id:"axisX",color:F.Color.GREEN,position:e,width:3,headWidth:5,length:2*i+50,headLength:10}),e=new F.ArrowPolylinePrimitive({id:"axisY",color:F.Color.BLUE,position:e,width:3,headWidth:5,length:2*i+50,headLength:10}),i=F.Matrix3.fromRotationY(F.Math.toRadians(90)),i=(this._rotationX=F.Matrix4.fromRotationTranslation(i),F.Matrix4.multiply(a.geometryInstances[0].modelMatrix,this._rotationX,a.geometryInstances[0].modelMatrix),F.Matrix4.multiply(a.geometryInstances[1].modelMatrix,this._rotationX,a.geometryInstances[1].modelMatrix),F.Matrix3.fromRotationX(F.Math.toRadians(90)));this._rotationY=F.Matrix4.fromRotationTranslation(i),F.Matrix4.multiply(e.geometryInstances[0].modelMatrix,this._rotationY,e.geometryInstances[0].modelMatrix),F.Matrix4.multiply(e.geometryInstances[1].modelMatrix,this._rotationY,e.geometryInstances[1].modelMatrix),this._layer._primitives.add(n),this._layer._primitives.add(a),this._layer._primitives.add(e),this._radius=t.radius,this._createAxisSphere()})},_createAxisSphere:function(){var e=[];for(let t=0;t<=360;t+=3){const i=Math.sin(F.Math.toRadians(t)),n=Math.cos(F.Math.toRadians(t)),a=this._radius*n,r=this._radius*i;e.push(new F.Cartesian3(a,r,0))}var t=this._createAxisSpheres("axisSphereZ",e,this._matrix,F.Color.RED);this._layer._primitives.add(t);const i=this._createAxisSpheres("axisSphereY",e,this._matrix,F.Color.GREEN),n=(this._layer._primitives.add(i),F.Matrix4.multiply(i.geometryInstances.modelMatrix,this._rotationY,i.geometryInstances.modelMatrix),this._createAxisSpheres("axisSphereX",e,this._matrix,F.Color.BLUE));this._layer._primitives.add(n),F.Matrix4.multiply(n.geometryInstances.modelMatrix,this._rotationX,n.geometryInstances.modelMatrix)},_createAxisSpheres:function(t,e,i,n){e=new F.PolylineGeometry({positions:e,width:10}),e=new F.GeometryInstance({geometry:e,id:t,attributes:{color:F.ColorGeometryInstanceAttribute.fromColor(n)}});return new F.Primitive({geometryInstances:e,appearance:new F.PolylineColorAppearance({translucent:!1}),modelMatrix:i})},_updateAxis(i){if(this._layer){var n=this._layer._primitives._primitives;for(let t=1,e=n.length;t<e;t++){var a=n[t],r=F.Matrix4.fromTranslation(new F.Cartesian3(i.x,i.y,i.z));F.Matrix4.multiply(a.modelMatrix,r,a.modelMatrix)}}var t=F.Matrix4.fromTranslation(new F.Cartesian3(i.x,i.y,i.z));F.Matrix4.multiply(this._model.modelMatrix,t,this._model.modelMatrix)},_updateAxisSphere(i){if(this._layer){var n=this._layer._primitives._primitives;for(let t=1,e=n.length;t<e;t++){var a=n[t],r=F.Matrix4.fromRotationTranslation(i);F.Matrix4.multiply(a.modelMatrix,r,a.modelMatrix)}}var t=F.Matrix4.fromRotationTranslation(i);F.Matrix4.multiply(this._model.modelMatrix,t,this._model.modelMatrix)},_bindHandler(){this._handler.setInputAction(t=>{if(this._xyzState&&this._xyzPid)switch(this._xyzPid){case"axisX-line":this._updateAxis({x:-1,y:0,z:0});break;case"axisY-line":this._updateAxis({x:0,y:-1,z:0});break;case"axisZ-line":this._updateAxis({x:0,y:0,z:-1});break;case"axisX-arrow":this._updateAxis({x:1,y:0,z:0});break;case"axisY-arrow":this._updateAxis({x:0,y:1,z:0});break;case"axisZ-arrow":this._updateAxis({x:0,y:0,z:1});break;case"axisSphereX":this._updateAxisSphere(F.Matrix3.fromRotationX(F.Math.toRadians(1)));break;case"axisSphereY":this._updateAxisSphere(F.Matrix3.fromRotationY(F.Math.toRadians(1)));break;case"axisSphereZ":this._updateAxisSphere(F.Matrix3.fromRotationZ(F.Math.toRadians(1)))}},F.ScreenSpaceEventType.MOUSE_MOVE),this._handler.setInputAction(t=>{t=viewer.scene.pick(t.position);t&&t.id&&(this._xyzPid=t.id,this._xyzState=!0)},F.ScreenSpaceEventType.LEFT_DOWN),this._handler.setInputAction(()=>{this._xyzState=!1,this._xyzPid=void 0},F.ScreenSpaceEventType.LEFT_UP)}},F.Scene.XyzAxisPrimitive=t},_installArrowPolylinePrimitive:function(){F.Scene.ArrowPolylinePrimitive=function(t={}){this._color=t.color||F.Color.RED,this._width=t.width||3,this._headWidth=t.headWidth||2*this._width,this._length=t.length||300,this._headLength=t.headLength||10,this._inverse=t.inverse||!1,this.position=t.position;var t=t.id,e=F.CylinderGeometry.createGeometry(new F.CylinderGeometry({length:this._length,topRadius:this._width,bottomRadius:this._width})),i=F.CylinderGeometry.createGeometry(new F.CylinderGeometry({length:this._headLength,topRadius:0,bottomRadius:this._headWidth}));let n=(this._length+this._headLength)/2;this._inverse&&(n=-n);var a=i,r=[0,0,n],o=new F.Cartesian3;r.length?(o.x=r[0],o.y=r[1],o.z=r[2]):F.Cartesian3.clone(r,o);for(let t=0;t<a.attributes.position.values.length;t+=3)a.attributes.position.values[t]+=o.x,a.attributes.position.values[t+1]+=o.y,a.attributes.position.values[t+2]+=o.z;return new F.Primitive({modelMatrix:F.Transforms.eastNorthUpToFixedFrame(this.position),geometryInstances:[new F.GeometryInstance({id:t+"-line",geometry:e}),new F.GeometryInstance({id:t+"-arrow",geometry:i})],appearance:new F.MaterialAppearance({material:F.Material.fromType("Color",{color:this._color})})})}},_installShadowPrimitive:function(){function t(t){var e=(t=F.defaultValue(t,F.defaultValue.EMPTY_OBJECT)).scene;if(!F.defined(e))throw new F.DeveloperError("scene is required.");var i=(this._scene=e)._context;if(!F.defined(i))throw new F.DeveloperError("context is required.");if(!F.defined(t.viewerPosition))throw new F.DeveloperError("this view position is required.");this._viewerPosition=t.viewerPosition,this._positions=void 0,this._indices=void 0,this._drawLineCommand=void 0,this._depthCamera=new F.Camera(e),this._depthCamera.position=this._viewerPosition,this._direction=0,this._pitch=0,this._horizontalFov=F.defaultValue(t.horizontalFov,60),this._verticalFov=F.defaultValue(t.verticalFov,45),this._cameraUpdated=!1,this._targetPoint=this._viewerPosition.clone();e=new F.Cartesian3(0,0,100),t=F.Transforms.eastNorthUpToFixedFrame(this._viewerPosition);F.Matrix4.multiplyByPoint(t,e,this._targetPoint),this._distance=100,this._cameraUpdated=!1,this._modelMatrix=new F.Matrix4,this._shadowMap=new F.ShadowMap({context:i,enabled:!0,lightCamera:this._depthCamera,cascadesEnabled:!1}),this.show=!0,this._invisiblyColor=F.Color.RED,this._visiblyColor=F.Color.GREEN,this._shadowMap.useCustomColor=!0,this.shadowMap._customColor={invisibly:F.Color.RED,visibly:F.Color.GREEN},this._initialize=function(){this._positions=new Float32Array(633),this._indices=new Uint16Array(408);var t=this._indices,e=0;t[e++]=0,t[e++]=1,t[e++]=0,t[e++]=21,t[e++]=0,t[e++]=85,t[e++]=0,t[e++]=105;for(var i=0,n=0;n<5;++n){i++;for(var a=0;a<20;++a)t[e++]=i++,t[e++]=i}i++;for(var r=0;r<20;++r)for(var o=0;o<5;++o)t[e++]=i,t[e++]=5+i++;this._initialized=!0},this._debugLightFrustum=void 0,this._debugShow=!0}Object.defineProperties(t.prototype,{shadowMap:{get:function(){return this._shadowMap}},debugLightFrustum:{get:function(){return this._debugLightFrustum}},debugShow:{get:function(){return this._debugShow},set:function(t){this.shadowMap.debugShow=t,this._debugShow=t}},invisiblyColor:{get:function(){return this._invisiblyColor},set:function(t){this._invisiblyColor=t,this.shadowMap._customColor.invisibly=t}},visiblyColor:{get:function(){return this._visiblyColor},set:function(t){this._visiblyColor=t,this.shadowMap._customColor.visibly=t}},viewerPosition:{get:function(){return this._viewerPosition},set:function(t){this._viewerPosition=t,this._cameraUpdated=!1}},direction:{get:function(){return this._direction},set:function(t){this._direction=t,this._cameraUpdated=!1}},pitch:{get:function(){return this._pitch},set:function(t){this._pitch=t,this._cameraUpdated=!1}},horizontalFov:{get:function(){return this._horizontalFov},set:function(t){this._horizontalFov=t,this._cameraUpdated=!1,this._hintLineUpdated=!1}},verticalFov:{get:function(){return this._verticalFov},set:function(t){this._verticalFov=t,this._cameraUpdated=!1,this._hintLineUpdated=!1}},distance:{get:function(){return this._distance},set:function(t){this._distance=t,this._cameraUpdated=!1}}}),t.prototype.setDebugFrustumEffect=function(e,i){var t,n;this.debugShow&&(t=this.debugLightFrustum._planesPrimitives,n=this.debugLightFrustum._outlinePrimitives,t.forEach(function(t){t.show=e}),n.forEach(function(t){t.show=i}))},t.prototype.update=function(t){var e;this.show&&(this._cameraUpdated||(this._updateCamera(),this.debugShow&&!F.defined(this.debugLightFrustum)&&(this._debugLightFrustum=new F.DebugCameraPrimitive({camera:this._depthCamera,color:F.Color.YELLOW,updateOnChange:!0}),this.setDebugFrustumEffect(!1,!0))),e=t.frustumSplits[1],t.frustumSplits[1]=this._distance,this._debugLightFrustum.update(t),t.frustumSplits[1]=e,t.shadowMaps.push(this.shadowMap))},t.prototype._updateCamera=function(){this._depthCamera.frustum.near=.001*this._distance,this._depthCamera.frustum.far=this._distance,this._depthCamera.frustum.fov=F.Math.toRadians(Math.max(this._horizontalFov,this._verticalFov)),this._depthCamera.frustum.aspectRatio=this._horizontalFov/this._verticalFov,this._depthCamera.setView({destination:this._viewerPosition,orientation:{heading:F.Math.toRadians(this._direction),pitch:F.Math.toRadians(this._pitch)}}),this._modelMatrix=this._depthCamera.inverseViewMatrix,this._cameraUpdated=!0},t.prototype.setPoseByTargetPoint=function(t){this.distance=F.Cartesian3.distance(this._viewerPosition,t);var e=new F.Cartesian3,i=F.Transforms.eastNorthUpToFixedFrame(this._viewerPosition);F.Matrix4.inverse(i,i),F.Matrix4.multiplyByPoint(i,t,e),F.Cartesian3.normalize(e,e),this.direction=F.Math.toDegrees(Math.atan2(e.x,e.y)),this.pitch=F.Math.toDegrees(Math.asin(e.z))},t.prototype._updateHintLine=function(t){var e,i=this._positions,n=F.Math.toRadians(this._horizontalFov),a=F.Math.toRadians(this._verticalFov),r=Math.tan(.5*n),a=Math.tan(.5*a),o=-(r=this._distance*r),a=-(e=this._distance*a),o=new F.Cartesian3(o,a,-this._distance),a=new F.Cartesian3(r,e,0),r=(F.Matrix4.multiplyByPoint(this._modelMatrix,o,o),F.Matrix4.multiplyByPoint(this._modelMatrix,a,a),F.BoundingSphere.fromCornerPoints(o,a));if(t.cullingVolume.computeVisibility(r)!==Intersect.OUTSIDE){this._valid=!0;var s=0;i[s++]=0,i[s++]=0,i[s++]=0;for(var l,c=Math.PI-.5*n,h=n/4,d=0;d<5;++d)for(var u=c+d*h,x=e/(this._distance/Math.cos(u)),p=-(v=Math.atan(x)),m=v/10,g=0;g<21;++g)l=p+g*m,i[s++]=this._distance*Math.cos(l)*Math.sin(u),i[s++]=this._distance*Math.sin(l),i[s++]=this._distance*Math.cos(l)*Math.cos(u);for(var h=n/20,f=0;f<21;++f){u=c+f*h;for(var v,x=e/(this._distance/Math.cos(u)),p=-(v=Math.atan(x)),m=v/2,y=0;y<5;++y)l=p+y*m,i[s++]=this._distance*Math.cos(l)*Math.sin(u),i[s++]=this._distance*Math.sin(l),i[s++]=this._distance*Math.cos(l)*Math.cos(u)}var b,C=t.context,o=F.Buffer.createIndexBuffer({context:C,typedArray:new Uint32Array(this._indices),usage:F.BufferUsage.STATIC_DRAW,indexDatatype:IndexDatatype.UNSIGNED_INT}),a=F.Buffer.createVertexBuffer({context:C,typedArray:F.ComponentDatatype.createTypedArray(F.ComponentDatatype.FLOAT,this._positions),usage:F.BufferUsage.STATIC_DRAW}),n=[],t=(n.push({index:0,vertexBuffer:a,componentDatatype:F.ComponentDatatype.FLOAT,componentsPerAttribute:3,normalize:!1}),new F.VertexArray({context:C,attributes:n,indexBuffer:o}));F.defined(this._drawLineCommand)?(this._drawLineCommand.vertexArray.destroy(),this._drawLineCommand.vertexArray=t,this._drawLineCommand.modelMatrix=this._modelMatrix,this._drawLineCommand.boundingVolume=r):(a=F.ShaderProgram.fromCache({context:C,vertexShaderSource:"in vec3 position;\n uniform mat4 u_modelViewMatrix;\n void main()\n {\n gl_Position = czm_projection* u_modelViewMatrix* vec4(position.xyz,1.0);\n }\n ",fragmentShaderSource:"uniform vec4 u_bgColor;\n void main()\n {\n out_FragColor = u_bgColor;\n }\n "}),n=F.RenderState.fromCache({depthTest:{enabled:!0}}),o={u_bgColor:function(){return b._lineColor},u_modelViewMatrix:function(){return C.uniformState.modelView}},(b=this)._drawLineCommand=new F.DrawCommand({boundingVolume:r,modelMatrix:b._modelMatrix,primitiveType:F.PrimitiveType.LINES,vertexArray:t,shaderProgram:a,castShadows:!1,receiveShadows:!1,uniformMap:o,renderState:n,pass:F.Pass.OPAQUE})),this._hintLineUpdated=!0}else this._valid=!1},F.Scene.ShadowPrimitive=t},_installPointsPrimitive:function(){function t(t){t&&t.viewer&&t.Cartesians&&(this._vertexShader=this.getVSPolylie(),this._fragmentShader=this.getFSPolyline(),this._geometry=null,this._appearance=null,this._viewer=t.viewer,this.build(t))}t.prototype={build:function(t){if(t.Cartesians&&2<=t.Cartesians.length){var e=[],i=[],n=[];if(t.Colors&&t.Colors.length===4*t.Cartesians.length){for(var a=0;a<t.Cartesians.length;a++)e.push(t.Cartesians[a].x),e.push(t.Cartesians[a].y),e.push(t.Cartesians[a].z);i=t.Colors}else for(var r=0;r<t.Cartesians.length;r++)e.push(t.Cartesians[r].x),e.push(t.Cartesians[r].y),e.push(t.Cartesians[r].z),i.push(0),i.push(0),i.push(1),i.push(1);for(var o=0;o<t.Cartesians.length;o++)n.push(o);this.positionArr=new Float64Array(e),this.colorArr=new Float32Array(i),this.indiceArr=new Uint16Array(n)}else{var s=F.Cartesian3.fromDegrees(0,0,-10),l=F.Cartesian3.fromDegrees(0,.001,-10);this.positionArr=new Float64Array([s.x,s.y,s.z,l.x,l.y,l.z]),this.colorArr=new Float32Array([0,0,1,1,0,0,1,1]),this.indiceArr=new Uint16Array([0,1])}this._geometry=this.createGeometry(this.positionArr,this.colorArr,this.indiceArr),this._appearance=this.createAppearence(this._fragmentShader,this._vertexShader),this.primitive=this._viewer.scene.primitives.add(new F.Primitive({geometryInstances:new F.GeometryInstance({geometry:this._geometry}),appearance:this._appearance,asynchronous:!1}))},getVSPolylie:function(){return"in vec3 position3DHigh; in vec3 position3DLow; in vec4 color; out vec4 v_color; in float batchId; void main() { vec4 p = czm_computePosition(); v_color =color; p = czm_modelViewProjectionRelativeToEye * p; gl_Position = p; gl_PointSize=4.0; } "},getFSPolyline:function(){return"in vec4 v_color; void main() { float d = distance(gl_PointCoord, vec2(0.5,0.5)); if(d < 0.5){ out_FragColor = v_color; }else{ discard; } } "},createAppearence:function(t,e){return new F.Appearance({renderState:{blending:F.BlendingState.PRE_MULTIPLIED_ALPHA_BLEND,depthTest:{enabled:!0},depthMask:!0},fragmentShaderSource:t,vertexShaderSource:e})},createGeometry:function(t,e,i){return new F.Geometry({attributes:{position:new F.GeometryAttribute({componentDatatype:F.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:t}),color:new F.GeometryAttribute({componentDatatype:F.ComponentDatatype.FLOAT,componentsPerAttribute:4,values:e})},indices:i,primitiveType:F.PrimitiveType.POINTS,boundingSphere:F.BoundingSphere.fromVertices(t)})},remove:function(){null!=this.primitive&&(this._viewer.scene.primitives.remove(this.primitive),this.primitive=null)},updateCartesianPosition:function(t){if(null!=this.primitive&&(this._viewer.scene.primitives.remove(this.primitive),!(t&&t.length<2))){if(t.length===this.positionArr.length/3){var e=t[0],i=t[1];this.positionArr=new Float64Array([e.x,e.y,e.z,i.x,i.y,i.z]),this._geometry=this.createGeometry(this.positionArr,this.colorArr,this.indiceArr)}else{for(var n=[],a=[],r=[],o=0;o<t.length;o++)n.push(t[o].x),n.push(t[o].y),n.push(t[o].z),a.push(0),a.push(0),a.push(1),a.push(1);for(var s=0;s<t.length;s++)r.push(s);this.positionArr=new Float64Array(n),this.colorArr=new Float32Array(a),this.indiceArr=new Uint16Array(r),geometry=this.createGeometry(this.positionArr,this.colorArr,this.indiceArr),appearance=this.createAppearence(this._fragmentShader,this._vertexShader)}this.primitive=this._viewer.scene.primitives.add(new F.Primitive({geometryInstances:new F.GeometryInstance({geometry:this._geometry}),appearance:this._appearance,asynchronous:!1}))}},updateCartesianPositionColor:function(t,e){if(e.length===4*t.length&&null!=this.primitive&&(viewer.scene.primitives.remove(this.primitive),!(t&&t.length<2))){if(t.length===this.positionArr.length/3){var i=t[0],n=t[1];this.positionArr=new Float64Array([i.x,i.y,i.z,n.x,n.y,n.z]),this.colorArr=new Float32Array(e),geometry=CreateGeometry(this.positionArr,this.colorArr,this.indiceArr)}else{for(var a=[],r=[],o=0;o<t.length;o++)a.push(t[o].x),a.push(t[o].y),a.push(t[o].z);for(o=0;o<t.length;o++)r.push(o);this.positionArr=new Float64Array(a),this.colorArr=new Float32Array(e),this.indiceArr=new Uint16Array(r),this._geometry=this.createGeometry(this.positionArr,this.colorArr,this.indiceArr),this._appearance=this.createAppearence(this._fragmentShader,this._vertexShader)}this.primitive=viewer.scene.primitives.add(new F.Primitive({geometryInstances:new F.GeometryInstance({geometry:this._geometry}),appearance:this._appearance,asynchronous:!1}))}}},F.Scene.PointsPrimitive=t},_installWaterPrimitive:function(){let e=this;function t(t){this._positions=t.positions,this._url=t.img||this.getDfSt(["primitive","WaterPrimitive"])||"static/data/images/Textures/waterNormals.jpg",this._frequency=t.frequency||1e3,this._animationSpeed=t.animationSpeed||.01,this._amplitude=t.amplitude||10,this._extrudedHeight=t.extrudedHeight||0,this._viewer=e._viewer,this._fs=this.getFS()}t.prototype.build=function(){this._geometry=this._createGeometry(),this._appearance=this._createAppearence(),this.primitive=this._viewer.scene.primitives.add(new F.Primitive({allowPicking:!1,geometryInstances:new F.GeometryInstance({geometry:this._geometry}),appearance:this._appearance,asynchronous:!1}))},t.prototype._createAppearence=function(){return new F.EllipsoidSurfaceAppearance({material:new F.Material({fabric:{type:"Water",uniforms:{normalMap:this._url,frequency:this._frequency,animationSpeed:this._animationSpeed,amplitude:this._amplitude}}}),fragmentShaderSource:this._fs})},t.prototype._createGeometry=function(){return new F.PolygonGeometry({polygonHierarchy:new F.PolygonHierarchy(F.Cartesian3.fromDegreesArray(this._positions)),extrudedHeight:this._extrudedHeight,perPositionHeight:!0})},t.prototype.getFS=function(){return"\n precision highp float;\n struct Light {\n vec3 position;\n vec3 ambient;\n vec3 diffuse;\n vec3 specular;\n };\n in vec3 position;\n in vec2 textureCoord;\n\n uniform vec3 viewPos;\n uniform Light light;\n\n uniform sampler2D normalSampler;\n uniform samplerCube skybox;\n uniform float detalX;\n\n void main() {\n\n float z = gl_FragCoord.z / gl_FragCoord.w;\n const float LOG2 = 1.442695;\n float density = 0.005;\n float normalFactor = exp( -density * density * z * z * LOG2 );\n normalFactor = clamp(normalFactor, 0.0, 1.0);\n\n vec4 normalTex1 = texture(normalSampler, vec2(textureCoord.s + detalX/1024.0, textureCoord.t - detalX/1024.0));\n vec3 normalTex2 = texture(normalSampler, vec2(textureCoord.t, textureCoord.s)).rgb;\n vec3 normal1 = normalize(vec3(normalTex1.r * 2.0 - 1.0, normalTex1.b,normalTex1.g*2.0-1.0));\n vec3 normal2 = normalize(vec3(normalTex2.r * 2.0 - 1.0, normalTex2.b,normalTex2.g*2.0-1.0));\n\n vec3 normal = mix(normal1,normal2,0.2);\n\n normal = mix(vec3(0.0,1.0,0.0),normal,0.2);\n\n normal = mix(vec3(0.0,1.0,0.0),normal,normalFactor);\n\n vec3 viewDir = normalize(viewPos - position);\n\n vec3 I = normalize(position - viewPos);\n vec3 R = reflect(I, normal);\n vec3 reflection = texture(skybox, R).rgb;\n\n float ratio = 1.00 / 1.33;\n vec3 Rr = refract(I, normal , ratio);\n vec3 refraction = texture(skybox, Rr).rgb;\n\n float reflectivity = 0.02;\n float theta = max( dot( viewDir, normal ), 0.0 );\n float reflectance = reflectivity + ( 1.0 - reflectivity ) * pow( ( 1.0 - theta ), 2.0 );\n\n vec3 reflectanceColor = mix( refraction, reflection, reflectance );\n\n out_FragColor = vec4(reflectanceColor,1.0);\n\n }\n "},t.prototype.getVS=function(){return" in vec3 normal;in vec2 st;in float batchId; out vec3 v_normalEC;uniform mat4 u_modelViewMatrix;uniform mat4 u_invWorldViewMatrix;uniform int u_clampToGroud;uniform vec3 u_camPos;uniform vec3 u_scale;out vec3 vToEye;out vec2 vUv;out vec4 vCoord;void main(void){v_normalEC = czm_normal * normal;if (u_clampToGroud == 1){} else {vCoord = gl_Position;}vUv = st;}"},t.prototype.getFS2=function(){return"in vec3 v_positionMC;\n in vec3 v_positionEC;\n in vec2 v_st;\n \n void main()\n {\n czm_materialInput materialInput;\n vec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));\n #ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n #endif\n materialInput.s = v_st.s;\n materialInput.st = v_st;\n materialInput.str = vec3(v_st, 0.0);\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);\n vec3 positionToEyeEC = -v_positionEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getMaterial(materialInput);\n #ifdef FLAT\n out_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n #else\n out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n out_FragColor.a = 0.5;\n #endif\n }\n "},L.prototype.updateDegreesPosition=function(t,e){null==this.primitive||(this._viewer.scene.primitives.remove(this.primitive),t&&t.length<3)||(t=this._createGeometry(t,e||0),this.primitive=this._viewer.scene.primitives.add(new F.Primitive({allowPicking:!1,geometryInstances:new F.GeometryInstance({geometry:t}),appearance:this._appearance,asynchronous:!1})))},F.Scene.WaterPrimitive=t},_installFlowWaterPrimitive:function(){const n=this.getDfSt(["primitive","WaterPrimitive"]),e=F.Property;function i({riverColor:t,flowDuration:e,riverImg:i}){this._definitionChanged=new F.Event,this._color=void 0,this._colorSubscription=void 0,this.color=t,this.duration=e,this._time=(new Date).getTime(),this._url=i||n||"static/data/images/Textures/movingRiver.png"}Object.defineProperties(i.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:F.createPropertyDescriptor("color")}),i.prototype.getType=function(t){return"PolylineTrailLink"},i.prototype.getValue=function(t,e){return(e=F.defined(e)?e:{}).color=F.Property.getValueOrClonedDefault(this._color,t,F.Color.WHITE,e.color),e.image=F.Material.PolylineTrailLinkImage,e.time=((new Date).getTime()-this._time)%this.duration/this.duration,e},i.prototype.equals=function(t){return this===t||t instanceof i&&e.equals(this._color,t._color)},F.Scene.PolylineFlowWaterMaterialProperty=i,F.Material.PolylineTrailLinkType="PolylineTrailLink",F.Material.PolylineTrailLinkImage=n||"static/data/images/Textures/movingRiver.png",F.Material.PolylineTrailLinkSource=" uniform vec4 color;\n uniform float time;\n uniform sampler2D image;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec4 colorImage = texture(image, vec2(fract(st.s*5.0-time*1.0), st.t));\n material.alpha = 0.5;\n material.diffuse = colorImage.rgb;\n return material;\n }",F.Material._materialCache.addMaterial(F.Material.PolylineTrailLinkType,{fabric:{type:F.Material.PolylineTrailLinkType,uniforms:{color:new F.Color(1,0,0,.5),image:F.Material.PolylineTrailLinkImage,time:0,repeat:1},source:F.Material.PolylineTrailLinkSource},translucent:function(t){return!0}})},_installTexturePrimitive:function(){function t(t){this._vertexShader=this.getVS(),this._fragmentShader=this.getFS(),this._materialShader=this.getMS(),this._url=t.url,this._cartesians=t.cartesians,this._id=t.id||""}t.prototype.build=function(){for(var t=[],e=0;e<this._cartesians.length;e++)t.push(this._cartesians[e].x),t.push(this._cartesians[e].y),t.push(this._cartesians[e].z);this._positionArr=new Float32Array(t),this._sts=new Uint8Array([0,0,1,0,1,1,0,1]),this._indiceArr=new Uint16Array([0,1,2,0,2,3]),this._geometry=this._createGeometry(),this._appearance=this._createAppearence(),this.primitive=this._viewer.scene.primitives.add(new F.Primitive({geometryInstances:new F.GeometryInstance({geometry:this._geometry,id:this._id}),appearance:this._appearance,asynchronous:!1}))},t.prototype._createGeometry=function(){var t=new F.GeometryAttribute({componentDatatype:F.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:this._sts});return new F.Geometry({attributes:{position:new F.GeometryAttribute({componentDatatype:F.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:this._positions}),st:t},indices:this._indices,primitiveType:F.PrimitiveType.TRIANGLES,boundingSphere:F.BoundingSphere.fromVertices(positions)})},t.prototype._createAppearence=function(){return new F.Appearance({material:new F.Material({fabric:{uniforms:{image:this._url},source:this._materialShader}}),aboveGround:!0,faceForward:!0,flat:!0,translucent:!1,renderState:{blending:F.BlendingState.PRE_MULTIPLIED_ALPHA_BLEND,depthTest:{enabled:!0},depthMask:!0},fragmentShaderSource:this._fragmentShader,vertexShaderSource:this._vertexShader})},t.prototype.getVS=function(){return"in vec3 position3DHigh; in vec3 position3DLow; in vec2 st; in float batchId; out vec2 v_st; void main() { vec4 p = czm_computePosition(); v_st=st; p = czm_modelViewProjectionRelativeToEye * p; gl_Position = p; } "},t.prototype.getFS=function(){return"in vec2 v_st; void main() { czm_materialInput materialInput; czm_material material=czm_getMaterial(materialInput,v_st); vec4 color=vec4(material.diffuse + material.emission,material.alpha); if(color.x==1.0&&color.y==1.0&&color.z==1.0&&color.w==1.0) color=vec4(vec3(0.0,0.0,0.0),0.0); out_FragColor =color; } "},t.prototype.getMS=function(){return"czm_material czm_getMaterial(czm_materialInput materialInput,vec2 v_st) { vec4 color = texture(image, v_st); czm_material material = czm_getDefaultMaterial(materialInput); material.diffuse= color.rgb; material.alpha=color.a; return material; } "},F.Scene.TexturePrimitive=t},_installProbingPrimitive:function(){var e={color:new F.Color(1,0,1,.8),repeat:30,offset:0,thickness:.3,center:F.Cartesian3.fromDegrees(116.39,39.9),length:4e5,bottom:1e3,top:0},i=this._viewer;function t(t){this._viewer=i,this._length=t.length||e.length,this._center=t.center||e.center,this._color=t.color||e.color,this._repeat=t.repeat||e.repeat,this._offset=t.offset||e.offset,this._thickness=t.thickness||e.thickness,this._bottom=t.bottom||e.bottom,this._top=t.top||e.top,this._radar=void 0,this.build()}t.prototype.build=function(){var t=new F.CylinderGeometry({length:this._length,topRadius:this._top,bottomRadius:this._bottom,vertexFormat:F.MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat}),t=new F.GeometryInstance({geometry:t,modelMatrix:this.getModelMatrix()}),e=new F.MaterialAppearance({material:this.getMaterial(),faceForward:!1,closed:!0}),i=this;this._radar=this._viewer.scene.primitives.add(new F.Primitive({geometryInstances:[t],appearance:e})),this._viewer.scene.preUpdate.addEventListener(function(){var t=i._radar.appearance.material.uniforms.offset;1<(t-=.001)&&(t=0),i._radar.appearance.material.uniforms.offset=t})},t.prototype.getModelMatrix=function(){return F.Matrix4.multiplyByTranslation(F.Transforms.eastNorthUpToFixedFrame(this._center),new F.Cartesian3(0,0,.5*this._length),new F.Matrix4)},t.prototype.updateModelMatrix=function(){},t.prototype.getMaterial=function(){return new F.Material({fabric:{type:"radarPrimitive",uniforms:{color:this._color,repeat:this._repeat,offset:this._offset,thickness:this._thickness},source:"uniform vec4 color; \n uniform float repeat; \n uniform float offset; \n uniform float thickness;\n\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n float sp = 1.0/repeat;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5));\n float m = mod(dis + offset, sp);\n float a = step(sp*(1.0-thickness), m); \n\n material.diffuse = color.rgb;\n material.alpha = a * color.a;\n return material;\n }"},translucent:!1})},t.prototype.remove=function(){this._radar&&this._viewer.scene.primitives.remove(this._radar)},F.Scene.ProbingPrimitive=t}};let d=null;function U(t,e,i){t&&(d=e,this._drawLayer=new d.CustomDataSource("drawLayer"),this.$graphics=new y(t,e),t)&&t.dataSources.add(this._drawLayer)}U.prototype={drawPointGraphics:function(e){var i,n,t,a,r,o;(e=e||{}).style=e.style||{image:this.getDfSt(["drawPointGraphics"])||"static/data/images/file/location4.png",width:35,height:40,clampToGround:!0,scale:1,pixelOffset:new d.Cartesian2(0,-20)},this._viewer&&e&&(t=new d.Entity,a=[],r=this,(o=new d.ScreenSpaceEventHandler(this._viewer.scene.canvas)).setInputAction(function(t){t=r._viewer.scene.camera.pickEllipsoid(t.position,r._viewer.scene.globe.ellipsoid);t&&t.x&&(i=t,a.push(t))},d.ScreenSpaceEventType.LEFT_CLICK),o.setInputAction(function(t){o.destroy(),o=null,"function"==typeof e.callback&&e.callback(r.transformCartesianArrayToWGS84Array(a),n)},d.ScreenSpaceEventType.RIGHT_CLICK),t.billboard=e.style,t.position=new d.CallbackProperty(function(){return i},!1),n=this._drawLayer.entities.add(t))},drawLineGraphics:function(e){if(e=e||{},this._viewer&&e){var i,n=[],t=new d.Entity,a=this,r=new d.ScreenSpaceEventHandler(this._viewer.scene.canvas);r.setInputAction(function(t){t=a.getCatesian3FromPX(t.position);t&&t.x&&(0==n.length&&n.push(t.clone()),e.measure&&o(t),2==n.length&&"straightLine"===e.type&&(r.destroy(),r=null,"function"==typeof e.callback)&&e.callback(a.transformCartesianArrayToWGS84Array(n),i),n.push(t))},d.ScreenSpaceEventType.LEFT_CLICK),r.setInputAction(function(t){t=a.getCatesian3FromPX(t.endPosition);2<=n.length&&t&&t.x&&(n.pop(),n.push(t))},d.ScreenSpaceEventType.MOUSE_MOVE),r.setInputAction(function(t){r.destroy(),r=null;t=a.getCatesian3FromPX(t.position);e.measure&&o(t),"function"==typeof e.callback&&e.callback(a.transformCartesianArrayToWGS84Array(n),i)},d.ScreenSpaceEventType.RIGHT_CLICK),t.polyline={width:e.width||5,material:e.material||d.Color.BLUE.withAlpha(.8),clampToGround:e.clampToGround||!1,clampToS3M:e.clampToS3M||!1},t.polyline.positions=new d.CallbackProperty(function(){return n},!1),i=this._drawLayer.entities.add(t);const o=function(t){var e=new d.Entity;e.position=t,e.point={pixelSize:10,outlineColor:d.Color.BLUE,outlineWidth:5},e.label={text:(a.getPositionDistance(a.transformCartesianArrayToWGS84Array(n))/1e3).toFixed(4)+"公里",show:!0,showBackground:!0,font:"14px monospace",horizontalOrigin:d.HorizontalOrigin.LEFT,verticalOrigin:d.VerticalOrigin.BOTTOM,pixelOffset:new d.Cartesian2(-20,-80)},a._drawLayer.entities.add(e)}}},drawPolygonGraphics:function(i){if((i=i||{}).style=i.style||{width:3,material:d.Color.BLUE.withAlpha(.8),clampToGround:!0},this._viewer&&i){var n=[],e=new d.PolygonHierarchy,a=new d.Entity,r=this,o=null,s=new d.ScreenSpaceEventHandler(this._viewer.scene.canvas);s.setInputAction(function(t){t=r.getCatesian3FromPX(t.position);t&&t.x&&(0==n.length&&(e.positions.push(t.clone()),n.push(t.clone())),n.push(t.clone()),e.positions.push(t.clone()),o||(a.polyline=i.style,a.polyline.positions=new d.CallbackProperty(function(){return n},!1),a.polygon={hierarchy:new d.CallbackProperty(function(){return e},!1),material:d.Color.WHITE.withAlpha(.1),clampToGround:i.clampToGround||!1},a.clampToS3M=!0,o=r._drawLayer.entities.add(a)))},d.ScreenSpaceEventType.LEFT_CLICK),s.setInputAction(function(t){t=r.getCatesian3FromPX(t.endPosition);2<=n.length&&t&&t.x&&(n.pop(),n.push(t),e.positions.pop(),e.positions.push(t))},d.ScreenSpaceEventType.MOUSE_MOVE),s.setInputAction(function(){var t,e;s.destroy(),n.push(n[0]),i.height&&(a.polygon.extrudedHeight=i.height,a.polygon.material=d.Color.BLUE.withAlpha(.5)),i.measure&&(t=n[0],(e=new d.Entity).position=t,e.point={pixelSize:10,outlineColor:d.Color.BLUE,outlineWidth:5},e.label={text:(r.getPositionsArea(r.transformCartesianArrayToWGS84Array(n))/1e6).toFixed(4)+"平方公里",show:!0,showBackground:!0,font:"14px monospace",horizontalOrigin:d.HorizontalOrigin.LEFT,verticalOrigin:d.VerticalOrigin.BOTTOM,pixelOffset:new d.Cartesian2(-20,-50)},r._drawLayer.entities.add(e)),"function"==typeof i.callback&&i.callback(r.transformCartesianArrayToWGS84Array(n),o)},d.ScreenSpaceEventType.RIGHT_CLICK)}},drawRectangleGraphics:function(e){var i,n,t,a,r,o;(e=e||{}).style=e.style||{width:3,material:d.Color.BLUE.withAlpha(.5),clampToGround:!0},this._viewer&&e&&(n=[],t=new d.Entity,a=new d.Rectangle,r=this,(o=new d.ScreenSpaceEventHandler(this._viewer.scene.canvas)).setInputAction(function(t){t=r.getCatesian3FromPX(t.position);t&&t.x&&(0==n.length?n.push(t.clone()):(o.destroy(),n.push(t.clone()),a=d.Rectangle.fromCartesianArray([...n,t],d.Ellipsoid.WGS84),"function"==typeof e.callback&&e.callback(r.transformCartesianArrayToWGS84Array(n),i)))},d.ScreenSpaceEventType.LEFT_CLICK),o.setInputAction(function(t){t=r.getCatesian3FromPX(t.endPosition);t&&(a=d.Rectangle.fromCartesianArray([...n,t],d.Ellipsoid.WGS84))},d.ScreenSpaceEventType.MOUSE_MOVE),t.rectangle=e.style,e.height&&(t.rectangle.extrudedHeight=e.height),t.rectangle.coordinates=new d.CallbackProperty(function(){return a},!1),i=this._drawLayer.entities.add(t))},drawCircleGraphics:function(e){if((e=e||{}).style=e.style||{width:3,material:d.Color.BLUE.withAlpha(.5),clampToGround:!0},this._viewer&&e){var i,n=void 0,a=new d.Entity,r=this,o=1,s=new d.ScreenSpaceEventHandler(this._viewer.scene.canvas);const l=function(t,e){var t=d.Cartographic.fromCartesian(t),e=d.Cartographic.fromCartesian(e),i=new d.EllipsoidGeodesic,i=(i.setEndPoints(t,e),i.surfaceDistance);o=Math.sqrt(Math.pow(i,2)+Math.pow(e.height-t.height,2))};s.setInputAction(function(t){t=r.getCatesian3FromPX(t.position);t&&t.x&&(n?(l(n,t),s.destroy(),"function"==typeof e.callback&&e.callback({center:n,radius:o},i)):(n=t,a.ellipse=e.style,a.ellipse.semiMajorAxis=new d.CallbackProperty(function(){return o},!1),a.ellipse.semiMinorAxis=new d.CallbackProperty(function(){return o},!1),a.position=new d.CallbackProperty(function(){return n},!1),a.point={pixelSize:5,outlineColor:d.Color.RED,outlineWidth:3},e.height&&(a.ellipse.extrudedHeight=e.height),i=r._drawLayer.entities.add(a)))},d.ScreenSpaceEventType.LEFT_CLICK),s.setInputAction(function(t){t=r._viewer.scene.camera.pickEllipsoid(t.endPosition,r._viewer.scene.globe.ellipsoid);n&&t&&t.x&&l(n,t)},d.ScreenSpaceEventType.MOUSE_MOVE)}},drawTrianglesGraphics:function(e){if((e=e||{}).style=e.style||{width:3,material:d.Color.BLUE.withAlpha(.5)},this._viewer&&e){var i=new d.Entity,n=new d.Entity,a=new d.Entity,r=[],o=[],s=[],l=this,c=new d.ScreenSpaceEventHandler(this._viewer.scene.canvas);c.setInputAction(function(t){t=l.getCatesian3FromPX(t.position);if(!t)return!1;0==r.length?(r.push(t.clone()),r.push(t.clone()),o.push(t.clone()),o.push(t.clone())):(c.destroy(),"function"==typeof e.callback&&e.callback({e:i,e2:n,e3:a}))},d.ScreenSpaceEventType.LEFT_CLICK),c.setInputAction(function(t){var e,i,t=l.getCatesian3FromPX(t.endPosition);t&&0<r.length&&(r.pop(),r.push(t.clone()),e=r,i=d.Cartographic.fromCartesian(e[0]),e=d.Cartographic.fromCartesian(e[1]),i=d.Cartesian3.fromDegrees(d.Math.toDegrees(i.longitude),d.Math.toDegrees(i.latitude),e.height),o.pop(),o.push(i.clone()),s.pop(),s.pop(),s.push(t.clone()),s.push(i.clone()))},d.ScreenSpaceEventType.MOUSE_MOVE),i.polyline={positions:new d.CallbackProperty(function(){return r},!1),...e.style},i.position=new d.CallbackProperty(function(){return r[0]},!1),i.point={pixelSize:5,outlineColor:d.Color.BLUE,outlineWidth:5},i.label={text:new d.CallbackProperty(function(){return"直线:"+l.getPositionDistance(l.transformCartesianArrayToWGS84Array(r))+"米"},!1),show:!0,showBackground:!0,font:"14px monospace",horizontalOrigin:d.HorizontalOrigin.LEFT,verticalOrigin:d.VerticalOrigin.BOTTOM,pixelOffset:new d.Cartesian2(50,-100)},n.polyline={positions:new d.CallbackProperty(function(){return o},!1),...e.style},n.position=new d.CallbackProperty(function(){return s[1]},!1),n.point={pixelSize:5,outlineColor:d.Color.BLUE,outlineWidth:5},n.label={text:new d.CallbackProperty(function(){return"高度:"+(e=o[1],!(t=o[0])&&!e||d.Cartesian3.equals(t,e)?0:(t=d.Cartographic.fromCartesian(t),(d.Cartographic.fromCartesian(e).height-t.height).toFixed(2)))+"米";var t,e},!1),show:!0,showBackground:!0,font:"14px monospace",horizontalOrigin:d.HorizontalOrigin.LEFT,verticalOrigin:d.VerticalOrigin.BOTTOM,pixelOffset:new d.Cartesian2(-20,100)},a.polyline={positions:new d.CallbackProperty(function(){return s},!1),...e.style},a.position=new d.CallbackProperty(function(){return r[1]},!1),a.point={pixelSize:5,outlineColor:d.Color.BLUE,outlineWidth:5},a.label={text:new d.CallbackProperty(function(){return"水平距离:"+l.getPositionDistance(l.transformCartesianArrayToWGS84Array(s))+"米"},!1),show:!0,showBackground:!0,font:"14px monospace",horizontalOrigin:d.HorizontalOrigin.LEFT,verticalOrigin:d.VerticalOrigin.BOTTOM,pixelOffset:new d.Cartesian2(-150,-20)},this._drawLayer.entities.add(a),this._drawLayer.entities.add(n),this._drawLayer.entities.add(i)}},drawWallGraphics:function(n){var a;(n=n||{}).style=n.style||{material:d.Color.BLUE.withAlpha(.5),outline:!0,outlineColor:d.Color.WHITE},this._viewer&&n&&(a=this).drawPolygonGraphics({callback:function(t,e){var i=a._drawLayer.entities.add({wall:{positions:a.transformWGS84ArrayToCartesianArray(t),...n.style}});"function"==typeof n.callback&&n.callback(t,i)}})},drawEllipsoidGraphics:function(n){var a;(n=n||{}).style=n.style||{},this._viewer&&n&&(a=this).drawCircleGraphics({callback:function(t,e){var i=a.createGraphics(),e=(i.ellipsoid=a.$graphics.getEllipsoidGraphics({radii:t.radius}),i.position=t.center,a._drawLayer.entities.remove(e),a._drawLayer.entities.add(i));"function"==typeof n.callback&&n.callback({center:t.center,radius:t.radius},e)}})},drawCylinderGraphics:function(n){var a;(n=n||{}).style=n.style||{},this._viewer&&n&&(a=this).drawCircleGraphics({callback:function(t,e){var i=a._drawLayer.entities.add({position:t.center,cylinder:{length:2*t.radius||n.length,topRadius:n.topRadius||t.radius,bottomRadius:n.bottomRadius||t.radius,material:d.Color.BLUE.withAlpha(.5),outline:!0,outlineColor:d.Color.WHITE}});a._drawLayer.entities.remove(e),"function"==typeof n.callback&&n.callback({center:t.center,radius:t.radius},i)}})},drawCorridorGraphics:function(n){var a;(n=n||{}).style=n.style||{},this._viewer&&n&&(a=this).drawLineGraphics({callback:function(t,e){var i=a.createGraphics(),e=(i.corridor={positions:a.transformWGS84ArrayToCartesianArray(t),height:n.height||1,width:n.width||100,cornerType:d.CornerType.BEVELED,extrudedHeight:n.extrudedHeight||1,material:d.Color.BLUE.withAlpha(.5),outline:!0,outlineColor:d.Color.WHITE},a._drawLayer.entities.remove(e),a._drawLayer.entities.add(i));"function"==typeof n.callback&&n.callback(t,e)}})},drawPolylineVolumeGraphics:function(a){(a=a||{}).style=a.style||{};const r=a.circleRadius||20,o=a.arms||7,s=a.rOuter||150,l=a.rInner||75;var c;this._viewer&&a&&(c=this).drawLineGraphics({callback:function(t,e){var i=c.createGraphics(),n="fivePoint"===a.shape?c.computeStar2d(o,s,l):c.computeCircleShap(r),n=(i.polylineVolume={positions:c.transformWGS84ArrayToCartesianArray(t),shape:n,cornerType:d.CornerType.MITERED,material:a.color||d.Color.RED},c._drawLayer.entities.remove(e),c._drawLayer.entities.add(i));"function"==typeof a.callback&&a.callback(t,n)}})},removeAll(){this._drawLayer.entities.removeAll()}};let H={};function Q(t,e){t&&(this._viewer=t,H=e)}Q.prototype={mathDistance2d:function(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))},getCirclePoints2d:function(t,e,i,n){for(var a=[],r=Math.PI/180*Math.round(360/n),o=0;o<n;o++){var s=e+t*Math.sin(r*o),l=i+t*Math.cos(r*o);a.unshift({x:s,y:l})}return a},wholeDistance2d:function(i){let n=0;return i&&Array.isArray(i)&&0<i.length&&i.forEach((t,e)=>{e<i.length-1&&(n+=this.mathDistance2d(t,i[e+1]))}),n},getBaseLength2d:function(t){return Math.pow(this.wholeDistance2d(t),.99)},computeStar2d(t,e,i){for(var n=Math.PI/t,a=2*t,r=new Array(a),o=0;o<a;o++){var s=o%2==0?e:i;r[o]=new H.Cartesian2(Math.cos(o*n)*s,Math.sin(o*n)*s)}return r},computeCircleShap(e){var i=[];for(let t=0;t<360;t++){var n=H.Math.toRadians(t);i.push(new H.Cartesian2(e*Math.cos(n),e*Math.sin(n)))}return i},mid2d:function(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]},getCircleCenterOfThreePoints2d:function(t,e,i){var n=[(t[0]+e[0])/2,(t[1]+e[1])/2],e=[n[0]-t[1]+e[1],n[1]+t[0]-e[0]],a=[(t[0]+i[0])/2,(t[1]+i[1])/2],t=[a[0]-t[1]+i[1],a[1]+t[0]-i[0]];return this.getIntersectPoint2d(n,e,a,t)},getIntersectPoint2d:function(t,e,i,n){return t[1]===e[1]?[(n[0]-i[0])/(n[1]-i[1])*(t[1]-i[1])+i[0],t[1]]:i[1]===n[1]?[(e[0]-t[0])/(e[1]-t[1])*(i[1]-t[1])+t[0],i[1]]:(e=(e[0]-t[0])/(e[1]-t[1]),n=(n[0]-i[0])/(n[1]-i[1]),[e*(i=(e*t[1]-t[0]-n*i[1]+i[0])/(e-n))-e*t[1]+t[0],i])},getAzimuth2d:function(t,e){let i,n=Math.asin(Math.abs(e[1]-t[1])/this.mathDistance2d(t,e));return e[1]>=t[1]&&e[0]>=t[0]?i=n+Math.PI:e[1]>=t[1]&&e[0]<t[0]?i=2*Math.PI-n:e[1]<t[1]&&e[0]<t[0]?i=n:e[1]<t[1]&&e[0]>=t[0]&&(i=Math.PI-n),i},getAngleOfThreePoints2d:function(t,e,i){t=this.getAzimuth2d(e,t)-this.getAzimuth2d(e,i);return t<0?t+2*Math.PI:t},isClockWise2d:function(t,e,i){return(i[1]-t[1])*(e[0]-t[0])>(e[1]-t[1])*(i[0]-t[0])},getPointOnLine2d:function(t,e,i){return[e[0]+t*(i[0]-e[0]),e[1]+t*(i[1]-e[1])]},getCubicValue2d:function(t,e,i,n,a){var[r,o]=[1-(t=Math.max(Math.min(t,1),0)),t*t],s=o*t,l=r*r,c=l*r;return[c*e[0]+3*l*t*i[0]+3*r*o*n[0]+s*a[0],c*e[1]+3*l*t*i[1]+3*r*o*n[1]+s*a[1]]},getThirdPoint2d:function(t,e,i,n,a){t=this.getAzimuth2d(t,e),a=a?t+i:t-i,t=n*Math.cos(a),i=n*Math.sin(a);return[e[0]+t,e[1]+i]},inherits2d:function(t,a){function e(){}e.prototype=a.prototype,t.superClass_=a.prototype,t.prototype=new e,(t.prototype.constructor=t).base=function(t,e,i){var n=Array.prototype.slice.call(arguments,2);return a.prototype[e].apply(t,n)}},getArcPoints2d:function(e,i,n,t){var[a,r,o,s]=[null,null,[],t-n],s=s<0?s+2*Math.PI:s;for(let t=0;t<=100;t++){var l=n+s*t/100,a=e[0]+i*Math.cos(l),r=e[1]+i*Math.sin(l);o.push([a,r])}return o},getBisectorNormals2d:function(t,e,i,n){let a=this.getNormal2d(e,i,n),[r,o,s,l,c]=[null,null,null,null,null],h=Math.sqrt(a[0]*a[0]+a[1]*a[1]),d=a[0]/h,u=a[1]/h,x=this.mathDistance2d(e,i),p=this.mathDistance2d(i,n);return o=(c=1e-4<h?this.isClockWise(e,i,n)?(s=t*x,l=i[0]-s*u,c=i[1]+s*d,r=[l,c],s=t*p,l=i[0]+s*u,i[1]-s*d):(s=t*x,l=i[0]+s*u,c=i[1]-s*d,r=[l,c],s=t*p,l=i[0]-s*u,i[1]+s*d):(l=i[0]+t*(e[0]-i[0]),c=i[1]+t*(e[1]-i[1]),r=[l,c],l=i[0]+t*(n[0]-i[0]),i[1]+t*(n[1]-i[1])),[l,c]),[r,o]},getNormal2d:function(t,e,i){var n=t[0]-e[0],t=t[1]-e[1],a=Math.sqrt(n*n+t*t),a=(n/=a,t/=a,i[0]-e[0]),i=i[1]-e[1],e=Math.sqrt(a*a+i*i);return[n+(a/=e),t+(i/=e)]},getLeftMostControlPoint2d:function(t,e){let[i,n,a,r,o]=[t[0],t[1],t[2],null,null],s=this.getBisectorNormals2d(0,i,n,a)[0],l=this.getNormal2d(i,n,a);var c,h,d,u,x;return o=1e-4<Math.sqrt(l[0]*l[0]+l[1]*l[1])?(t=this.mid2d(i,n),d=i[0]-t[0],c=i[1]-t[1],d=2*(c=-(h=2/this.mathDistance2d(i,n))*c)*(h=h*d),u=s[0]-t[0],x=s[1]-t[1],r=t[0]+(c*c-h*h)*u+d*x,t[1]+d*u+(h*h-c*c)*x):(r=i[0]+e*(n[0]-i[0]),i[1]+e*(n[1]-i[1])),[r,o]},getRightMostControlPoint2d:function(t,e){let i=t.length,n=t[i-3],a=t[i-2],r=t[i-1],o=this.getBisectorNormals2d(0,n,a,r)[1],s=this.getNormal2d(n,a,r),l=Math.sqrt(s[0]*s[0]+s[1]*s[1]),[c,h]=[null,null];var d,u,x,p,m;return h=1e-4<l?(t=this.mid2d(a,r),x=r[0]-t[0],d=r[1]-t[1],x=2*(d=-(u=2/this.mathDistance2d(a,r))*d)*(u=u*x),p=o[0]-t[0],m=o[1]-t[1],c=t[0]+(d*d-u*u)*p+x*m,t[1]+x*p+(u*u-d*d)*m):(c=r[0]+e*(a[0]-r[0]),r[1]+e*(a[1]-r[1])),[c,h]},getCurvePoints2d:function(e,i){let t=this.getLeftMostControlPoint2d(i,e),[n,a,r,o,s]=[null,null,null,[t],[]];for(let t=0;t<i.length-2;t++){[n,a,r]=[i[t],i[t+1],i[t+2]];var l=this.getBisectorNormals2d(e,n,a,r);o=o.concat(l)}var c=this.getRightMostControlPoint2d(i,e);c&&o.push(c);for(let e=0;e<i.length-1;e++){n=i[e],a=i[e+1],s.push(n);for(let t=0;t<100;t++){var h=this.getCubicValue2d(t/100,n,o[2*e],o[2*e+1],a);s.push(h)}s.push(a)}return s},getBezierPoints2d:function(a){if(a.length<=2)return a;var t=[],r=a.length-1;for(let n=0;n<=1;n+=.01){let[e,i]=[0,0];for(let t=0;t<=r;t++){var o=this.getBinomialFactor2d(r,t),s=Math.pow(n,t),l=Math.pow(1-n,r-t);e+=o*s*l*a[t][0],i+=o*s*l*a[t][1]}t.push([e,i])}return t.push(a[r]),t},getFactorial2d:function(e){let i=1;switch(e){case e<=1:i=1;break;case 2===e:i=2;break;case 3===e:i=6;break;case 24===e:i=24;break;case 5===e:i=120;break;default:for(let t=1;t<=e;t++)i*=t}return i},getBinomialFactor2d:function(t,e){return this.getFactorial2d(t)/(this.getFactorial2d(e)*this.getFactorial2d(t-e))},getQBSplinePoints2d:function(r){if(r.length<=2)return r;var[o,t]=[2,[]],e=r.length-o-1;t.push(r[0]);for(let a=0;a<=e;a++)for(let n=0;n<=1;n+=.05){let[e,i]=[0,0];for(let t=0;t<=o;t++){var s=this.getQuadricBSplineFactor2d(t,n);e+=s*r[a+t][0],i+=s*r[a+t][1]}t.push([e,i])}return t.push(r[r.length-1]),t},getQuadricBSplineFactor2d:function(t,e){let i=0;return 0===t?i=Math.pow(e-1,2)/2:1===t?i=(-2*Math.pow(e,2)+2*e+1)/2:2===t&&(i=Math.pow(e,2)/2),i}};let C=null;function J(t,e){t&&(this._viewer=t,C=e)}J.prototype={setCircleScanEffect:function(t){var e,i,n,a,r,o,s,l,c,h,d;if(t&&t.position)return e=t.id||"CircleScan"+parseInt(1e3*Math.random()),l=t.position,i=t.radius,n=t.color||C.Color.RED,a=t.duration||1500,r=this,o=t.circleMode||"CircleScan",t=t.border||4,d=l,s=new C.Cartesian4(d.x,d.y,d.z,1),d=this.transformCartesianToWGS84(l),l=this.transformWGS84ToCartesian({lng:d.lng,lat:d.lat,alt:d.alt+500}),c=new C.Cartesian4(l.x,l.y,l.z,1),h=(new Date).getTime(),d=new C.PostProcessStage({name:e,fragmentShader:this._getCircleScanShader({get:!0,border:t}),uniforms:{u_scanCenterEC:function(){return C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,s,new C.Cartesian4)},u_scanPlaneNormalEC:function(){var t=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,s,new C.Cartesian4),e=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,c,new C.Cartesian4),i=new C.Cartesian3;return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,C.Cartesian3.normalize(i,i),i},u_radius:function(){return"CircleScan"==o?i*(((new Date).getTime()-h)%a)/a:i},u_scanColor:n}}),this._viewer.scene.postProcessStages.add(d),d},setRadarScanEffect:function(t){var e,i,n,a,r,o,s,l,c,h,d,u,x,p,m,g,f,v,y;if(t&&t.position)return e=t.id||"radarScan"+parseInt(1e3*Math.random()),c=t.position,i=t.radius,n=t.color||C.Color.RED,a=t.duration||1500,r=this,o=t.border||1,t=t.width||3,y=c,s=new C.Cartesian4(y.x,y.y,y.z,1),y=this.transformCartesianToWGS84(c),c=this.transformWGS84ToCartesian({lng:y.lng,lat:y.lat,alt:y.alt+500}),l=new C.Cartesian4(c.x,c.y,c.z,1),c=this.transformWGS84ToCartesian({lng:y.lng+.001,lat:y.lat,alt:y.alt}),h=new C.Cartesian4(c.x,c.y,c.z,1),d=(new Date).getTime(),u=new C.Quaternion,x=new C.Matrix3,p=new C.Cartesian4,m=new C.Cartesian4,g=new C.Cartesian4,f=new C.Cartesian3,v=new C.Cartesian3,y=new C.PostProcessStage({name:e,fragmentShader:this._getRadarScanShader({border:o,width:t,get:!0}),uniforms:{u_scanCenterEC:function(){return C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,s,p)},u_scanPlaneNormalEC:function(){var t=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,s,p),e=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,l,m);return f.x=e.x-t.x,f.y=e.y-t.y,f.z=e.z-t.z,C.Cartesian3.normalize(f,f),f},u_scanLineNormalEC:function(){var t=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,s,p),e=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,l,m),i=C.Matrix4.multiplyByVector(r._viewer.camera._viewMatrix,h,g),e=(f.x=e.x-t.x,f.y=e.y-t.y,f.z=e.z-t.z,C.Cartesian3.normalize(f,f),v.x=i.x-t.x,v.y=i.y-t.y,v.z=i.z-t.z,((new Date).getTime()-d)%a/a);return C.Quaternion.fromAxisAngle(f,e*C.Math.PI*2,u),C.Matrix3.fromQuaternion(u,x),C.Matrix3.multiplyByVector(x,v,v),C.Cartesian3.normalize(v,v),v},u_radius:i,u_scanColor:n}}),this._viewer.scene.postProcessStages.add(y),y},lighitCentrumScanEffect:function(e){var i=this.createLightScan_getCirclePoints(e.circle[0],e.circle[1],e.circle[2],e.circle[3]),n=this.createLightScan_entityCList(this._viewer,i,e);for(let t=0;t<n.length;t++)t!==n.length-1?this.createLightScan_changeOnePosition(e,n[t],[i[t].x,i[t].y,i[t+1].x,i[t+1].y]):this.createLightScan_changeOnePosition(e,n[t],[i[t].x,i[t].y,i[0].x,i[0].y]);return n},createLightScan_getCirclePoints:function(t,e,i,n){let a=[],r=Math.PI/180*Math.round(360/n),o=0;for(;o<n;o++){var s=e+t*Math.sin(r*o),l=i+t*Math.cos(r*o);a.unshift({x:s,y:l})}return a},createLightScan_changeOnePosition:function(e,t,i){const n=e.positionList;let a,r,o,s,l,c,h=0,d=0;function u(t){a=n[t+1][0]-n[t][0],r=n[t+1][1]-n[t][1],o=a/e.number,s=r/e.number,d=0}u(h),t.polygon.hierarchy=new C.CallbackProperty(function(){return Math.abs(l)>=Math.abs(a)&&Math.abs(c)>=Math.abs(r)&&((h+=1)===n.length-1&&(h=0),i[0]=i[0]+l,i[1]=i[1]+c,i[2]=i[2]+l,i[3]=i[3]+c,u(h)),l=d*o,c=d*s,d++,new C.PolygonHierarchy(C.Cartesian3.fromDegreesArrayHeights([e.observer[0],e.observer[1],e.observer[2],i[0]+l,i[1]+c,0,i[2]+l,i[3]+c,0]))},!1)},createLightScan_entityCList:function(e,i,n){var a=n.observer[0],r=n.observer[1],o=n.observer[2],s=[];for(let t=0;t<i.length;t++){var l=t===i.length-1?new C.PolygonHierarchy(C.Cartesian3.fromDegreesArrayHeights([a,r,o,i[t].x,i[t].y,0,i[0].x,i[0].y,0])):new C.PolygonHierarchy(C.Cartesian3.fromDegreesArrayHeights([a,r,o,i[t].x,i[t].y,0,i[t+1].x,i[t+1].y,0])),l=e.entities.add({name:"三角形",polygon:{hierarchy:l,outline:!1,perPositionHeight:!0,material:n.material}});s.push(l)}return s}};for(var O=["RGVwdGhGdW5jdGlvbg==","TEVTUw==","Q3VsbEZhY2U=","QkFDSw==","dW5pZm9ybU1hcA==","cHJvamVjdGlvbk1hdHJpeA==","dW5pZm9ybVN0YXRl","cHJvamVjdGlvbg==","bW9kZWxWaWV3TWF0cml4","bW9kZWxWaWV3","c2hpbmluZXNz","ZW1pc3Npb24=","c3BlY3VsYXI=","aXNMaW5l","cGlja2Vk","cGlja2VkQ29sb3I=","bm9ybWFsTWF0cml4","Z2xvd1Bvd2Vy","ZXh0ZW5kMkNhcnRlc2lhbkFycmF5","UmFkYXJQcmltaXRpdmU=","X2FuZ2xl","YW5nbGU=","X3JhZGl1cw==","X3RvcFNob3c=","dG9w","X3RvcE91dGxpbmU=","dG9wT3V0bGluZQ==","dXBkYXRlR3JvdW5kQ2lyY2xlUmFkaXVz","X2dyb3VuZF9yYWRpdXM=","X3RyYWNrZWRFbnRpdHlQb3NpdGlvbg==","ZGlzdGFuY2U=","UG9seWxpbmVEYXNoTWF0ZXJpYWxQcm9wZXJ0eQ==","Q1lBTg==","bWF0cml4","Z2V0SGVhZGluZ1BpdGNoUm9sbEZvckxpbmU=","Z2V0VG9wR2VvbWV0cnk=","Z2V0VG9wT3V0bGluZUdlb21ldHJ5","X3RvcEdlb21ldHJ5","X3RvcE91dGxpbmVHZW9tZXRyeQ==","ZWxsaXBzZQ==","CnZhcnlpbmcgdmVjMyB2X3Bvc2l0aW9uOwp2YXJ5aW5nIHZlYzMgdl9ub3JtYWw7CnVuaWZvcm0gZmxvYXQgcGlja2VkOwp1bmlmb3JtIHZlYzQgIHBpY2tlZENvbG9yOwp1bmlmb3JtIHZlYzQgIGRlZmF1bHRDb2xvcjsKdW5pZm9ybSBmbG9hdCBzcGVjdWxhcjsKdW5pZm9ybSBmbG9hdCBzaGluaW5lc3M7CnVuaWZvcm0gdmVjMyAgZW1pc3Npb247CnZhcnlpbmcgdmVjMiB2X3N0Owp1bmlmb3JtIGJvb2wgaXNMaW5lOwp1bmlmb3JtIGZsb2F0IGdsb3dQb3dlcjsKdm9pZCBtYWluKCkgewogICAgdmVjMyBwb3NpdGlvblRvRXllRUM9IC12X3Bvc2l0aW9uOyAKICAgIHZlYzMgbm9ybWFsRUMgPW5vcm1hbGl6ZSh2X25vcm1hbCk7CiAgICB2ZWM0IGNvbG9yPWRlZmF1bHRDb2xvcjsKICAgIGlmKHBpY2tlZCE9MC4wKXsKICAgICAgICBjb2xvciA9IHBpY2tlZENvbG9yOwogICAgfQogICAgLy9pZih2X3N0Lng8MC41KXsKICAgIC8vICAgIGNvbG9yLmEgPTAuNzUtdl9zdC54OyAKICAgIC8vfQogICAgLy9lbHNlICB7CiAgICAvLyAgICBjb2xvci5hID12X3N0LngtMC4yNTsgCiAgICAvL30KICAgIGN6bV9tYXRlcmlhbCBtYXRlcmlhbDsKICAgIG1hdGVyaWFsLnNwZWN1bGFyID0gc3BlY3VsYXI7CiAgICBtYXRlcmlhbC5zaGluaW5lc3MgPSBzaGluaW5lc3M7CiAgICBtYXRlcmlhbC5ub3JtYWwgPSAgbm9ybWFsRUM7CiAgICBtYXRlcmlhbC5lbWlzc2lvbiA9ZW1pc3Npb247Ly92ZWMzKDAuMiwwLjIsMC4yKTsKICAgIG1hdGVyaWFsLmRpZmZ1c2UgPSBjb2xvci5yZ2IgOwogICAgaWYoaXNMaW5lKXsKICAgICAgICBtYXRlcmlhbC5hbHBoYSA9IDEuMDsgCiAgICB9CiAgICBlbHNlewogICAgICAgIG1hdGVyaWFsLmFscGhhID0gIGNvbG9yLmE7IAogICAgfQogICAgICAgIC8vZmxvYXQgZ2xvdyA9IGdsb3dQb3dlciAvIGFicyh2X3N0LnQgICkgLSAoZ2xvd1Bvd2VyIC8gMC41KTsgCiAgICAgICAgLy8gCiAgICAgICAgLy9tYXRlcmlhbC5lbWlzc2lvbiA9IG1heCh2ZWMzKGdsb3cgLSAxLjAgKyBjb2xvci5yZ2IpLCBjb2xvci5yZ2IpOyAKICAgICAgICAvL2lmKGlzTGluZSkKICAgICAgICAvLyAgICBtYXRlcmlhbC5hbHBoYSA9IGNsYW1wKDAuMCwgMS4wLCBnbG93KSAqIGNvbG9yLmE7IAogICAgICAgICAKICAgIGlmKHZfc3QueD09MC4wKXsgCiAgICAgICAgICBnbF9GcmFnQ29sb3IgPWNvbG9yIDsKICAgIH1lbHNlIHsgCiAgICAgICAgZ2xfRnJhZ0NvbG9yID0gY3ptX3Bob25nKG5vcm1hbGl6ZShwb3NpdGlvblRvRXllRUMpLCBtYXRlcmlhbCxjem1fbGlnaHREaXJlY3Rpb25FQykgOyAKICAgIH0gCn0=","CiNpZmRlZiBHTF9FUwogICBwcmVjaXNpb24gaGlnaHAgZmxvYXQ7CiNlbmRpZgoKYXR0cmlidXRlIHZlYzMgcG9zaXRpb247CmF0dHJpYnV0ZSB2ZWMyIHN0OwphdHRyaWJ1dGUgdmVjMyBub3JtYWw7CnVuaWZvcm0gbWF0NCBtb2RlbFZpZXdNYXRyaXg7CnVuaWZvcm0gbWF0MyBub3JtYWxNYXRyaXg7CnVuaWZvcm0gbWF0NCBwcm9qZWN0aW9uTWF0cml4Owp2YXJ5aW5nIHZlYzMgdl9wb3NpdGlvbjsKdmFyeWluZyB2ZWMzIHZfbm9ybWFsOwp2YXJ5aW5nIHZlYzIgdl9zdDsKCnZhcnlpbmcgdmVjMyB2X2xpZ2h0MERpcmVjdGlvbjsKCnZvaWQgbWFpbih2b2lkKSAKewogICAgdmVjNCBwb3MgPSAgbW9kZWxWaWV3TWF0cml4ICogdmVjNCggcG9zaXRpb24sMS4wKTsKICAgIHZfbm9ybWFsID0gIG5vcm1hbE1hdHJpeCAqICBub3JtYWw7CiAgICB2X3N0ID0gc3Q7CiAgICB2X3Bvc2l0aW9uID0gcG9zLnh5ejsKICAgIHZfbGlnaHQwRGlyZWN0aW9uID0gbWF0MyggbW9kZWxWaWV3TWF0cml4KSAqIHZlYzMoMS4wLDEuMCwxLjApOwogICAgZ2xfUG9zaXRpb24gPSAgcHJvamVjdGlvbk1hdHJpeCAqIHBvczsKfQ==","VFJBTlNMVUNFTlQ=","TElORV9TVFJJUA==","UmVjdGFuZ3VsYXJTZW5zb3JQcmltaXRpdmU=","b2JqZWN0","ZXhwb3J0cw==","YW1k","Q2VzaXVtR2VvbWV0cnk=","Y2FsbA==","ZGVmYXVsdA==","Y29tYmluZQ==","ZGVzdHJveU9iamVjdA==","RGV2ZWxvcGVyRXJyb3I=","QnVmZmVy","U2hhZGVyU291cmNl","TWF0ZXJpYWw=","VmVydGV4Rm9ybWF0","SnVsaWFuRGF0ZQ==","Qm94R2VvbWV0cnk=","RWxsaXBzb2lkR2VvbWV0cnk=","YXRhbg==","YXNpbg==","RU1QVFlfT0JKRUNU","c2xpY2U=","bW9kZWxNYXRyaXg=","X2NvbXB1dGVkTW9kZWxNYXRyaXg=","X2NvbXB1dGVkU2NhblBsYW5lTW9kZWxNYXRyaXg=","UE9TSVRJVkVfSU5GSU5JVFk=","eEhhbGZBbmdsZQ==","X3hIYWxmQW5nbGU=","eUhhbGZBbmdsZQ==","X3lIYWxmQW5nbGU=","V0hJVEU=","c2hvd1NlY3RvckxpbmVz","c2hvd1NlY3RvclNlZ21lbnRMaW5lcw==","c2hvd0xhdGVyYWxTdXJmYWNlcw==","bWF0ZXJpYWw=","ZnJvbVR5cGU=","Q29sb3JUeXBl","X21hdGVyaWFs","X3RyYW5zbHVjZW50","bGF0ZXJhbFN1cmZhY2VNYXRlcmlhbA==","X2xhdGVyYWxTdXJmYWNlTWF0ZXJpYWw=","X2xhdGVyYWxTdXJmYWNlVHJhbnNsdWNlbnQ=","c2hvd0RvbWVTdXJmYWNlcw==","ZG9tZVN1cmZhY2VNYXRlcmlhbA==","X2RvbWVTdXJmYWNlTWF0ZXJpYWw=","c2hvd0RvbWVMaW5lcw==","c2hvd0ludGVyc2VjdGlvbg==","aW50ZXJzZWN0aW9uQ29sb3I=","aW50ZXJzZWN0aW9uV2lkdGg=","c2hvd1Rocm91Z2hFbGxpcHNvaWQ=","X3Nob3dUaHJvdWdoRWxsaXBzb2lk","c2hvd1NjYW5QbGFuZQ==","c2NhblBsYW5lQ29sb3I=","c2NhblBsYW5lTW9kZQ==","aG9yaXpvbnRhbA==","c2NhblBsYW5lUmF0ZQ==","X3NjYW5lUGxhbmVYSGFsZkFuZ2xl","X3NjYW5lUGxhbmVZSGFsZkFuZ2xl","X3RpbWU=","bm93","X2JvdW5kaW5nU3BoZXJl","X2JvdW5kaW5nU3BoZXJlV0M=","X3NlY3RvckZyb250Q29tbWFuZA==","X3NlY3RvckJhY2tDb21tYW5k","X3NlY3RvclZB","X3NlY3RvckxpbmVDb21tYW5k","X3NlY3RvckxpbmVWQQ==","X3NlY3RvclNlZ21lbnRMaW5lQ29tbWFuZA==","X3NlY3RvclNlZ21lbnRMaW5lVkE=","X2RvbWVGcm9udENvbW1hbmQ=","X2RvbWVCYWNrQ29tbWFuZA==","X2RvbWVWQQ==","X2RvbWVMaW5lQ29tbWFuZA==","X2RvbWVMaW5lVkE=","X3NjYW5QbGFuZUZyb250Q29tbWFuZA==","X3NjYW5QbGFuZUJhY2tDb21tYW5k","X3NjYW5SYWRpYWxDb21tYW5k","X2NvbG9yQ29tbWFuZHM=","X2Zyb250RmFjZVJT","X2JhY2tGYWNlUlM=","X3Nw","X3VuaWZvcm1z","X3NjYW5Vbmlmb3Jtcw==","aGFsZkFuZ2xlIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIHplcm8u","dGhpcy5yYWRpdXMgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gemVyby4=","bXVsdGlwbHlCeVVuaWZvcm1TY2FsZQ==","dHJhbnNmb3Jt","aXNUcmFuc2x1Y2VudA==","c2Vjb25kc0RpZmZlcmVuY2U=","bWF4","ZnJvbVJvdGF0aW9uWA==","ZnJvbVJvdGF0aW9uWQ==","bXVsdGlwbHlCeU1hdHJpeDM=","cGFzc2Vz","cmVuZGVy","em95","em94","bWFw","bXVsdGlwbHlCeVZlY3Rvcg==","cmV2ZXJzZQ==","Y29uY2F0","YXBwbHk=","Y3JlYXRlVmVydGV4QnVmZmVy","QllURVNfUEVSX0VMRU1FTlQ=","UE9TSVRJT05fT05MWQ==","RWxsaXBzb2lkT3V0bGluZUdlb21ldHJ5","UElfT1ZFUl9UV08=","X3NjYW5QbGFuZVZB","c2hhZGVyU291cmNl","dW5pZm9ybQ==","X3BpY2tTUA==","X3NjYW5lUGxhbmVTUA==","RlJPTlQ=","X3BpY2tSUw==","dV9ub3JtYWxEaXJlY3Rpb24=","cGFzcw==","dV90eXBl","Q2hlY2s=","R2VvbWV0cnlBdHRyaWJ1dGVz","SW5kZXhEYXRhdHlwZQ==","cm91bmQ=","c3RhY2tQYXJ0aXRpb25z","c2xpY2VQYXJ0aXRpb25z","dHlwZU9m","bnVtYmVy","dmVydGV4Rm9ybWF0","REVGQVVMVA==","X3N0YWNrUGFydGl0aW9ucw==","X3NsaWNlUGFydGl0aW9ucw==","X3ZlcnRleEZvcm1hdA==","ZnJvbURpbWVuc2lvbnM=","Z3JlYXRlclRoYW5PckVxdWFscw==","Y3JlYXRlVHlwZWRBcnJheQ==","VFdPX1BJ","dGltZUVuZA==","Q29uaWNBcmNTZW5zb3JHZW9tZXRyeQ==","c3ViZGl2aXNpb25z","b3B0aW9ucy5zdGFja1BhcnRpdGlvbnMgY2Fubm90IGJlIGxlc3MgdGhhbiAx","b3B0aW9ucy5zbGljZVBhcnRpdGlvbnMgY2Fubm90IGJlIGxlc3MgdGhhbiAw","b3B0aW9ucy5zdWJkaXZpc2lvbnMgbXVzdCBiZSBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gemVyby4=","X3N1YmRpdmlzaW9ucw==","Q29uaWNBcmNTZW5zb3JPdXRsaW5lR2VvbWV0cnk=","RXZlbnQ=","Y3JlYXRlTWF0ZXJpYWxQcm9wZXJ0eURlc2NyaXB0b3I=","Y3JlYXRlUHJvcGVydHlEZXNjcmlwdG9y","X2FuZ2xlU3Vic2NyaXB0aW9u","X3JhZGl1c1N1YnNjcmlwdGlvbg==","X3N0YWNr","X3N0YWNrU3Vic2NyaXB0aW9u","X3NsaWNl","X3NsaWNlU3Vic2NyaXB0aW9u","X2NvbG9y","X2NvbG9yU3Vic2NyaXB0aW9u","X3Nob3dTdWJzY3JpcHRpb24=","X2ZpbGw=","X2ZpbGxTdWJzY3JpcHRpb24=","X21hdGVyaWFsU3Vic2NyaXB0aW9u","X291dGxpbmVTdWJzY3JpcHRpb24=","X291dGxpbmVDb2xvcg==","X291dGxpbmVDb2xvclN1YnNjcmlwdGlvbg==","X291dGxpbmVXaWR0aA==","X291dGxpbmVXaWR0aFN1YnNjcmlwdGlvbg==","X3NoYWRvd3M=","X3NoYWRvd3NTdWJzY3JpcHRpb24=","X2Rpc3RhbmNlRGlzcGxheUNvbmRpdGlvbg==","X2Rpc3RhbmNlRGlzcGxheUNvbmRpdGlvblN1YnNjcmlwdGlvbg==","X2RlZmluaXRpb25DaGFuZ2Vk","X2dhemU=","X2dhemVTdWJzY3JpcHRpb24=","bWVyZ2U=","c3RhY2s=","ZmlsbA==","b3V0bGluZUNvbG9y","b3V0bGluZVdpZHRo","c2hhZG93cw==","ZGlzdGFuY2VEaXNwbGF5Q29uZGl0aW9u","Z2F6ZQ==","c291cmNlIGlzIHJlcXVpcmVkLg==","Q29uaWNBcmNTZW5zb3JHcmFwaGljcw==","a2V5cw==","UmVjdGFuZ3VsYXJTZW5zb3JHcmFwaGljcw==","UmVjdGFuZ3VsYXJTZW5zb3JWaXN1YWxpemVy","Q29uaWNBcmNTZW5zb3JDb2xsZWN0aW9u","RGF0YVNvdXJjZURpc3BsYXk=","ZGVmYXVsdFZpc3VhbGl6ZXJzQ2FsbGJhY2s=","YXR0cmlidXRlIHZlYzQgcG9zaXRpb247DQphdHRyaWJ1dGUgdmVjMyBub3JtYWw7DQoNCnZhcnlpbmcgdmVjMyB2X3Bvc2l0aW9uOw0KdmFyeWluZyB2ZWMzIHZfcG9zaXRpb25XQzsNCnZhcnlpbmcgdmVjMyB2X3Bvc2l0aW9uRUM7DQp2YXJ5aW5nIHZlYzMgdl9ub3JtYWxFQzsNCg0Kdm9pZCBtYWluKCkNCnsNCiAgICBnbF9Qb3NpdGlvbiA9IGN6bV9tb2RlbFZpZXdQcm9qZWN0aW9uICogcG9zaXRpb247DQogICAgdl9wb3NpdGlvbiA9IHZlYzMocG9zaXRpb24pOw0KICAgIHZfcG9zaXRpb25XQyA9IChjem1fbW9kZWwgKiBwb3NpdGlvbikueHl6Ow0KICAgIHZfcG9zaXRpb25FQyA9IChjem1fbW9kZWxWaWV3ICogcG9zaXRpb24pLnh5ejsNCiAgICB2X25vcm1hbEVDID0gY3ptX25vcm1hbCAqIG5vcm1hbDsNCn0=","I2lmZGVmIEdMX09FU19zdGFuZGFyZF9kZXJpdmF0aXZlcw0KI2V4dGVuc2lvbiBHTF9PRVNfc3RhbmRhcmRfZGVyaXZhdGl2ZXMgOiBlbmFibGUNCiNlbmRpZg0KDQp1bmlmb3JtIGJvb2wgdV9zaG93SW50ZXJzZWN0aW9uOw0KdW5pZm9ybSBib29sIHVfc2hvd1Rocm91Z2hFbGxpcHNvaWQ7DQoNCnVuaWZvcm0gZmxvYXQgdV9yYWRpdXM7DQp1bmlmb3JtIGZsb2F0IHVfeEhhbGZBbmdsZTsNCnVuaWZvcm0gZmxvYXQgdV95SGFsZkFuZ2xlOw0KdW5pZm9ybSBmbG9hdCB1X25vcm1hbERpcmVjdGlvbjsNCnVuaWZvcm0gZmxvYXQgdV90eXBlOw0KDQp2YXJ5aW5nIHZlYzMgdl9wb3NpdGlvbjsNCnZhcnlpbmcgdmVjMyB2X3Bvc2l0aW9uV0M7DQp2YXJ5aW5nIHZlYzMgdl9wb3NpdGlvbkVDOw0KdmFyeWluZyB2ZWMzIHZfbm9ybWFsRUM7DQoNCnZlYzQgZ2V0Q29sb3IoZmxvYXQgc2Vuc29yUmFkaXVzLCB2ZWMzIHBvaW50RUMpDQp7DQogICAgY3ptX21hdGVyaWFsSW5wdXQgbWF0ZXJpYWxJbnB1dDsNCg0KICAgIHZlYzMgcG9pbnRNQyA9IChjem1faW52ZXJzZU1vZGVsVmlldyAqIHZlYzQocG9pbnRFQywgMS4wKSkueHl6Ow0KICAgIG1hdGVyaWFsSW5wdXQuc3QgPSBzZW5zb3IyZFRleHR1cmVDb29yZGluYXRlcyhzZW5zb3JSYWRpdXMsIHBvaW50TUMpOw0KICAgIG1hdGVyaWFsSW5wdXQuc3RyID0gcG9pbnRNQyAvIHNlbnNvclJhZGl1czsNCg0KICAgIHZlYzMgcG9zaXRpb25Ub0V5ZUVDID0gLXZfcG9zaXRpb25FQzsNCiAgICBtYXRlcmlhbElucHV0LnBvc2l0aW9uVG9FeWVFQyA9IHBvc2l0aW9uVG9FeWVFQzsNCg0KICAgIHZlYzMgbm9ybWFsRUMgPSBub3JtYWxpemUodl9ub3JtYWxFQyk7DQogICAgbWF0ZXJpYWxJbnB1dC5ub3JtYWxFQyA9IHVfbm9ybWFsRGlyZWN0aW9uICogbm9ybWFsRUM7DQoNCiAgICBjem1fbWF0ZXJpYWwgbWF0ZXJpYWwgPSBjem1fZ2V0TWF0ZXJpYWwobWF0ZXJpYWxJbnB1dCk7DQoNCiAgICByZXR1cm4gbWl4KGN6bV9waG9uZyhub3JtYWxpemUocG9zaXRpb25Ub0V5ZUVDKSwgbWF0ZXJpYWwsY3ptX2xpZ2h0RGlyZWN0aW9uRUMpLCB2ZWM0KG1hdGVyaWFsLmRpZmZ1c2UsIG1hdGVyaWFsLmFscGhhKSwgMC40KTsNCg0KfQ0KDQpib29sIGlzT25Cb3VuZGFyeShmbG9hdCB2YWx1ZSwgZmxvYXQgZXBzaWxvbikNCnsNCiAgICBmbG9hdCB3aWR0aCA9IGdldEludGVyc2VjdGlvbldpZHRoKCk7DQogICAgZmxvYXQgdG9sZXJhbmNlID0gd2lkdGggKiBlcHNpbG9uOw0KDQojaWZkZWYgR0xfT0VTX3N0YW5kYXJkX2Rlcml2YXRpdmVzDQogICAgZmxvYXQgZGVsdGEgPSBtYXgoYWJzKGRGZHgodmFsdWUpKSwgYWJzKGRGZHkodmFsdWUpKSk7DQogICAgZmxvYXQgcGl4ZWxzID0gd2lkdGggKiBkZWx0YTsNCiAgICBmbG9hdCB0ZW1wID0gYWJzKHZhbHVlKTsNCiAgICAvLyBUaGVyZSBhcmUgYSBjb3VwbGUgdGhpbmdzIGdvaW5nIG9uIGhlcmUuDQogICAgLy8gRmlyc3Qgd2UgdGVzdCB0aGUgdmFsdWUgYXQgdGhlIGN1cnJlbnQgZnJhZ21lbnQgdG8gc2VlIGlmIGl0IGlzIHdpdGhpbiB0aGUgdG9sZXJhbmNlLg0KICAgIC8vIFdlIGFsc28gd2FudCB0byBjaGVjayBpZiB0aGUgdmFsdWUgb2YgYW4gYWRqYWNlbnQgcGl4ZWwgaXMgd2l0aGluIHRoZSB0b2xlcmFuY2UsDQogICAgLy8gYnV0IHdlIGRvbid0IHdhbnQgdG8gYWRtaXQgcG9pbnRzIHRoYXQgYXJlIG9idmlvdXNseSBub3Qgb24gdGhlIHN1cmZhY2UuDQogICAgLy8gRm9yIGV4YW1wbGUsIGlmIHdlIGFyZSBsb29raW5nIGZvciAidmFsdWUiIHRvIGJlIGNsb3NlIHRvIDAsIGJ1dCB2YWx1ZSBpcyAxIGFuZCB0aGUgYWRqYWNlbnQgdmFsdWUgaXMgMiwNCiAgICAvLyB0aGVuIHRoZSBkZWx0YSB3b3VsZCBiZSAxIGFuZCAidGVtcCAtIGRlbHRhIiB3b3VsZCBiZSAiMSAtIDEiIHdoaWNoIGlzIHplcm8gZXZlbiB0aG91Z2ggbmVpdGhlciBvZg0KICAgIC8vIHRoZSBwb2ludHMgaXMgY2xvc2UgdG8gemVyby4NCiAgICByZXR1cm4gdGVtcCA8IHRvbGVyYW5jZSAmJiB0ZW1wIDwgcGl4ZWxzIHx8IChkZWx0YSA8IDEwLjAgKiB0b2xlcmFuY2UgJiYgdGVtcCAtIGRlbHRhIDwgdG9sZXJhbmNlICYmIHRlbXAgPCBwaXhlbHMpOw0KI2Vsc2UNCiAgICByZXR1cm4gYWJzKHZhbHVlKSA8IHRvbGVyYW5jZTsNCiNlbmRpZg0KfQ0KDQp2ZWM0IHNoYWRlKGJvb2wgaXNPbkJvdW5kYXJ5KQ0Kew0KICAgIGlmICh1X3Nob3dJbnRlcnNlY3Rpb24gJiYgaXNPbkJvdW5kYXJ5KQ0KICAgIHsNCiAgICAgICAgcmV0dXJuIGdldEludGVyc2VjdGlvbkNvbG9yKCk7DQogICAgfQ0KICAgIGlmKHVfdHlwZSA9PSAxLjApew0KICAgICAgICByZXR1cm4gZ2V0TGluZUNvbG9yKCk7DQogICAgfQ0KICAgIHJldHVybiBnZXRDb2xvcih1X3JhZGl1cywgdl9wb3NpdGlvbkVDKTsNCn0NCg0KZmxvYXQgZWxsaXBzb2lkU3VyZmFjZUZ1bmN0aW9uKHZlYzMgcG9pbnQpDQp7DQogICAgdmVjMyBzY2FsZWQgPSBjem1fZWxsaXBzb2lkSW52ZXJzZVJhZGlpICogcG9pbnQ7DQogICAgcmV0dXJuIGRvdChzY2FsZWQsIHNjYWxlZCkgLSAxLjA7DQp9DQoNCnZvaWQgbWFpbigpDQp7DQogICAgdmVjMyBzZW5zb3JWZXJ0ZXhXQyA9IGN6bV9tb2RlbFszXS54eXo7ICAgICAgLy8gKDAuMCwgMC4wLCAwLjApIGluIG1vZGVsIGNvb3JkaW5hdGVzDQogICAgdmVjMyBzZW5zb3JWZXJ0ZXhFQyA9IGN6bV9tb2RlbFZpZXdbM10ueHl6OyAgLy8gKDAuMCwgMC4wLCAwLjApIGluIG1vZGVsIGNvb3JkaW5hdGVzDQoNCiAgICAvL3ZlYzMgcGl4RGlyID0gbm9ybWFsaXplKHZfcG9zaXRpb24pOw0KICAgIGZsb2F0IHBvc2l0aW9uWCA9IHZfcG9zaXRpb24ueDsNCiAgICBmbG9hdCBwb3NpdGlvblkgPSB2X3Bvc2l0aW9uLnk7DQogICAgZmxvYXQgcG9zaXRpb25aID0gdl9wb3NpdGlvbi56Ow0KDQogICAgdmVjMyB6RGlyID0gdmVjMygwLjAsIDAuMCwgMS4wKTsNCiAgICB2ZWMzIGxpbmVYID0gdmVjMyhwb3NpdGlvblgsIDAgLHBvc2l0aW9uWik7DQogICAgdmVjMyBsaW5lWSA9IHZlYzMoMCwgcG9zaXRpb25ZLCBwb3NpdGlvblopOw0KICAgIGZsb2F0IHJlc1ggPSBkb3Qobm9ybWFsaXplKGxpbmVYKSwgekRpcik7DQogICAgaWYocmVzWCA8IGNvcyh1X3hIYWxmQW5nbGUpLTAuMDAwMDEpew0KICAgICAgICBkaXNjYXJkOw0KICAgIH0NCiAgICBmbG9hdCByZXNZID0gZG90KG5vcm1hbGl6ZShsaW5lWSksIHpEaXIpOw0KICAgIGlmKHJlc1kgPCBjb3ModV95SGFsZkFuZ2xlKS0wLjAwMDAxKXsNCiAgICAgICAgZGlzY2FyZDsNCiAgICB9DQoNCiAgICBmbG9hdCBlbGxpcHNvaWRWYWx1ZSA9IGVsbGlwc29pZFN1cmZhY2VGdW5jdGlvbih2X3Bvc2l0aW9uV0MpOw0KDQogICAgLy8gT2NjbHVkZWQgYnkgdGhlIGVsbGlwc29pZD8NCglpZiAoIXVfc2hvd1Rocm91Z2hFbGxpcHNvaWQpDQoJew0KCSAgICAvLyBEaXNjYXJkIGlmIGluIHRoZSBlbGxpcHNvaWQNCgkgICAgLy8gUEVSRk9STUFOQ0VfSURFQTogQSBjb2Fyc2UgY2hlY2sgZm9yIGVsbGlwc29pZCBpbnRlcnNlY3Rpb24gY291bGQgYmUgZG9uZSBvbiB0aGUgQ1BVIGZpcnN0Lg0KCSAgICBpZiAoZWxsaXBzb2lkVmFsdWUgPCAwLjApDQoJICAgIHsNCiAgICAgICAgICAgIGRpc2NhcmQ7DQoJICAgIH0NCg0KCSAgICAvLyBEaXNjYXJkIGlmIGluIHRoZSBzZW5zb3IncyBzaGFkb3cNCgkgICAgaWYgKGluU2Vuc29yU2hhZG93KHNlbnNvclZlcnRleFdDLCB2X3Bvc2l0aW9uV0MpKQ0KCSAgICB7DQoJICAgICAgICBkaXNjYXJkOw0KCSAgICB9DQogICAgfQ0KDQogICAgLy8gTm90ZXM6IEVhY2ggc3VyZmFjZSBmdW5jdGlvbnMgc2hvdWxkIGhhdmUgYW4gYXNzb2NpYXRlZCB0b2xlcmFuY2UgYmFzZWQgb24gdGhlIGZsb2F0aW5nIHBvaW50IGVycm9yLg0KICAgIGJvb2wgaXNPbkVsbGlwc29pZCA9IGlzT25Cb3VuZGFyeShlbGxpcHNvaWRWYWx1ZSwgY3ptX2Vwc2lsb24zKTsNCiAgICAvL2lzT25FbGxpcHNvaWQgPSBmYWxzZTsNCiAgICAvL2lmKChyZXNYID49IDAuOCAmJiByZXNYIDw9IDAuODEpfHwocmVzWSA+PSAwLjggJiYgcmVzWSA8PSAwLjgxKSl7DQogICAgLyppZihmYWxzZSl7DQogICAgICAgIGdsX0ZyYWdDb2xvciA9IHZlYzQoMS4wLDAuMCwwLjAsMS4wKTsNCiAgICB9ZWxzZXsNCiAgICAgICAgZ2xfRnJhZ0NvbG9yID0gc2hhZGUoaXNPbkVsbGlwc29pZCk7DQogICAgfQ0KKi8NCiAgICBnbF9GcmFnQ29sb3IgPSBzaGFkZShpc09uRWxsaXBzb2lkKTsNCg0KfQ==","dW5pZm9ybSB2ZWM0IHVfaW50ZXJzZWN0aW9uQ29sb3I7CnVuaWZvcm0gZmxvYXQgdV9pbnRlcnNlY3Rpb25XaWR0aDsKdW5pZm9ybSB2ZWM0IHVfbGluZUNvbG9yOwoKYm9vbCBpblNlbnNvclNoYWRvdyh2ZWMzIGNvbmVWZXJ0ZXhXQywgdmVjMyBwb2ludFdDKQp7CiAgICAvLyBEaWFnb25hbCBtYXRyaXggZnJvbSB0aGUgdW5zY2FsZWQgZWxsaXBzb2lkIHNwYWNlIHRvIHRoZSBzY2FsZWQgc3BhY2UuICAgIAogICAgdmVjMyBEID0gY3ptX2VsbGlwc29pZEludmVyc2VSYWRpaTsKCiAgICAvLyBTZW5zb3IgdmVydGV4IGluIHRoZSBzY2FsZWQgZWxsaXBzb2lkIHNwYWNlCiAgICB2ZWMzIHEgPSBEICogY29uZVZlcnRleFdDOwogICAgZmxvYXQgcU1hZ25pdHVkZVNxdWFyZWQgPSBkb3QocSwgcSk7CiAgICBmbG9hdCB0ZXN0ID0gcU1hZ25pdHVkZVNxdWFyZWQgLSAxLjA7CiAgICAKICAgIC8vIFNlbnNvciB2ZXJ0ZXggdG8gZnJhZ21lbnQgdmVjdG9yIGluIHRoZSBlbGxpcHNvaWQncyBzY2FsZWQgc3BhY2UKICAgIHZlYzMgdGVtcCA9IEQgKiBwb2ludFdDIC0gcTsKICAgIGZsb2F0IGQgPSBkb3QodGVtcCwgcSk7CiAgICAKICAgIC8vIEJlaGluZCBzaWxob3VldHRlIHBsYW5lIGFuZCBpbnNpZGUgc2lsaG91ZXR0ZSBjb25lCiAgICByZXR1cm4gKGQgPCAtdGVzdCkgJiYgKGQgLyBsZW5ndGgodGVtcCkgPCAtc3FydCh0ZXN0KSk7Cn0KCi8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KCnZlYzQgZ2V0TGluZUNvbG9yKCkKewogICAgcmV0dXJuIHVfbGluZUNvbG9yOwp9Cgp2ZWM0IGdldEludGVyc2VjdGlvbkNvbG9yKCkKewogICAgcmV0dXJuIHVfaW50ZXJzZWN0aW9uQ29sb3I7Cn0KCmZsb2F0IGdldEludGVyc2VjdGlvbldpZHRoKCkKewogICAgcmV0dXJuIHVfaW50ZXJzZWN0aW9uV2lkdGg7Cn0KCnZlYzIgc2Vuc29yMmRUZXh0dXJlQ29vcmRpbmF0ZXMoZmxvYXQgc2Vuc29yUmFkaXVzLCB2ZWMzIHBvaW50TUMpCnsKICAgIC8vIChzLCB0KSBib3RoIGluIHRoZSByYW5nZSBbMCwgMV0KICAgIGZsb2F0IHQgPSBwb2ludE1DLnogLyBzZW5zb3JSYWRpdXM7CiAgICBmbG9hdCBzID0gMS4wICsgKGF0YW4ocG9pbnRNQy55LCBwb2ludE1DLngpIC8gY3ptX3R3b1BpKTsKICAgIHMgPSBzIC0gZmxvb3Iocyk7CiAgICAKICAgIHJldHVybiB2ZWMyKHMsIHQpOwp9Cg==","I2lmZGVmIEdMX09FU19zdGFuZGFyZF9kZXJpdmF0aXZlcw0KI2V4dGVuc2lvbiBHTF9PRVNfc3RhbmRhcmRfZGVyaXZhdGl2ZXMgOiBlbmFibGUNCiNlbmRpZg0KDQp1bmlmb3JtIGJvb2wgdV9zaG93SW50ZXJzZWN0aW9uOw0KdW5pZm9ybSBib29sIHVfc2hvd1Rocm91Z2hFbGxpcHNvaWQ7DQoNCnVuaWZvcm0gZmxvYXQgdV9yYWRpdXM7DQp1bmlmb3JtIGZsb2F0IHVfeEhhbGZBbmdsZTsNCnVuaWZvcm0gZmxvYXQgdV95SGFsZkFuZ2xlOw0KdW5pZm9ybSBmbG9hdCB1X25vcm1hbERpcmVjdGlvbjsNCnVuaWZvcm0gdmVjNCB1X2NvbG9yOw0KDQp2YXJ5aW5nIHZlYzMgdl9wb3NpdGlvbjsNCnZhcnlpbmcgdmVjMyB2X3Bvc2l0aW9uV0M7DQp2YXJ5aW5nIHZlYzMgdl9wb3NpdGlvbkVDOw0KdmFyeWluZyB2ZWMzIHZfbm9ybWFsRUM7DQoNCnZlYzQgZ2V0Q29sb3IoZmxvYXQgc2Vuc29yUmFkaXVzLCB2ZWMzIHBvaW50RUMpDQp7DQogICAgY3ptX21hdGVyaWFsSW5wdXQgbWF0ZXJpYWxJbnB1dDsNCg0KICAgIHZlYzMgcG9pbnRNQyA9IChjem1faW52ZXJzZU1vZGVsVmlldyAqIHZlYzQocG9pbnRFQywgMS4wKSkueHl6Ow0KICAgIG1hdGVyaWFsSW5wdXQuc3QgPSBzZW5zb3IyZFRleHR1cmVDb29yZGluYXRlcyhzZW5zb3JSYWRpdXMsIHBvaW50TUMpOw0KICAgIG1hdGVyaWFsSW5wdXQuc3RyID0gcG9pbnRNQyAvIHNlbnNvclJhZGl1czsNCg0KICAgIHZlYzMgcG9zaXRpb25Ub0V5ZUVDID0gLXZfcG9zaXRpb25FQzsNCiAgICBtYXRlcmlhbElucHV0LnBvc2l0aW9uVG9FeWVFQyA9IHBvc2l0aW9uVG9FeWVFQzsNCg0KICAgIHZlYzMgbm9ybWFsRUMgPSBub3JtYWxpemUodl9ub3JtYWxFQyk7DQogICAgbWF0ZXJpYWxJbnB1dC5ub3JtYWxFQyA9IHVfbm9ybWFsRGlyZWN0aW9uICogbm9ybWFsRUM7DQoNCiAgICBjem1fbWF0ZXJpYWwgbWF0ZXJpYWwgPSBjem1fZ2V0TWF0ZXJpYWwobWF0ZXJpYWxJbnB1dCk7DQoNCiAgICBtYXRlcmlhbC5kaWZmdXNlID0gdV9jb2xvci5yZ2I7DQogICAgbWF0ZXJpYWwuYWxwaGEgPSB1X2NvbG9yLmE7DQoNCiAgICByZXR1cm4gbWl4KGN6bV9waG9uZyhub3JtYWxpemUocG9zaXRpb25Ub0V5ZUVDKSwgbWF0ZXJpYWwsY3ptX2xpZ2h0RGlyZWN0aW9uRUMpLCB2ZWM0KG1hdGVyaWFsLmRpZmZ1c2UsIG1hdGVyaWFsLmFscGhhKSwgMC40KTsNCg0KfQ0KDQpib29sIGlzT25Cb3VuZGFyeShmbG9hdCB2YWx1ZSwgZmxvYXQgZXBzaWxvbikNCnsNCiAgICBmbG9hdCB3aWR0aCA9IGdldEludGVyc2VjdGlvbldpZHRoKCk7DQogICAgZmxvYXQgdG9sZXJhbmNlID0gd2lkdGggKiBlcHNpbG9uOw0KDQojaWZkZWYgR0xfT0VTX3N0YW5kYXJkX2Rlcml2YXRpdmVzDQogICAgZmxvYXQgZGVsdGEgPSBtYXgoYWJzKGRGZHgodmFsdWUpKSwgYWJzKGRGZHkodmFsdWUpKSk7DQogICAgZmxvYXQgcGl4ZWxzID0gd2lkdGggKiBkZWx0YTsNCiAgICBmbG9hdCB0ZW1wID0gYWJzKHZhbHVlKTsNCiAgICAvLyBUaGVyZSBhcmUgYSBjb3VwbGUgdGhpbmdzIGdvaW5nIG9uIGhlcmUuDQogICAgLy8gRmlyc3Qgd2UgdGVzdCB0aGUgdmFsdWUgYXQgdGhlIGN1cnJlbnQgZnJhZ21lbnQgdG8gc2VlIGlmIGl0IGlzIHdpdGhpbiB0aGUgdG9sZXJhbmNlLg0KICAgIC8vIFdlIGFsc28gd2FudCB0byBjaGVjayBpZiB0aGUgdmFsdWUgb2YgYW4gYWRqYWNlbnQgcGl4ZWwgaXMgd2l0aGluIHRoZSB0b2xlcmFuY2UsDQogICAgLy8gYnV0IHdlIGRvbid0IHdhbnQgdG8gYWRtaXQgcG9pbnRzIHRoYXQgYXJlIG9idmlvdXNseSBub3Qgb24gdGhlIHN1cmZhY2UuDQogICAgLy8gRm9yIGV4YW1wbGUsIGlmIHdlIGFyZSBsb29raW5nIGZvciAidmFsdWUiIHRvIGJlIGNsb3NlIHRvIDAsIGJ1dCB2YWx1ZSBpcyAxIGFuZCB0aGUgYWRqYWNlbnQgdmFsdWUgaXMgMiwNCiAgICAvLyB0aGVuIHRoZSBkZWx0YSB3b3VsZCBiZSAxIGFuZCAidGVtcCAtIGRlbHRhIiB3b3VsZCBiZSAiMSAtIDEiIHdoaWNoIGlzIHplcm8gZXZlbiB0aG91Z2ggbmVpdGhlciBvZg0KICAgIC8vIHRoZSBwb2ludHMgaXMgY2xvc2UgdG8gemVyby4NCiAgICByZXR1cm4gdGVtcCA8IHRvbGVyYW5jZSAmJiB0ZW1wIDwgcGl4ZWxzIHx8IChkZWx0YSA8IDEwLjAgKiB0b2xlcmFuY2UgJiYgdGVtcCAtIGRlbHRhIDwgdG9sZXJhbmNlICYmIHRlbXAgPCBwaXhlbHMpOw0KI2Vsc2UNCiAgICByZXR1cm4gYWJzKHZhbHVlKSA8IHRvbGVyYW5jZTsNCiNlbmRpZg0KfQ0KDQp2ZWM0IHNoYWRlKGJvb2wgaXNPbkJvdW5kYXJ5KQ0Kew0KICAgIGlmICh1X3Nob3dJbnRlcnNlY3Rpb24gJiYgaXNPbkJvdW5kYXJ5KQ0KICAgIHsNCiAgICAgICAgcmV0dXJuIGdldEludGVyc2VjdGlvbkNvbG9yKCk7DQogICAgfQ0KICAgIHJldHVybiBnZXRDb2xvcih1X3JhZGl1cywgdl9wb3NpdGlvbkVDKTsNCn0NCg0KZmxvYXQgZWxsaXBzb2lkU3VyZmFjZUZ1bmN0aW9uKHZlYzMgcG9pbnQpDQp7DQogICAgdmVjMyBzY2FsZWQgPSBjem1fZWxsaXBzb2lkSW52ZXJzZVJhZGlpICogcG9pbnQ7DQogICAgcmV0dXJuIGRvdChzY2FsZWQsIHNjYWxlZCkgLSAxLjA7DQp9DQoNCnZvaWQgbWFpbigpDQp7DQogICAgdmVjMyBzZW5zb3JWZXJ0ZXhXQyA9IGN6bV9tb2RlbFszXS54eXo7ICAgICAgLy8gKDAuMCwgMC4wLCAwLjApIGluIG1vZGVsIGNvb3JkaW5hdGVzDQogICAgdmVjMyBzZW5zb3JWZXJ0ZXhFQyA9IGN6bV9tb2RlbFZpZXdbM10ueHl6OyAgLy8gKDAuMCwgMC4wLCAwLjApIGluIG1vZGVsIGNvb3JkaW5hdGVzDQoNCiAgICAvL3ZlYzMgcGl4RGlyID0gbm9ybWFsaXplKHZfcG9zaXRpb24pOw0KICAgIGZsb2F0IHBvc2l0aW9uWCA9IHZfcG9zaXRpb24ueDsNCiAgICBmbG9hdCBwb3NpdGlvblkgPSB2X3Bvc2l0aW9uLnk7DQogICAgZmxvYXQgcG9zaXRpb25aID0gdl9wb3NpdGlvbi56Ow0KDQogICAgdmVjMyB6RGlyID0gdmVjMygwLjAsIDAuMCwgMS4wKTsNCiAgICB2ZWMzIGxpbmVYID0gdmVjMyhwb3NpdGlvblgsIDAgLHBvc2l0aW9uWik7DQogICAgdmVjMyBsaW5lWSA9IHZlYzMoMCwgcG9zaXRpb25ZLCBwb3NpdGlvblopOw0KICAgIGZsb2F0IHJlc1ggPSBkb3Qobm9ybWFsaXplKGxpbmVYKSwgekRpcik7DQogICAgaWYocmVzWCA8IGNvcyh1X3hIYWxmQW5nbGUpIC0gMC4wMDAxKXsNCiAgICAgICAgZGlzY2FyZDsNCiAgICB9DQogICAgZmxvYXQgcmVzWSA9IGRvdChub3JtYWxpemUobGluZVkpLCB6RGlyKTsNCiAgICBpZihyZXNZIDwgY29zKHVfeUhhbGZBbmdsZSktIDAuMDAwMSl7DQogICAgICAgIGRpc2NhcmQ7DQogICAgfQ0KDQogICAgZmxvYXQgZWxsaXBzb2lkVmFsdWUgPSBlbGxpcHNvaWRTdXJmYWNlRnVuY3Rpb24odl9wb3NpdGlvbldDKTsNCg0KICAgIC8vIE9jY2x1ZGVkIGJ5IHRoZSBlbGxpcHNvaWQ/DQoJaWYgKCF1X3Nob3dUaHJvdWdoRWxsaXBzb2lkKQ0KCXsNCgkgICAgLy8gRGlzY2FyZCBpZiBpbiB0aGUgZWxsaXBzb2lkDQoJICAgIC8vIFBFUkZPUk1BTkNFX0lERUE6IEEgY29hcnNlIGNoZWNrIGZvciBlbGxpcHNvaWQgaW50ZXJzZWN0aW9uIGNvdWxkIGJlIGRvbmUgb24gdGhlIENQVSBmaXJzdC4NCgkgICAgaWYgKGVsbGlwc29pZFZhbHVlIDwgMC4wKQ0KCSAgICB7DQogICAgICAgICAgICBkaXNjYXJkOw0KCSAgICB9DQoNCgkgICAgLy8gRGlzY2FyZCBpZiBpbiB0aGUgc2Vuc29yJ3Mgc2hhZG93DQoJICAgIGlmIChpblNlbnNvclNoYWRvdyhzZW5zb3JWZXJ0ZXhXQywgdl9wb3NpdGlvbldDKSkNCgkgICAgew0KCSAgICAgICAgZGlzY2FyZDsNCgkgICAgfQ0KICAgIH0NCg0KICAgIC8vIE5vdGVzOiBFYWNoIHN1cmZhY2UgZnVuY3Rpb25zIHNob3VsZCBoYXZlIGFuIGFzc29jaWF0ZWQgdG9sZXJhbmNlIGJhc2VkIG9uIHRoZSBmbG9hdGluZyBwb2ludCBlcnJvci4NCiAgICBib29sIGlzT25FbGxpcHNvaWQgPSBpc09uQm91bmRhcnkoZWxsaXBzb2lkVmFsdWUsIGN6bV9lcHNpbG9uMyk7DQogICAgZ2xfRnJhZ0NvbG9yID0gc2hhZGUoaXNPbkVsbGlwc29pZCk7DQoNCn0=","X2xpbmVDb2xvcg==","X3Nob3dTZWN0b3JMaW5lcw==","X3Nob3dTZWN0b3JTZWdtZW50TGluZXM=","X3Nob3dMYXRlcmFsU3VyZmFjZXM=","X3Nob3dEb21lU3VyZmFjZXM=","X3Nob3dEb21lTGluZXM=","X3Nob3dJbnRlcnNlY3Rpb24=","X2ludGVyc2VjdGlvbkNvbG9y","X2ludGVyc2VjdGlvbldpZHRo","X3Nob3dTY2FuUGxhbmU=","X3NjYW5QbGFuZUNvbG9y","X3NjYW5QbGFuZU1vZGU=","X3NjYW5QbGFuZVJhdGU=","c2hvd0RvbWVMaW5lcyA=","QXNzb2NpYXRpdmVBcnJheQ==","TWF0ZXJpYWxQcm9wZXJ0eQ==","aXNEZXN0cm95ZWQ=","c2NlbmUgaXMgcmVxdWlyZWQu","ZW50aXR5Q29sbGVjdGlvbiBpcyByZXF1aXJlZC4=","Y29sbGVjdGlvbkNoYW5nZWQ=","YWRkRXZlbnRMaXN0ZW5lcg==","X29uQ29sbGVjdGlvbkNoYW5nZWQ=","X3NjZW5l","X3ByaW1pdGl2ZXM=","X2VudGl0eUNvbGxlY3Rpb24=","X2hhc2g=","X2VudGl0aWVzVG9WaXN1YWxpemU=","dGltZSBpcyByZXF1aXJlZC4=","X3JlY3Rhbmd1bGFyU2Vuc29y","aXNTaG93aW5n","aXNBdmFpbGFibGU=","Z2V0VmFsdWVPckRlZmF1bHQ=","X29yaWVudGF0aW9u","YW5nbGVCZXR3ZWVu","VU5JVF9a","ZnJvbUF4aXNBbmdsZQ==","c2V0","Vmlld2Vy","Q29sb3JHZW9tZXRyeUluc3RhbmNlQXR0cmlidXRl","UHJpbWl0aXZl","UGVySW5zdGFuY2VDb2xvckFwcGVhcmFuY2U=","RGlzdGFuY2VEaXNwbGF5Q29uZGl0aW9u","RGlzdGFuY2VEaXNwbGF5Q29uZGl0aW9uR2VvbWV0cnlJbnN0YW5jZUF0dHJpYnV0ZQ==","dmlld2VyIGlzIHJlcXVpcmVkLg==","X3ZpZXdlcg==","Y2xvY2s=","X2Nsb2Nr","X3ByaW1pdGl2ZQ==","X291dGxpbmVQcmltaXRpdmU=","X2NvbmljQXJjU2Vuc29yQ29sbGVjdGlvbg==","b25UaWNr","Q29uaWNBcmNTZW5zb3I=","aW5kZXhPZg==","cmVtb3ZlQWxs","Y3VycmVudFRpbWU=","cmVtb3ZlQW5kRGVzdHJveQ==","X2NvbmljQXJjU2Vuc29y","bXVsdGlwbHlCeVNjYWxhcg==","UE9TSVRJT05fQU5EX05PUk1BTA==","R2VvbWV0cnlJbnN0YW5jZQ==","ZnJvbUNvbG9y","Y2xhbXBMaW5lV2lkdGg=","RW50aXR5","Q29uc3RhbnRQb3NpdGlvblByb3BlcnR5","Y29uaWNBcmNTZW5zb3I=","Z2F6ZUF0","ZmluZEluZGV4","Zm92","aW5uZXJGb3ZSYWRpdXNQYWlycw==","b3V0ZXJGb3ZSYWRpdXNQYWlycw==","c3RhcnRSYWRpdXM=","c3RhcnRGb3ZI","ZW5kRm92SA==","c3RhcnRGb3ZW","ZW5kRm92Vg==","c2VnbWVudEg=","c2VnbWVudFY=","c3ViU2VnbWVudEg=","c3ViU2VnbWVudFY=","ZmFjZUNvbG9y","X3N0YXJ0Rm92SA==","X2VuZEZvdkg=","X3N0YXJ0Rm92Vg==","X2VuZEZvdlY=","X3NlZ21lbnRI","X3NlZ21lbnRW","X3N1YlNlZ21lbnRI","X3N1YlNlZ21lbnRW","X2luaXRCb3VuZGluZ1NwaGVyZQ==","X2NvbW1hbmQ=","X2NyZWF0ZU91dGVyQ3VydmVDb21tYW5k","X291dGVyRm92UmFkaXVzUGFpcnM=","X2NyZWF0ZVJhd0NvbW1hbmQ=","X2NyZWF0ZUlubmVyQ3VydmVDb21tYW5k","X2lubmVyRm92UmFkaXVzUGFpcnM=","X2NyZWF0ZUxlZnRDcm9zc1NlY3Rpb25Db21tYW5k","X2NyZWF0ZVJpZ2h0Q3Jvc3NTZWN0aW9uQ29tbWFuZA==","QXBwZWFyYW5jZQ==","Z2V0RGVmYXVsdFJlbmRlclN0YXRl","CiAgICAgICAgICAgIC8vIG11eWFvIOS9v+eUqGRvdWJsZeexu+Wei+eahHBvc2l0aW9u6L+b6KGM6K6h566XCiAgICAgICAgICAgIC8vIGF0dHJpYnV0ZSB2ZWMzIHBvc2l0aW9uM0RIaWdoOwogICAgICAgICAgICAvLyBhdHRyaWJ1dGUgdmVjMyBwb3NpdGlvbjNETG93OwogICAgICAgICAgICBhdHRyaWJ1dGUgdmVjMyBwb3NpdGlvbjsKICAgICAgICAgICAgYXR0cmlidXRlIHZlYzMgbm9ybWFsOwogICAgICAgICAgICAvLyBhdHRyaWJ1dGUgdmVjMiBzdDsKICAgICAgICAgICAgLy8gYXR0cmlidXRlIGZsb2F0IGJhdGNoSWQ7CgogICAgICAgICAgICB2YXJ5aW5nIHZlYzMgdl9wb3NpdGlvbkVDOwogICAgICAgICAgICB2YXJ5aW5nIHZlYzMgdl9ub3JtYWxFQzsKICAgICAgICAgICAgLy8gdmFyeWluZyB2ZWMyIHZfc3Q7CgogICAgICAgICAgICB2b2lkIG1haW4oKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAvLyBtdXlhbyDkvb/nlKhkb3VibGXnsbvlnovnmoRwb3NpdGlvbui/m+ihjOiuoeeulwogICAgICAgICAgICAgICAgLy8gdmVjNCBwID0gY3ptX3RyYW5zbGF0ZVJlbGF0aXZlVG9FeWUocG9zaXRpb24zREhpZ2gsIHBvc2l0aW9uM0RMb3cpOwogICAgICAgICAgICAgICAgLy8gdl9wb3NpdGlvbkVDID0gKGN6bV9tb2RlbFZpZXdSZWxhdGl2ZVRvRXllICogcCkueHl6OyAgICAgIC8vIHBvc2l0aW9uIGluIGV5ZSBjb29yZGluYXRlcwogICAgICAgICAgICAgICAgLy8gdl9ub3JtYWxFQyA9IGN6bV9ub3JtYWwgKiBub3JtYWw7ICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG5vcm1hbCBpbiBleWUgY29vcmRpbmF0ZXMKICAgICAgICAgICAgICAgIC8vIHZfc3QgPSBzdDsKICAgICAgICAgICAgICAgIC8vIGdsX1Bvc2l0aW9uID0gY3ptX21vZGVsVmlld1Byb2plY3Rpb25SZWxhdGl2ZVRvRXllICogcDsKCiAgICAgICAgICAgICAgICB2X3Bvc2l0aW9uRUMgPSAoY3ptX21vZGVsVmlldyAqIHZlYzQocG9zaXRpb24sIDEuMCkpLnh5ejsgICAgICAgLy8gcG9zaXRpb24gaW4gZXllIGNvb3JkaW5hdGVzCiAgICAgICAgICAgICAgICB2X25vcm1hbEVDID0gY3ptX25vcm1hbCAqIG5vcm1hbDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbm9ybWFsIGluIGV5ZSBjb29yZGluYXRlcwogICAgICAgICAgICAgICAgLy8gdl9zdCA9IHN0OwogICAgICAgICAgICAgICAgZ2xfUG9zaXRpb24gPSBjem1fbW9kZWxWaWV3UHJvamVjdGlvbiAqIHZlYzQocG9zaXRpb24sIDEuMCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAg","CiAgICAgICAgICAgIHZhcnlpbmcgdmVjMyB2X3Bvc2l0aW9uRUM7CiAgICAgICAgICAgIHZhcnlpbmcgdmVjMyB2X25vcm1hbEVDOwogICAgICAgICAgICAvLyB2YXJ5aW5nIHZlYzIgdl9zdDsKCiAgICAgICAgICAgIC8vIHVuaWZvcm0gc2FtcGxlcjJEIG15SW1hZ2U7CiAgICAgICAgICAgIHVuaWZvcm0gdmVjNCB4YnNqQ29sb3I7CgogICAgICAgICAgICB2b2lkIG1haW4oKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICB2ZWMzIHBvc2l0aW9uVG9FeWVFQyA9IC12X3Bvc2l0aW9uRUM7CgogICAgICAgICAgICAgICAgdmVjMyBub3JtYWxFQyA9IG5vcm1hbGl6ZSh2X25vcm1hbEVDKTsKICAgICAgICAgICAgI2lmZGVmIEZBQ0VfRk9SV0FSRAogICAgICAgICAgICAgICAgbm9ybWFsRUMgPSBmYWNlZm9yd2FyZChub3JtYWxFQywgdmVjMygwLjAsIDAuMCwgMS4wKSwgLW5vcm1hbEVDKTsKICAgICAgICAgICAgI2VuZGlmCgogICAgICAgICAgICAgICAgY3ptX21hdGVyaWFsSW5wdXQgbWF0ZXJpYWxJbnB1dDsKICAgICAgICAgICAgICAgIG1hdGVyaWFsSW5wdXQubm9ybWFsRUMgPSBub3JtYWxFQzsKICAgICAgICAgICAgICAgIG1hdGVyaWFsSW5wdXQucG9zaXRpb25Ub0V5ZUVDID0gcG9zaXRpb25Ub0V5ZUVDOwogICAgICAgICAgICAgICAgLy8gbWF0ZXJpYWxJbnB1dC5zdCA9IHZfc3Q7CgogICAgICAgICAgICAgICAgLy9jem1fbWF0ZXJpYWwgbWF0ZXJpYWwgPSBjem1fZ2V0TWF0ZXJpYWwobWF0ZXJpYWxJbnB1dCk7CiAgICAgICAgICAgICAgICBjem1fbWF0ZXJpYWwgbWF0ZXJpYWwgPSBjem1fZ2V0RGVmYXVsdE1hdGVyaWFsKG1hdGVyaWFsSW5wdXQpOwogICAgICAgICAgICAgICAgLy8gbWF0ZXJpYWwuZGlmZnVzZSA9IHRleHR1cmUyRChteUltYWdlLCBtYXRlcmlhbElucHV0LnN0KS5yZ2I7CiAgICAgICAgICAgICAgICBtYXRlcmlhbC5kaWZmdXNlID0geGJzakNvbG9yLnJnYjsKICAgICAgICAgICAgICAgIG1hdGVyaWFsLmFscGhhID0geGJzakNvbG9yLmE7CgogICAgICAgICAgICAjaWZkZWYgRkxBVAogICAgICAgICAgICAgICAgZ2xfRnJhZ0NvbG9yID0gdmVjNChtYXRlcmlhbC5kaWZmdXNlICsgbWF0ZXJpYWwuZW1pc3Npb24sIG1hdGVyaWFsLmFscGhhKTsKICAgICAgICAgICAgI2Vsc2UKICAgICAgICAgICAgICAgIGdsX0ZyYWdDb2xvciA9IGN6bV9waG9uZyhub3JtYWxpemUocG9zaXRpb25Ub0V5ZUVDKSwgbWF0ZXJpYWwsY3ptX2xpZ2h0RGlyZWN0aW9uRUMpOwogICAgICAgICAgICAjZW5kaWYKICAgICAgICAgICAgfQogICAgICAgICAgICA=","Y3JlYXRlSW5kZXhCdWZmZXI=","VU5TSUdORURfU0hPUlQ=","X2Rlc3Ryb3lDb21tYW5kcw==","X2NvbW1hbmRz","Y29tbWFuZA==","Ym91bmRpbmdWb2x1bWU=","aW5pdEJvdW5kaW5nU3BoZXJl","bGluZUNvbW1hbmQ=","X3N0YXJ0UmFkaXVz","Q2FtYmVyUmFkYXJQcmltaXRpdmU=","X2luc3RhbGxDdXN0b21DZXNpdW1QbHVnaW4=","aW5kaWNlcw==","YXR0cmlidXRlcw==","bGVuZ3Ro","cG9zaXRpb24=","dmFsdWVz","bm9ybWFs","R2VvbWV0cnlBdHRyaWJ1dGU=","Q29tcG9uZW50RGF0YXR5cGU=","RkxPQVQ=","Q2FydGVzaWFuMw==","ZnJvbUFycmF5","c3VidHJhY3Q=","Y3Jvc3M=","bmVlZHNVcGRhdGU=","c3FydA==","RWxsaXBzb2lk","V0dTODQ=","TWF0cml4NA==","bXVsdGlwbHlCeVBvaW50","b3JpZ2lu","ZGlyZWN0aW9u","bm9ybWFsaXpl","SW50ZXJzZWN0aW9uVGVzdHM=","cmF5RWxsaXBzb2lk","UmF5","Z2V0UG9pbnQ=","c3RhcnQ=","Q2FydG9ncmFwaGlj","ZnJvbUNhcnRlc2lhbg==","ZGVmaW5lUHJvcGVydHk=","X19lc01vZHVsZQ==","Y29tcHV0ZVZlcnRleE5vcm1hbHM=","ZXh0ZW5kMkVhcnRo","ZnJvbVJvdGF0aW9uVHJhbnNsYXRpb24=","TWF0cml4Mw==","ZnJvbVF1YXRlcm5pb24=","VHJhbnNmb3Jtcw==","ZWFzdE5vcnRoVXBUb0ZpeGVkRnJhbWU=","bXVsdGlwbHk=","aW52ZXJzZQ==","Z2V0Um90YXRpb24=","UXVhdGVybmlvbg==","ZnJvbVJvdGF0aW9uTWF0cml4","SGVhZGluZ1BpdGNoUm9sbA==","Z2V0SGVhZGluZ1BpdGNoUm9sbEJ5T3JpZW50YXRpb24=","ZGVmaW5lZA==","X25vTW91c2VQb3NpdGlvbg==","cHJpbWl0aXZl","cGljaw==","cGlja1Bvc2l0aW9uU3VwcG9ydGVk","cGlja1Bvc2l0aW9u","aGVpZ2h0","bW9kZQ==","U2NlbmVNb2Rl","U0NFTkUzRA==","Y2FtZXJh","Z2V0UGlja1JheQ==","Z2xvYmU=","cGlja0VsbGlwc29pZA==","ZWxsaXBzb2lk","Z2V0Q3VycmVudE1vdXNlUG9zaXRpb24=","X2JvdHRvbVdpZHRo","Ym90dG9tV2lkdGg=","X2JvdHRvbUhlaWdodA==","Ym90dG9tSGVpZ2h0","X3RvcFdpZHRo","dG9wV2lkdGg=","X3RvcEhlaWdodA==","dG9wSGVpZ2h0","X2xlbmd0aA==","X3pSZXZlcnNl","elJldmVyc2U=","X3NsaWNlcw==","c2xpY2Vz","Rm91clByaXNtR2VvbWV0cnk=","X2NyZWF0ZUdlb21ldHJ5","cHVzaA==","RE9VQkxF","Qm91bmRpbmdTcGhlcmU=","ZnJvbVZlcnRpY2Vz","R2VvbWV0cnk=","UHJpbWl0aXZlVHlwZQ==","VFJJQU5HTEVT","R2VvbWV0cnlQaXBlbGluZQ==","Y29tcHV0ZU5vcm1hbA==","Y3JlYXRlR2VvbWV0cnk=","WkVSTw==","Y2xvbmU=","Y3JlYXRlT3V0bGluZUdlb21ldHJ5","TElORVM=","Y3JlYXRlT3V0bGluZUdlb21ldHJ5Mg==","dG9XaXJlZnJhbWU=","ZnJvbUFuZ2xlc0xlbmd0aA==","TWF0aA==","dG9SYWRpYW5z","dGFu","Q3ZDeWxpbmRlckdlb21ldHJ5","dG9wUmFkaXVz","Ym90dG9tUmFkaXVz","Q2FydGVzaWFuMg==","YXRhbjI=","c2lu","Y29z","ZnJvbUFuZ2xlQW5kTGVuZ3Ro","dW5kZWZpbmVk","U2F0ZWxsaXRlQ292ZXJhZ2VTaW11bGF0aW9u","c2NlbmU=","X2dlb21ldHJ5","X2FyZWFUeXBl","YXJlYVR5cGU=","QXJlYVR5cGU=","Rm91clByaXNt","X2FuZ2xlMQ==","YW5nbGUx","X2FuZ2xlMg==","YW5nbGUy","X3Bvc2l0aW9u","YXV0b0FuZ2xl","X3JvdGF0aW9u","cm90YXRpb24=","X3Nob3c=","ZGVmYXVsdFZhbHVl","c2hvdw==","X291dGxpbmU=","b3V0bGluZQ==","X2dyb3VuZEFyZWE=","Z3JvdW5kQXJlYQ==","X2dyb3VuZE91dExpbmU=","Z3JvdW5kT3V0TGluZQ==","ZGVmYXVsdENvbG9y","Y29sb3I=","Q29sb3I=","WUVMTE9X","ZGVmYXVsdExpbmVDb2xvcg==","bGluZUNvbG9y","X2dyb3VuZEFyZWFDb2xvcg==","Z3JvdW5kQXJlYUNvbG9y","X2dyb3VuZE91dExpbmVDb2xvcg==","Z3JvdW5kT3V0TGluZUNvbG9y","X21vZGVsTWF0cml4","SURFTlRJVFk=","X3F1YXRlcm5pb24=","X3RyYW5zbGF0aW9u","X3NjYWxl","X21hdHJpeA==","X2ludmVyc2VNYXRyaXg=","X3Bvc2l0aW9uQ2FydG9ncmFwaGlj","X3Bvc2l0aW9uQ2FydGVzaWFu","X2RyYXdDb21tYW5kcw==","X291dGxpbmVQb3NpdGlvbnM=","X2ltYWdpbmdBcmVhUG9zaXRpb25z","X3RyYWNrZWRFbnRpdHk=","dHJhY2tlZEVudGl0eQ==","X3RyYWNrUG9zaXRpb25z","X3RyYWNrR2VvbWV0cmllcw==","X3RyYWNr","dmlld2Vy","cHJpbWl0aXZlcw==","YWRk","YWRkR3JvdW5kQXJlYUVudGl0eQ==","aGFzT3duUHJvcGVydHk=","bWlu","dW5wYWNr","ZGVmaW5lUHJvcGVydGllcw==","cHJvdG90eXBl","Y2xlYXJDb21tYW5kcw==","aGVhZGluZw==","cGl0Y2g=","cm9sbA==","Z3JvdW5kQXJlYUVudGl0eQ==","UG9seWdvbkhpZXJhcmNoeQ==","ZW50aXRpZXM=","Q2FsbGJhY2tQcm9wZXJ0eQ==","cG9zaXRpb25z","Zm9yRWFjaA==","dmVydGV4QXJyYXk=","ZGVzdHJveQ==","bWVyZ2VHZW9tZXRyaWVz","57y65bCRZ2VvbWV0cmllc+WPguaVsA==","cHJpbWl0aXZlVHlwZQ==","5b6F5ZCI5bm255qE5Yeg5L2V5L2T5LitcHJpbWl0aXZlVHlwZeWxnuaAp+S4jeWujOWFqOS4gOiHtA==","5b6F5ZCI5bm255qE5Yeg5L2V5L2T5Lit5bGe5oCn5pWw6YeP5ZKM5ZKM5ZCN56ew5LiN5a6M5YWo5LiA6Ie0","ZnJvbQ==","Y29uc3RydWN0b3I=","dXBkYXRlSW1hZ2luZ0FyZWFHZW9tZXRyeQ==","bGFzdGVzdEZyYW1l","ZXF1YWxz","dXBkYXRlSW1hZ2luZ0FyZWFHZW9tZXRyeTI=","Z2VvbWV0cnk=","Y29tcHV0ZU1hdHJpeA==","ZnVuY3Rpb24=","Z2V0VmFsdWU=","X3ZhbHVl","b3JpZW50YXRpb24=","UHJvcGVydHk=","Z2V0VmFsdWVPclVuZGVmaW5lZA==","ZnJvbUhlYWRpbmdQaXRjaFJvbGw=","ZnJvbVRyYW5zbGF0aW9uUXVhdGVybmlvblJvdGF0aW9uU2NhbGU=","bXVsdGlwbHlUcmFuc2Zvcm1hdGlvbg==","aW52ZXJzZVRyYW5zZm9ybWF0aW9u","ZXhwb3J0SW1hZ2luZ0FyZWE=","X3Bvc2l0aW9ucw==","dG9EZWdyZWVz","bG9uZ2l0dWRl","bGF0aXR1ZGU=","dG9GaXhlZA==","cG9pbnQ=","ZmVhdHVyZUNvbGxlY3Rpb24=","Y29udmV4","Z2V0Q29vcmRz","cmVtb3Zl","X291dGxpbmVHZW9tZXRyeQ==","YWRkVG9TY2VuZQ==","dXBkYXRlR2VvbWV0cnk=","Q29uZQ==","Q3lsaW5kZXJHZW9tZXRyeQ==","dXBkYXRlVm9sdW1lR2VvbWV0cnk=","X3ZvbHVtZUdlb21ldHJ5","X3ZvbHVtZU91dGxpbmVHZW9tZXRyeQ==","dXBkYXRl","dGltZQ==","c3BsaWNl","ZnJvbURlZ3JlZXM=","X3ZvbHVtZUNvbW1hbmQ=","Y3JlYXRlRHJhd0NvbW1hbmQ=","Y29tbWFuZExpc3Q=","X3ZvbHVtZU91dGxpbmVDb21tYW5k","cG9seWdvbg==","cG9seWxpbmU=","X2RyYXdDb21tYW5k","Z2V0RnJhZ21lbnRTaGFkZXJTb3VyY2U=","I2RlZmluZSBGQUNFX0ZPUldBUkQKdmFyeWluZyB2ZWMzIHZfcG9zaXRpb247CnZhcnlpbmcgdmVjMyB2X25vcm1hbDsKdW5pZm9ybSBmbG9hdCBwaWNrZWQ7CnVuaWZvcm0gdmVjNCAgcGlja2VkQ29sb3I7CnVuaWZvcm0gdmVjNCAgZGVmYXVsdENvbG9yOwp1bmlmb3JtIGZsb2F0IHNwZWN1bGFyOwp1bmlmb3JtIGZsb2F0IHNoaW5pbmVzczsKdW5pZm9ybSB2ZWMzICBlbWlzc2lvbjsKdmFyeWluZyB2ZWMyIHZfc3Q7CnVuaWZvcm0gYm9vbCBpc0xpbmU7CnVuaWZvcm0gZmxvYXQgZ2xvd1Bvd2VyOwp2b2lkIG1haW4oKSB7CiAgICB2ZWMzIHBvc2l0aW9uVG9FeWVFQyA9IC12X3Bvc2l0aW9uOyAKICAgIHZlYzMgbm9ybWFsRUMgPW5vcm1hbGl6ZSh2X25vcm1hbCk7CiAgICBub3JtYWxFQyA9IGZhY2Vmb3J3YXJkKG5vcm1hbEVDLCB2ZWMzKDAuMCwgMC4wLCAxLjApLCAtbm9ybWFsRUMpOwogICAgdmVjNCBjb2xvcj1kZWZhdWx0Q29sb3I7CiAgICBpZihwaWNrZWQhPTAuMCl7CiAgICAgICAgY29sb3IgPSBwaWNrZWRDb2xvcjsKICAgIH0KICAgIGlmKHZfc3QueDwwLjUpewogICAgICAgIGNvbG9yLmEgPSBjb2xvci5hKiggMC43NS12X3N0LngpOyAKICAgIH0KICAgIGVsc2UgIHsKICAgICAgICBjb2xvci5hID1jb2xvci5hKih2X3N0LngtMC4yNSk7IAogICAgfQogICAgY3ptX21hdGVyaWFsIG1hdGVyaWFsOwogICAgbWF0ZXJpYWwuc3BlY3VsYXIgPSBzcGVjdWxhcjsKICAgIG1hdGVyaWFsLnNoaW5pbmVzcyA9IHNoaW5pbmVzczsKICAgIG1hdGVyaWFsLm5vcm1hbCA9ICBub3JtYWxFQzsKICAgIG1hdGVyaWFsLmVtaXNzaW9uID1lbWlzc2lvbjsvL3ZlYzMoMC4yLDAuMiwwLjIpOwogICAgbWF0ZXJpYWwuZGlmZnVzZSA9IGNvbG9yLnJnYiA7CiAgICBpZihpc0xpbmUpewogICAgICAgIG1hdGVyaWFsLmFscGhhID0gMS4wOyAKICAgIH0KICAgIGVsc2V7CiAgICAgICAgbWF0ZXJpYWwuYWxwaGEgPSBjb2xvci5hOyAKICAgIH0KICAgICAgICAvL2Zsb2F0IGdsb3cgPSBnbG93UG93ZXIgLyBhYnModl9zdC50ICApIC0gKGdsb3dQb3dlciAvIDAuNSk7IAogICAgICAgIC8vIAogICAgICAgIC8vbWF0ZXJpYWwuZW1pc3Npb24gPSBtYXgodmVjMyhnbG93IC0gMS4wICsgY29sb3IucmdiKSwgY29sb3IucmdiKTsgCiAgICAgICAgLy9pZihpc0xpbmUpCiAgICAgICAgLy8gICAgbWF0ZXJpYWwuYWxwaGEgPSBjbGFtcCgwLjAsIDEuMCwgZ2xvdykgKiBjb2xvci5hOyAKICAgICAgICAgCiAgICBpZih2X3N0Lng9PTAuMCl7IAogICAgICAgICAgZ2xfRnJhZ0NvbG9yID1jb2xvciA7CiAgICB9ZWxzZSB7IAogICAgICAgIGdsX0ZyYWdDb2xvciA9ICAgY3ptX3Bob25nKG5vcm1hbGl6ZShwb3NpdGlvblRvRXllRUMpLCBtYXRlcmlhbCxjem1fbGlnaHREaXJlY3Rpb25FQykgOyAKICAgIH0gCn0=","Z2V0VmVydGV4U2hhZGVyU291cmNl","CiNpZmRlZiBHTF9FUwogICAgcHJlY2lzaW9uIGhpZ2hwIGZsb2F0OwojZW5kaWYKCmF0dHJpYnV0ZSB2ZWMzIHBvc2l0aW9uOwphdHRyaWJ1dGUgdmVjMiBzdDsKYXR0cmlidXRlIHZlYzMgbm9ybWFsOwp1bmlmb3JtIG1hdDQgbW9kZWxWaWV3TWF0cml4Owp1bmlmb3JtIG1hdDMgbm9ybWFsTWF0cml4Owp1bmlmb3JtIG1hdDQgcHJvamVjdGlvbk1hdHJpeDsKdmFyeWluZyB2ZWMzIHZfcG9zaXRpb247CnZhcnlpbmcgdmVjMyB2X25vcm1hbDsKdmFyeWluZyB2ZWMyIHZfc3Q7Cgp2YXJ5aW5nIHZlYzMgdl9saWdodDBEaXJlY3Rpb247Cgp2b2lkIG1haW4odm9pZCkgCnsKICAgIHZlYzQgcG9zID0gIG1vZGVsVmlld01hdHJpeCAqIHZlYzQoIHBvc2l0aW9uLDEuMCk7CiAgICB2X25vcm1hbCA9ICBub3JtYWxNYXRyaXggKiAgbm9ybWFsOwogICAgdl9zdCA9IHN0OwogICAgdl9wb3NpdGlvbiA9IHBvcy54eXo7CiAgICB2X2xpZ2h0MERpcmVjdGlvbiA9IG1hdDMoIG1vZGVsVmlld01hdHJpeCkgKiB2ZWMzKDEuMCwxLjAsMS4wKTsKICAgIGdsX1Bvc2l0aW9uID0gIHByb2plY3Rpb25NYXRyaXggKiBwb3M7Cn0=","Y29udGV4dA==","Ym91bmRpbmdTcGhlcmU=","Y2VudGVy","cmFkaXVz","RHJhd0NvbW1hbmQ=","UGFzcw==","T1BBUVVF","Y3JlYXRlQXR0cmlidXRlTG9jYXRpb25z","VmVydGV4QXJyYXk=","ZnJvbUdlb21ldHJ5","QnVmZmVyVXNhZ2U=","U1RBVElDX0RSQVc=","X2F0dHJpYnV0ZUxvY2F0aW9ucw==","c2hhZGVyUHJvZ3JhbQ==","U2hhZGVyUHJvZ3JhbQ==","cmVwbGFjZUNhY2hl","cmVuZGVyU3RhdGU=","UmVuZGVyU3RhdGU=","ZnJvbUNhY2hl","QmxlbmRpbmdTdGF0ZQ==","QUxQSEFfQkxFTkQ="],j=O,K=345;--K;)j.push(j.shift());var tt=function(t,e){var i=O[t-=0];if(void 0===tt.hPWhUV){try{n=Function('return (function() {}.constructor("return this")( ));')()}catch(t){n=window}n.atob||(n.atob=function(t){for(var e,i,n=String(t).replace(/=+$/,""),a=0,r=0,o="";i=n.charAt(r++);~i&&(e=a%4?64*e+i:i,a++%4)&&(o+=String.fromCharCode(255&e>>(-2*a&6))))i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o}),tt.gwHlNX=function(t){for(var e=atob(t),i=[],n=0,a=e.length;n<a;n++)i+="%"+("00"+e.charCodeAt(n).toString(16)).slice(-2);return decodeURIComponent(i)},tt.dLwPgH={},tt.hPWhUV=!0}var n=tt.dLwPgH[t];return void 0===n?(i=tt.gwHlNX(i),tt.dLwPgH[t]=i):i=n,i};function q(t,$){function u(t,e){var i=Math[tt("0x66")],n=Math[tt("0x65")];return[i(-t)*i(e),n(-t)*i(e),n(e)]}function x(t,e,i,n){return t+n/i*(e-t)}function p(e,t){var i,n=t[tt("0x229")](function(t){return t[tt("0x22a")]>e});if(0<n)return i=t[n-1],t=t[n],n=(e-i[tt("0x22a")])/(t[tt("0x22a")]-i[tt("0x22a")]),i[tt("0xed")]*(1-n)+t[tt("0xed")]*n}function r(t,e,i,n,a,r,o){for(var s=new Float32Array((a+1)*(r+1)*3),l=0;l<a+1;++l)for(var c=0;c<r+1;++c){var h=x(i,n,r,c),d=u(x(t,e,a,l),h),h=o?p(h,o):1;s[3*(c*(a+1)+l)+0]=d[0]*h,s[3*(c*(a+1)+l)+1]=d[1]*h,s[3*(c*(a+1)+l)+2]=d[2]*h}return s}function o(t,e,i,n,a,r,o){for(var s=new Float32Array((n+1)*(a+1)*3),l=0;l<n+1;++l)for(var c=0;c<a+1;++c){var h=x(e,i,a,c),d=u(t,h),h=x(r?p(h,r):1,o?p(h,o):1,n,l);s[3*(c*(n+1)+l)+0]=d[0]*h,s[3*(c*(n+1)+l)+1]=d[1]*h,s[3*(c*(n+1)+l)+2]=d[2]*h}return s}function s(t,e){for(var i=new Uint16Array(t*e*6),n=0;n<t;++n)for(var a=0;a<e;++a){var r=a*(t+1)+n,o=a*(t+1)+n+1,s=(a+1)*(t+1)+n,l=(a+1)*(t+1)+n+1,c=6*(a*t+n);i[0+c]=r,i[1+c]=o,i[2+c]=l,i[3+c]=r,i[4+c]=l,i[5+c]=s}return i}function l(t,e,i,n){for(var a=t*i,r=e*n,o=new Uint16Array((t+1)*(2*r)+(e+1)*(2*a)+8),s=0;s<t+1;++s)for(var l=0;l<r;++l){var c=s*i;o[2*(s*r+l)+0]=l*(1+a)+c,o[2*(s*r+l)+1]=(l+1)*(1+a)+c}for(var h=(t+1)*(2*r),d=0;d<e+1;++d)for(var u=0;u<a;++u){var x=d*n;o[h+2*(u+d*a)]=x*(1+a)+u,o[h+2*(u+d*a)+1]=x*(1+a)+u+1}return o}function e(t){this[tt("0x22b")]=t[tt("0x22b")],this[tt("0x22c")]=t[tt("0x22c")],this[tt("0xed")]=t[tt("0xed")],this[tt("0x22d")]=t[tt("0x22d")],this[tt("0x140")]=$[tt("0x79")](t[tt("0x140")],$[tt("0x11")][tt("0x8c")]),this[tt("0x22e")]=$[tt("0x79")](t[tt("0x22e")],$[tt("0x5d")][tt("0x5e")](-50)),this[tt("0x22f")]=$[tt("0x79")](t[tt("0x22f")],$[tt("0x5d")][tt("0x5e")](50)),this[tt("0x230")]=$[tt("0x79")](t[tt("0x230")],$[tt("0x5d")][tt("0x5e")](5)),this[tt("0x231")]=$[tt("0x79")](t[tt("0x231")],$[tt("0x5d")][tt("0x5e")](85)),this[tt("0x232")]=$[tt("0x79")](t[tt("0x232")],20),this[tt("0x233")]=$[tt("0x79")](t[tt("0x233")],20),this[tt("0x234")]=$[tt("0x79")](t[tt("0x234")],3),this[tt("0x235")]=$[tt("0x79")](t[tt("0x235")],3),this[tt("0x236")]=$[tt("0x79")](t[tt("0x236")],new $[tt("0x83")](1,1,0,.5)),this[tt("0x86")]=$[tt("0x79")](t[tt("0x86")],new $[tt("0x83")](1,0,0)),this[tt("0x7a")]=$[tt("0x79")](t[tt("0x7a")],!0),this[tt("0x8b")]=$[tt("0x11")][tt("0x57")]($[tt("0x11")][tt("0x8c")]),this[tt("0x237")]=0,this[tt("0x238")]=0,this[tt("0x239")]=0,this[tt("0x23a")]=0,this[tt("0x23b")]=1,this[tt("0x23c")]=1,this[tt("0x23d")]=1,this[tt("0x23e")]=1,this[tt("0x166")]=new $[tt("0x4e")],this[tt("0x23f")]=void 0,this[tt("0x240")]=void 0}function i(t,e){e=e||{},n=t[tt("0x6a")][tt("0x39")][tt("0x3b")],this[tt("0x6b")]=null,this[tt("0x113")]=e[tt("0x114")],this[tt("0x115")]=e[tt("0xed")]?e[tt("0xed")]:5,this[tt("0x74")]=e[tt("0x3")],this[tt("0x76")]=e[tt("0x77")]?e[tt("0x77")]:{heading:0,pitch:0,roll:0},this[tt("0x97")]=e[tt("0x98")],this[tt("0x81")]=e[tt("0x82")]?e[tt("0x82")]:$[tt("0x83")][tt("0x84")],this[tt("0x85")]=e[tt("0x86")]?e[tt("0x86")]:this[tt("0x81")],this[tt("0x78")]=$[tt("0x79")](e[tt("0x7a")],!0),this[tt("0x7b")]=$[tt("0x79")](e[tt("0x7c")],!1),this[tt("0x116")]=$[tt("0x79")](e[tt("0x117")],!0),this[tt("0x118")]=$[tt("0x79")](e[tt("0x119")],!0),this[tt("0x8b")]=$[tt("0x11")][tt("0x57")]($[tt("0x11")][tt("0x8c")]),this[tt("0x8d")]=new $[tt("0x29")],this[tt("0x8e")]=new $[tt("0x9")],this[tt("0x8f")]=new $[tt("0x9")](1,1,1),this[tt("0x90")]=new $[tt("0x11")],this[tt("0x91")]=new $[tt("0x11")],this[tt("0x92")]=new $[tt("0x1b")],this[tt("0x93")]=null,this[tt("0x94")]=[],this[tt("0x95")]=[],this[tt("0x9c")]=t,this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0x9e")](this),this[tt("0xd5")](),this[tt("0x7d")]=$[tt("0x79")](e[tt("0x7e")],!1),this[tt("0x9f")](this[tt("0x7d")])}var n,c,d,m,g,v,y,b,C,G,_,A,P,W,w,I;function M(t,e){e=e||{},d=t[tt("0x6a")][tt("0x39")][tt("0x3b")],this[tt("0x6b")]=null,this[tt("0x6c")]=e[tt("0x6d")]?e[tt("0x6d")]:M[tt("0x6e")][tt("0x6f")],this[tt("0x70")]=e[tt("0x71")]?e[tt("0x71")]:10,this[tt("0x72")]=e[tt("0x73")]?e[tt("0x73")]:10,this[tt("0x45")]=e[tt("0x2")]?e[tt("0x2")]:1e6,this[tt("0x74")]=e[tt("0x3")],this[tt("0x75")]=e[tt("0x75")],this[tt("0x76")]=e[tt("0x77")]?e[tt("0x77")]:{heading:0,pitch:0,roll:0},this[tt("0x78")]=$[tt("0x79")](e[tt("0x7a")],!0),this[tt("0x7b")]=$[tt("0x79")](e[tt("0x7c")],!1),this[tt("0x7d")]=$[tt("0x79")](e[tt("0x7e")],!1),this[tt("0x7f")]=$[tt("0x79")](e[tt("0x80")],!1),this[tt("0x81")]=e[tt("0x82")]?e[tt("0x82")]:$[tt("0x83")][tt("0x84")],this[tt("0x85")]=e[tt("0x86")],this[tt("0x87")]=e[tt("0x88")],this[tt("0x89")]=e[tt("0x8a")],this[tt("0x8b")]=$[tt("0x11")][tt("0x57")]($[tt("0x11")][tt("0x8c")]),this[tt("0x8d")]=new $[tt("0x29")],this[tt("0x8e")]=new $[tt("0x9")],this[tt("0x8f")]=new $[tt("0x9")](1,1,1),this[tt("0x90")]=new $[tt("0x11")],this[tt("0x91")]=new $[tt("0x11")],this[tt("0x92")]=new $[tt("0x1b")],this[tt("0x93")]=null,this[tt("0x94")]=[],this[tt("0x95")]=[],this[tt("0x96")]=[],this[tt("0x97")]=e[tt("0x98")],this[tt("0x99")]=[],this[tt("0x9a")]=[],this[tt("0x9b")]={geometry:null,needsUpdate:!1,lastestFrame:null},this[tt("0x9c")]=t,this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0x9e")](this),this[tt("0x9f")](this[tt("0x7d")]||this[tt("0x7f")])}function S(t,e,i,n,a,r,o){a=a||$[tt("0xf")][tt("0x10")],r=r||[],$[tt("0x11")][tt("0x27")](e,m),$[tt("0x11")][tt("0x12")](e,$[tt("0x9")][tt("0x56")],v),v[tt("0x57")](y[tt("0x13")]);var s=0;n=Math[tt("0xa1")](t[tt("0x2")],i+n);for(var l=i;l<n;l+=3){$[tt("0x9")][tt("0xa2")](t,l,g),$[tt("0x11")][tt("0x12")](e,g,v),$[tt("0x9")][tt("0xb")](v,y[tt("0x13")],y[tt("0x14")]),$[tt("0x9")][tt("0x15")](y[tt("0x14")],y[tt("0x14")]);var c=$[tt("0x16")][tt("0x17")](y,a),h=null;(h=c?$[tt("0x18")][tt("0x19")](y,c[tt("0x1a")]):h)&&(h[tt("0x57")](v),r[s]=v[tt("0x57")](r[s]),o)&&o instanceof Float32Array&&($[tt("0x11")][tt("0x12")](m,v,v),o[i+3*s]=v.x,o[i+3*s+1]=v.y,o[i+3*s+2]=v.z),s++}return r}function Z(t){this[tt("0x2")]=t[tt("0x2")],this[tt("0x61")]=t[tt("0x61")],this[tt("0x62")]=t[tt("0x62")],this[tt("0x49")]=t[tt("0x49")]?t[tt("0x49")]:64,this[tt("0x47")]=t[tt("0x47")]}function V(t){this[tt("0x3d")]=t[tt("0x3e")],this[tt("0x3f")]=t[tt("0x40")],this[tt("0x41")]=t[tt("0x42")],this[tt("0x43")]=t[tt("0x44")],this[tt("0x45")]=t[tt("0x2")],this[tt("0x46")]=t[tt("0x47")],this[tt("0x48")]=t[tt("0x49")]?t[tt("0x49")]:8}$.Scene[tt("0x3c")]=function(t,e,i){var n=t[tt("0x30")](e);if(t[tt("0x31")]&&$[tt("0x2d")](n)&&function(t,e){if($[tt("0x2d")](t.id)){var i=t.id;if(i[tt("0x2e")])return;if(e&&i==e)return}if($[tt("0x2d")](t[tt("0x2f")])){i=t[tt("0x2f")];if(i[tt("0x2e")])return;if(e&&i==e)return}return 1}(n,i)){var a=t[tt("0x32")](e);if($[tt("0x2d")](a)){i=$[tt("0x1b")][tt("0x1c")](a)[tt("0x33")];if(0<=i)return a;if(!$[tt("0x2d")](n.id)&&-500<=i)return a}}return a=t[tt("0x34")]===$[tt("0x35")][tt("0x36")]?(n=t[tt("0x37")][tt("0x38")](e),t[tt("0x39")][tt("0x30")](n,t)):t[tt("0x37")][tt("0x3a")](e,t[tt("0x39")][tt("0x3b")])},$[tt("0x11")][tt("0x2c")]=function(t,e){var i=t,e=$[tt("0x11")][tt("0x21")]($[tt("0x22")][tt("0x23")](e,h),t,f);return i=$[tt("0x24")][tt("0x25")](i,$[tt("0xf")][tt("0x10")],new $[tt("0x11")]),i=$[tt("0x11")][tt("0x26")]($[tt("0x11")][tt("0x27")](i,new $[tt("0x11")]),e,new $[tt("0x11")]),e=$[tt("0x11")][tt("0x28")](i,new $[tt("0x22")]),i=$[tt("0x29")][tt("0x2a")](e),$[tt("0x2b")][tt("0x23")](i)},Object[tt("0x1d")]($.Scene,tt("0x1e"),{value:!0}),w=new $[tt("0x9")],new $[tt("0x18")],I=new $[tt("0x1b")],$.Scene[tt("0x1f")]=function(t){var e=t[tt("0x0")],i=t[tt("0x1")],n=e[tt("0x2")];if(i[tt("0x3")]){var a=i[tt("0x3")][tt("0x4")];if(void 0===i[tt("0x5")])i[tt("0x5")]=new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:3,values:new Float32Array(a[tt("0x2")])});else for(var r=i[tt("0x5")][tt("0x4")],o=0;o<n;o++)r[o]=0;for(var s,l,c,h=i[tt("0x5")][tt("0x4")],d=new $[tt("0x9")],u=new $[tt("0x9")],x=new $[tt("0x9")],p=new $[tt("0x9")],m=new $[tt("0x9")],o=0;o<n;o+=3)s=3*e[o+0],l=3*e[o+1],c=3*e[o+2],$[tt("0x9")][tt("0xa")](a,s,d),$[tt("0x9")][tt("0xa")](a,l,u),$[tt("0x9")][tt("0xa")](a,c,x),$[tt("0x9")][tt("0xb")](x,u,p),$[tt("0x9")][tt("0xb")](d,u,m),$[tt("0x9")][tt("0xc")](p,m,p),h[s]+=p.x,h[1+s]+=p.y,h[2+s]+=p.z,h[l]+=p.x,h[1+l]+=p.y,h[2+l]+=p.z,h[c]+=p.x,h[1+c]+=p.y,h[2+c]+=p.z;for(var g,f,v,y,b=t[tt("0x1")][tt("0x5")][tt("0x4")],C=0;C<b[tt("0x2")];C+=3)g=b[C],f=b[C+1],v=b[C+2],y=1/Math[tt("0xe")](g*g+f*f+v*v),b[C]=g*y,b[C+1]=f*y,b[C+2]=v*y;i[tt("0x5")][tt("0xd")]=!0}return t},$.Scene[tt("0x20")]=function(t,e,i,n){n=n||$[tt("0xf")][tt("0x10")],$[tt("0x11")][tt("0x12")](e,t,w),$[tt("0x9")][tt("0xb")](w,i[tt("0x13")],i[tt("0x14")]),$[tt("0x9")][tt("0x15")](i[tt("0x14")],i[tt("0x14")]);e=$[tt("0x16")][tt("0x17")](i,n),t=null;if(t=e?$[tt("0x18")][tt("0x19")](i,e[tt("0x1a")]):t)try{$[tt("0x1b")][tt("0x1c")](t,null,I)}catch(t){return null}return t},Object[tt("0x1d")]($.Scene,tt("0x1e"),{value:!0}),$.Scene[tt("0x4a")]=void 0,P=new $[tt("0x9")],W=new $[tt("0x18")],V[tt("0x4b")]=function(t){for(var e=t[tt("0x3d")],i=t[tt("0x3f")],n=t[tt("0x41")],a=t[tt("0x43")],t=(t[tt("0x46")]?-1:1)*t[tt("0x45")],r=new Float32Array(24),o=[],s=[],l=[0,t],c=[e,n],h=[i,a],d=0,u=0;u<2;u++)r[3*d]=-c[u]/2,r[3*d+1]=-h[u]/2,r[3*d+2]=l[u],s[2*d]=u,s[2*d+1]=0,r[3*++d]=-c[u]/2,r[3*d+1]=h[u]/2,r[3*d+2]=l[u],s[2*d]=u,s[2*d+1]=0,r[3*++d]=c[u]/2,r[3*d+1]=h[u]/2,r[3*d+2]=l[u],s[2*d]=u,s[2*d+1]=0,r[3*++d]=c[u]/2,r[3*d+1]=-h[u]/2,r[3*d+2]=l[u],s[2*d]=u,s[2*d+1]=0,d++;o[tt("0x4c")](0,1,3),o[tt("0x4c")](1,2,3),o[tt("0x4c")](0,4,5),o[tt("0x4c")](0,5,1),o[tt("0x4c")](1,2,6),o[tt("0x4c")](1,6,5),o[tt("0x4c")](2,3,7),o[tt("0x4c")](7,6,2),o[tt("0x4c")](0,3,7),o[tt("0x4c")](7,4,0),o[tt("0x4c")](4,5,6),o[tt("0x4c")](6,7,4);o=new Int16Array(o),s=new Float32Array(s),t={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:r}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:s})},e=$[tt("0x4e")][tt("0x4f")](r),n=new $[tt("0x50")]({attributes:t,indices:o,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:e}),r=[];return o=[],$[tt("0x53")][tt("0x54")](n)},V[tt("0x55")]=function(t,e){if(!e)return V[tt("0x4b")](cylinderGeometry);$[tt("0x11")][tt("0x12")](e,$[tt("0x9")][tt("0x56")],P),P[tt("0x57")](W[tt("0x13")]);var i=t[tt("0x48")],n=(t[tt("0x3d")],t[tt("0x3f")],t[tt("0x41")]),a=t[tt("0x43")],r=(t[tt("0x46")]?-1:1)*t[tt("0x45")],o=[],s=[],l=n/2,c=a/2,h=i,d=i,u=0;(G=[])[tt("0x4c")](0,0,0),s[tt("0x4c")](1,1),u++;for(var x=new $[tt("0x9")],p=[],m=-d;m<d;m++){for(var g=[],f=-h;f<h;f++){var v=c*m/d,y=l*f/h;x.x=y,x.y=v,x.z=r,(0,$.Scene[tt("0x20")])(x,e,W)?(G[tt("0x4c")](y,v,r),s[tt("0x4c")](1,1),g[tt("0x4c")](u),u++):(g[tt("0x4c")](-1),0)}p[tt("0x4c")](g)}for(var b,C,w=[0,p[tt("0x2")]-1],I=0;I<w[tt("0x2")];I++)for(m=w[I],f=1;f<p[m][tt("0x2")];f++)b=p[m][f-1],C=p[m][f],0<=b&&0<=C&&o[tt("0x4c")](0,b,C);for(var _=[0,p[0][tt("0x2")]-1],A=0;A<_[tt("0x2")];A++)for(f=_[A],m=1;m<p[tt("0x2")];m++)b=p[m-1][f],C=p[m][f],0<=b&&0<=C&&o[tt("0x4c")](0,b,C);var G=new Float32Array(G),o=new Int32Array(o),s=new Float32Array(s),t={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:G}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:s})},n=$[tt("0x4e")][tt("0x4f")](G),a=new $[tt("0x50")]({attributes:t,indices:o,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:n});return(0,$.Scene[tt("0x1f")])(a),G=[],o=[],a},V[tt("0x58")]=function(t){for(var e=t[tt("0x3d")],i=t[tt("0x3f")],n=t[tt("0x41")],a=t[tt("0x43")],t=(t[tt("0x46")]?-1:1)*t[tt("0x45")],r=new Float32Array(24),o=[],s=[],l=[0,t],c=[e,n],h=[i,a],d=0,u=0;u<2;u++)r[3*d]=-c[u]/2,r[3*d+1]=-h[u]/2,r[3*d+2]=l[u],s[2*d]=u,s[2*d+1]=0,r[3*++d]=-c[u]/2,r[3*d+1]=h[u]/2,r[3*d+2]=l[u],s[2*d]=u,s[2*d+1]=0,r[3*++d]=c[u]/2,r[3*d+1]=h[u]/2,r[3*d+2]=l[u],s[2*d]=u,s[2*d+1]=0,r[3*++d]=c[u]/2,r[3*d+1]=-h[u]/2,r[3*d+2]=l[u],s[2*d]=u,s[2*d+1]=0,d++;o[tt("0x4c")](0,1,1,2),o[tt("0x4c")](2,3,3,0),o[tt("0x4c")](0,4),o[tt("0x4c")](1,5),o[tt("0x4c")](2,6),o[tt("0x4c")](3,7),o[tt("0x4c")](4,5,5,6),o[tt("0x4c")](6,7,7,4);o=new Int16Array(o),s=new Float32Array(s),t={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:r}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:s})},e=$[tt("0x4e")][tt("0x4f")](r),n=new $[tt("0x50")]({attributes:t,indices:o,primitiveType:$[tt("0x51")][tt("0x59")],boundingSphere:e}),r=[];return o=[],n},V[tt("0x5a")]=function(t){t[tt("0x3d")],t[tt("0x3f")];var e=t[tt("0x41")],i=t[tt("0x43")],n=(t[tt("0x46")]?-1:1)*t[tt("0x45")],r=[],o=[],s=e/2,l=i/2,c=0;(w=[])[tt("0x4c")](0,0,0),o[tt("0x4c")](1,1),c++;for(var h=[],d=-16;d<16;d++){for(var u=[],x=-16;x<16;x++){u[tt("0x4c")](c);var p=l*d/16,m=s*x/16;w[tt("0x4c")](m,p,n),o[tt("0x4c")](1,1),c++}h[tt("0x4c")](u)}for(var g,f,v=[0,h[tt("0x2")]-1],y=0;y<v[tt("0x2")];y++)for(d=v[y],x=1;x<h[d][tt("0x2")];x++)g=h[d][x-1],f=h[d][x],r[tt("0x4c")](0,g,f);for(var b=[0,h[0][tt("0x2")]-1],C=0;C<b[tt("0x2")];C++)for(x=b[C],d=1;d<h[tt("0x2")];d++)g=h[d-1][x],f=h[d][x],r[tt("0x4c")](0,g,f);var w=new Float32Array(w),r=new Int16Array(r),o=new Float32Array(o),t={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:w}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:o})},e=$[tt("0x4e")][tt("0x4f")](w),i=new $[tt("0x50")]({attributes:t,indices:r,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:e});return(0,a[tt("0x1f")])(i),$[tt("0x53")][tt("0x5b")](i),w=[],r=[],i},V[tt("0x5c")]=function(t,e,i,n){var a={length:i,zReverse:n,bottomHeight:i,bottomWidth:i,topHeight:i,topWidth:i};return t=$[tt("0x5d")][tt("0x5e")](t),e=$[tt("0x5d")][tt("0x5e")](e),n?(a[tt("0x40")]=0,a[tt("0x3e")]=0,a[tt("0x44")]=i*Math[tt("0x5f")](t),a[tt("0x42")]=i*Math[tt("0x5f")](e)):(a[tt("0x44")]=0,a[tt("0x42")]=0,a[tt("0x40")]=i*Math[tt("0x5f")](t),a[tt("0x3e")]=i*Math[tt("0x5f")](e)),new V(a)},$.Scene[tt("0x4a")]=V,$[tt("0x60")]||(Object[tt("0x1d")]($.Scene,tt("0x1e"),{value:!0}),$.Scene[tt("0x60")]=void 0,G=new $[tt("0x63")],_=new $[tt("0x9")],A=new $[tt("0x18")],Z[tt("0x4b")]=function(t){var e=t[tt("0x2")],i=t[tt("0x61")],n=t[tt("0x62")],a=t[tt("0x49")],r=2*Math.PI/(a-1),o=[],s=[],l=[],c=[],h=[n,i],d=[0,t[tt("0x47")]?-e:e],u=0,t=Math[tt("0x64")](n-i,e),x=G;x.z=Math[tt("0x65")](t);for(var p=Math[tt("0x66")](t),m=0;m<d[tt("0x2")];m++){c[m]=[];for(var g=h[m],f=0;f<a;f++){c[m][tt("0x4c")](u++);var v=r*f,y=g*Math[tt("0x66")](v),b=g*Math[tt("0x65")](v);o[tt("0x4c")](y,b,d[m]),y=p*Math[tt("0x66")](v),b=p*Math[tt("0x65")](v),s[tt("0x4c")](y,b,x.z),l[tt("0x4c")](m/(d[tt("0x2")]-1),0)}}for(var C=[],m=1;m<d[tt("0x2")];m++)for(f=1;f<a;f++){var w=c[m-1][f-1],I=c[m][f-1],_=c[m][f],A=c[m-1][f];C[tt("0x4c")](_),C[tt("0x4c")](A),C[tt("0x4c")](w),C[tt("0x4c")](_),C[tt("0x4c")](w),C[tt("0x4c")](I),f==c[m][tt("0x2")]-1&&(w=c[m-1][f],I=c[m][f],_=c[m][0],A=c[m-1][0],C[tt("0x4c")](_),C[tt("0x4c")](A),C[tt("0x4c")](w),C[tt("0x4c")](_),C[tt("0x4c")](w),C[tt("0x4c")](I))}C=new Int16Array(C),o=new Float32Array(o),s=new Float32Array(s),l=new Float32Array(l),n={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:o}),normal:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:3,values:s}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:l})},i=$[tt("0x4e")][tt("0x4f")](o),e=new $[tt("0x50")]({attributes:n,indices:C,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:i});return o=[],C=[],l=[],e},Z[tt("0x55")]=function(t,e){if(!e)return Z[tt("0x4b")](t);$[tt("0x11")][tt("0x12")](e,$[tt("0x9")][tt("0x56")],_),_[tt("0x57")](A[tt("0x13")]);var i=t[tt("0x2")],n=t[tt("0x61")],a=(t[tt("0x62")],t[tt("0x49")]),r=2*Math.PI/(a-1),o=[],s=[],l=[],c=[],h=[0,t[tt("0x47")]?-i:i],d=0,d=0;o[tt("0x4c")](0,0,0),s[tt("0x4c")](1,1),d++;for(var u=new $[tt("0x9")],x=n/15,p=0;p<16;p++){for(var m=x*p,g=[],f=0;f<a;f++){var v=r*f,y=m*Math[tt("0x66")](v),v=m*Math[tt("0x65")](v);u.x=y,u.y=v,u.z=h[1],(0,$[tt("0x20")])(u,e,A)?(g[tt("0x4c")](d),o[tt("0x4c")](y,v,h[1]),s[tt("0x4c")](p/15,1),d++):g[tt("0x4c")](-1)}c[tt("0x4c")](g)}for(var b,C,w=[0,c[tt("0x2")]-1],I=0;I<w[tt("0x2")];I++)for(p=w[I],f=1;f<c[p][tt("0x2")];f++)b=c[p][f-1],C=c[p][f],0<=b&&0<=C&&l[tt("0x4c")](0,b,C);o=new Float32Array(o),l=new Int32Array(l),s=new Float32Array(s),t={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:o}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:s})},i=$[tt("0x4e")][tt("0x4f")](o),n=new $[tt("0x50")]({attributes:t,indices:l,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:i});return(0,$.Scene[tt("0x1f")])(n),o=[],l=[],n},Z[tt("0x58")]=function(t){var e=t[tt("0x2")],i=t[tt("0x61")],n=t[tt("0x62")],a=t[tt("0x49")],r=2*Math.PI/(a-1),o=[],s=[],l=[],c=[],h=[n,i],d=[0,t[tt("0x47")]?-e:e],u=0,t=Math[tt("0x64")](n-i,e),x=G;x.z=Math[tt("0x65")](t);for(var p=Math[tt("0x66")](t),m=0;m<d[tt("0x2")];m++){c[m]=[];for(var g=h[m],f=0;f<a;f++){c[m][tt("0x4c")](u++);var v=r*f,y=g*Math[tt("0x66")](v),b=g*Math[tt("0x65")](v);o[tt("0x4c")](y,b,d[m]),y=p*Math[tt("0x66")](v),b=p*Math[tt("0x65")](v),s[tt("0x4c")](y,b,x.z),l[tt("0x4c")](m/(d[tt("0x2")]-1),0)}}for(var C=[],m=1;m<d[tt("0x2")];m++)for(f=1;f<a;f+=1){var w=c[m-1][f-1],I=c[m][f-1];c[m][f],c[m-1][f],f%8==1&&C[tt("0x4c")](w,I)}C=new Int16Array(C),o=new Float32Array(o),s=new Float32Array(s),l=new Float32Array(l),n={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:o}),normal:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:3,values:s}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:l})},i=$[tt("0x4e")][tt("0x4f")](o),e=new $[tt("0x50")]({attributes:n,indices:C,primitiveType:$[tt("0x51")][tt("0x59")],boundingSphere:i});return o=[],C=[],l=[],e},Z[tt("0x67")]=function(t,e,i){return t=$[tt("0x5d")][tt("0x5e")](t),new Z({topRadius:Math[tt("0x5f")](t)*e/2,bottomRadius:0,length:e,zReverse:i})},$.Scene[tt("0x60")]=Z),typeof T===tt("0x68")||$[tt("0x69")]||($.Scene[tt("0x69")]=void 0,m=new $[tt("0x11")],g=new $[tt("0x9")],v=new $[tt("0x9")],y=new $[tt("0x18")],b=new $[tt("0x1b")],M[tt("0x6e")]={Cone:1,FourPrism:2},Object[tt("0xa3")](M[tt("0xa4")],{color:{get:function(){return this[tt("0x81")]},set:function(t){this[tt("0x81")]=t}},lineColor:{get:function(){return this[tt("0x85")]},set:function(t){this[tt("0x85")]=t}},trackedEntity:{get:function(){return this[tt("0x97")]},set:function(t){t!=this[tt("0x97")]&&(this[tt("0x3")]=t[tt("0x3")]),this[tt("0x97")]=t}},show:{get:function(){return this[tt("0x78")]},set:function(t){this[tt("0x78")]=t}},outline:{get:function(){return this[tt("0x7b")]},set:function(t){this[tt("0x7b")]=t}},angle1:{get:function(){return this[tt("0x70")]},set:function(t){this[tt("0x70")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},angle2:{get:function(){return this[tt("0x72")]},set:function(t){this[tt("0x72")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},areaType:{get:function(){return this[tt("0x6c")]},set:function(t){this[tt("0x6c")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},rotation:{get:function(){return this[tt("0x76")]},set:function(t){this[tt("0x76")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},heading:{get:function(){return this[tt("0x76")][tt("0xa6")]},set:function(t){this[tt("0x76")][tt("0xa6")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},pitch:{get:function(){return this[tt("0x76")][tt("0xa7")]},set:function(t){this[tt("0x76")][tt("0xa7")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},roll:{get:function(){return this[tt("0x76")][tt("0xa8")]},set:function(t){this[tt("0x76")][tt("0xa8")]=t,this[tt("0xa5")](),this[tt("0x6b")]=null}},position:{get:function(){return this[tt("0x74")]},set:function(t){this[tt("0x74")]=t,this[tt("0x6b")]=null,this[tt("0x94")]=[]}}}),M[tt("0xa4")][tt("0x9f")]=function(t){var e,i;t&&!this[tt("0xa9")]&&(e=this,i=new $[tt("0xaa")],this[tt("0xa9")]=this[tt("0x9c")][tt("0xab")][tt("0x9e")]({polygon:{show:this[tt("0x7d")],material:this[tt("0x87")]||this[tt("0x81")],hierarchy:new $[tt("0xac")](function(t){return i[tt("0xad")]=e[tt("0x96")],i},!1)},polyline:{show:this[tt("0x7f")],material:this[tt("0x89")]||this[tt("0x87")]||this[tt("0x81")],width:1.5,positions:new $[tt("0xac")](function(t){return e[tt("0x96")]},!1)}}))},M[tt("0xa4")][tt("0xa5")]=function(){this[tt("0x94")][tt("0xae")](function(t){t[tt("0xaf")][tt("0xb0")]()}),this[tt("0x94")]=[]},M[tt("0xa4")][tt("0xb1")]=function(t,e){if(!t||!t[tt("0x2")])throw new Error(tt("0xb2"));for(var i=[],n=!1,a=!1,r=t[0][tt("0xb3")],o=0;o<t[tt("0x2")];o++){if(i[o]=function(t){var e,i=[];for(e in t[tt("0x1")])t[tt("0x1")][tt("0xa0")](e)&&t[tt("0x1")][e]&&i[tt("0x4c")](e);return i}(t[o]),0<o){if(r!=t[o][tt("0xb3")]){a=!0;break}var s=i[o-1];if(!(n=s[tt("0x2")]!=i[o][tt("0x2")]))for(var l=0;l<s[tt("0x2")];l++)if(s[l]!=i[o][l]){n=!0;break}}if(r=t[o][tt("0xb3")],n||a)break}if(a)throw new Error(tt("0xb4"));if(n)throw new Error(tt("0xb5"));for(var c={},h=i[0],o=0;o<h[tt("0x2")];o++){var d,u=h[o],x=t[0];for(d in c[u]={},x[tt("0x1")][u])x[tt("0x1")][u][tt("0xa0")](d)&&(c[u][d]=x[tt("0x1")][u][d]);for(var p=Array[tt("0xb6")](c[u][tt("0x4")]),l=1;l<t[tt("0x2")];l++)for(var x=t[l],m=0;m<x[tt("0x1")][u][tt("0x4")][tt("0x2")];m++)p[tt("0x4c")](x[tt("0x1")][u][tt("0x4")][m]);c[u][tt("0x4")]=new c[u][tt("0x4")][tt("0xb7")](p)}var g=[],f=0;for(l=0;l<t[tt("0x2")];l++){for(x=t[0],o=0;o<x[tt("0x0")][tt("0x2")];o++)g[tt("0x4c")](x[tt("0x0")][o]+f);f+=x[tt("0x1")][tt("0x3")][tt("0x4")][tt("0x2")]/3}var v=$[tt("0x4e")][tt("0x4f")](c[tt("0x3")][tt("0x4")]);return new $[tt("0x50")]({attributes:c,indices:new Int32Array(g),primitiveType:t[0][tt("0xb3")],boundingSphere:v})},M[tt("0xa4")][tt("0xb8")]=function(t){if(this[tt("0x9b")][tt("0xb9")]){var e=this[tt("0x9b")][tt("0xb9")][tt("0x2")]!=this[tt("0x95")][tt("0x2")];if(!e)for(var i=0;i<this[tt("0x9b")][tt("0xb9")][tt("0x2")];i++)if(!this[tt("0x9b")][tt("0xb9")][i][tt("0xba")](this[tt("0x95")][i])){e=!0;break}if(!e)return}if(this[tt("0x9b")][tt("0xb9")]&&this[tt("0x9b")][tt("0xb9")][tt("0x2")]==this[tt("0x95")][tt("0x2")])for(i=0;i<this[tt("0x95")][tt("0x2")];i++)this[tt("0x95")][i][tt("0x57")](this[tt("0x9b")][tt("0xb9")][i]);else for(this[tt("0x9b")][tt("0xb9")]=[],i=0;i<this[tt("0x95")][tt("0x2")];i++)this[tt("0x9b")][tt("0xb9")][tt("0x4c")](this[tt("0x95")][i][tt("0x57")]());t=this[tt("0xbb")](t);if(this[tt("0x9a")][tt("0x4c")](t),this[tt("0x9b")][tt("0xbc")]){var n=this[tt("0x9b")][tt("0xbc")][tt("0x1")];for(i in n)n[tt("0xa0")](i)&&delete n[i];for(i in this[tt("0x9b")][tt("0xbc")])this[tt("0x9b")][tt("0xbc")][tt("0xa0")](i)&&delete this[tt("0x9b")][tt("0xbc")][i]}this[tt("0x9b")][tt("0xbc")]=this[tt("0xb1")](this[tt("0x9a")]),this[tt("0x9b")][tt("0xd")]=!0},C=new $[tt("0x29")],M[tt("0xa4")][tt("0xbd")]=function(t,e){return this[tt("0x93")]||(this[tt("0x93")]=new $[tt("0x9")]),this[tt("0x3")]instanceof $[tt("0x9")]?this[tt("0x93")]=this[tt("0x3")]:tt("0xbe")==typeof this[tt("0x3")][tt("0xbf")]?this[tt("0x93")]=this[tt("0x3")][tt("0xbf")](t):this[tt("0x3")][tt("0xc0")]&&this[tt("0x3")][tt("0xc0")]instanceof $[tt("0x9")]&&(this[tt("0x93")]=this[tt("0x3")][tt("0xc0")]),this[tt("0x93")]&&(this[tt("0x8b")]=$[tt("0x24")][tt("0x25")](this[tt("0x93")],d,this[tt("0x8b")]),this[tt("0x92")]=$[tt("0x1b")][tt("0x1c")](this[tt("0x93")],d,this[tt("0x92")]),$[tt("0x24")][tt("0x25")](this[tt("0x93")],d,this[tt("0x8b")]),this[tt("0x75")]&&this[tt("0x97")]&&this[tt("0x97")][tt("0xc1")]&&(t=$[tt("0xc2")][tt("0xc3")](this[tt("0x97")][tt("0xc1")],t,C),t=$[tt("0x11")][tt("0x2c")](this[tt("0x93")],t),this[tt("0x76")][tt("0xa6")]=t[tt("0xa6")]),$[tt("0x29")][tt("0xc4")](this[tt("0x76")],this[tt("0x8d")]),this[tt("0x90")]=$[tt("0x11")][tt("0xc5")](this[tt("0x8e")],this[tt("0x8d")],this[tt("0x8f")],this[tt("0x90")]),$[tt("0x11")][tt("0xc6")](this[tt("0x8b")],this[tt("0x90")],this[tt("0x90")]),$[tt("0x11")][tt("0xc7")](this[tt("0x90")],this[tt("0x91")])),this[tt("0x90")]},M[tt("0xa4")][tt("0xc8")]=function(t,e){var i=this[tt("0x95")];if(e){if(this[tt("0xbd")](e),!this[tt("0x93")])return;i=S(this[tt("0xc9")],this[tt("0x90")],3,this[tt("0xc9")][tt("0x2")]-3,d,null,this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")])}for(var n=[],a=0;a<i[tt("0x2")];a++){var r=i[a],r=($[tt("0x1b")][tt("0x1c")](r,void 0,b),[$[tt("0x5d")][tt("0xca")](b[tt("0xcb")]),$[tt("0x5d")][tt("0xca")](b[tt("0xcc")])]);t&&(r[0]=parseFloat(r[0][tt("0xcd")](t)),r[1]=parseFloat(r[1][tt("0xcd")](t))),n[tt("0x4c")](T[tt("0xce")](r))}var o,e=[];return e=0<n[tt("0x2")]&&(n=T[tt("0xcf")](n),o=T[tt("0xd0")](n))&&(o=T[tt("0xd1")](o))&&0<o[tt("0x2")]?o[0]:e},M[tt("0xa4")][tt("0xbb")]=function(t){for(var e=[],i=[],n=0,a=0;a<this[tt("0x95")][tt("0x2")];a+=2){var r=this[tt("0x95")][0];e[tt("0x4c")](r.x,r.y,r.z),i[tt("0x4c")](n++)}return e=new Float32Array(e),i=new Int32Array(i),new $[tt("0x50")]({attributes:{position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:e})},primitiveType:$[tt("0x51")][tt("0x59")],indices:i,boundingSphere:$[tt("0x4e")][tt("0x4f")](e)})},M[tt("0xa4")][tt("0xd2")]=function(){this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0xd2")](this),this[tt("0xa9")]&&this[tt("0x9c")][tt("0xab")][tt("0xd2")](this[tt("0xa9")])},M[tt("0xa4")][tt("0xb0")]=function(t){if(t){for(var e in this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0xd2")](this),this[tt("0xa9")]&&this[tt("0x9c")][tt("0xab")][tt("0xd2")](this[tt("0xa9")]),this[tt("0x94")][tt("0xae")](function(t){t[tt("0xaf")]=t[tt("0xaf")]&&t[tt("0xaf")][tt("0xb0")]()}),this[tt("0x94")]=[],this[tt("0xd3")][tt("0x1")])this[tt("0xd3")][tt("0x1")][tt("0xa0")](e)&&delete this[tt("0xd3")][tt("0x1")][e];for(var e in this[tt("0x6b")][tt("0x1")])this[tt("0x6b")][tt("0x1")][tt("0xa0")](e)&&delete this[tt("0x6b")][tt("0x1")][e];delete this[tt("0xd3")],delete this[tt("0x6b")],delete this[tt("0x93")],delete this[tt("0x74")],this[tt("0x95")]=[]}},M[tt("0xa4")][tt("0xd4")]=function(){this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0x9e")](this),this[tt("0xa9")]&&this[tt("0x9c")][tt("0xab")][tt("0x9e")](this[tt("0xa9")])},M[tt("0xa4")][tt("0xd5")]=function(){this[tt("0x6c")]==M[tt("0x6e")][tt("0xd6")]?(this[tt("0x6b")]=$[tt("0xd7")][tt("0x55")]($[tt("0xd7")][tt("0x67")](this[tt("0x70")],this[tt("0x45")],!0),this[tt("0x90")]),this[tt("0xd3")]=$[tt("0xd7")][tt("0x58")]($[tt("0xd7")][tt("0x67")](this[tt("0x70")],this[tt("0x45")],!0))):(this[tt("0x6b")]=$.Scene[tt("0x4a")][tt("0x55")]($.Scene[tt("0x4a")][tt("0x5c")](this[tt("0x70")],this[tt("0x72")],this[tt("0x45")],!0),this[tt("0x90")]),this[tt("0xd3")]=$.Scene[tt("0x4a")][tt("0x58")]($.Scene[tt("0x4a")][tt("0x5c")](this[tt("0x70")],this[tt("0x72")],this[tt("0x45")],!0))),this[tt("0xc9")]=new Float32Array(this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")][tt("0x2")]);for(var t=0;t<this[tt("0xc9")][tt("0x2")];t++)this[tt("0xc9")][t]=this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")][t];this[tt("0x95")]=[]},M[tt("0xa4")][tt("0xd8")]=function(){var t=1+this[tt("0x96")][tt("0x2")],e=new Float32Array(3+3*this[tt("0x96")][tt("0x2")]),i=0;e[i++]=this[tt("0x93")].x,e[i++]=this[tt("0x93")].y,e[i++]=this[tt("0x93")].z;for(var n=0;n<this[tt("0x96")][tt("0x2")];n++)e[i++]=this[tt("0x96")][n].x,e[i++]=this[tt("0x96")][n].y,e[i++]=this[tt("0x96")][n].z;for(var a=[],r=[],n=1;n<t-1;n++)a[tt("0x4c")](0,n,n+1),r[tt("0x4c")](0,n);var a=new(65535<=t?Uint32Array:Uint16Array)(a),o={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:e})},s=$[tt("0x4e")][tt("0x4f")](e),l=new $[tt("0x50")]({attributes:o,indices:a,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:s}),o=new $[tt("0x50")]({attributes:o,indices:new Uint32Array(r),primitiveType:$[tt("0x51")][tt("0x59")],boundingSphere:s});(0,$.Scene[tt("0x1f")])(l),this[tt("0xd9")]=l,this[tt("0xda")]=o},M[tt("0xa4")][tt("0xdb")]=function(t){if(this[tt("0x78")]&&(this[tt("0xbd")](t[tt("0xdc")]),this[tt("0x93")])){this[tt("0x6b")]||this[tt("0xd5")](),this[tt("0x95")]=S(this[tt("0xc9")],this[tt("0x90")],3,this[tt("0xc9")][tt("0x2")]-3,d,this[tt("0x95")],this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")]),this[tt("0x96")][tt("0xdd")](0,this[tt("0x96")][tt("0x2")]);var e=this[tt("0xc8")]();if(e&&e[tt("0x2")]){for(var i=0;i<e[tt("0x2")];i++){var n=e[i];this[tt("0x96")][tt("0x4c")]($[tt("0x9")][tt("0xde")](n[0],n[1]))}t[tt("0x34")]===$[tt("0x35")][tt("0x36")]?(this[tt("0xd8")](),this[tt("0xd9")]&&(this[tt("0xdf")]&&(this[tt("0xdf")][tt("0xaf")]=this[tt("0xdf")][tt("0xaf")]&&this[tt("0xdf")][tt("0xaf")][tt("0xb0")](),this[tt("0xdf")]=null),this[tt("0xdf")]=this[tt("0xe0")](this[tt("0xd9")],t,$[tt("0x11")][tt("0x8c")][tt("0x57")]()),t[tt("0xe1")][tt("0x4c")](this[tt("0xdf")]),this[tt("0x7b")])&&(this[tt("0xe2")]&&(this[tt("0xe2")][tt("0xaf")]=this[tt("0xe2")][tt("0xaf")]&&this[tt("0xe2")][tt("0xaf")][tt("0xb0")](),this[tt("0xe2")]=null),this[tt("0xe2")]=this[tt("0xe0")](this[tt("0xda")],t,$[tt("0x11")][tt("0x8c")][tt("0x57")]()),t[tt("0xe1")][tt("0x4c")](this[tt("0xe2")])),this[tt("0xa9")]&&(this[tt("0xa9")][tt("0xe3")][tt("0x7a")]=this[tt("0x7d")]&&this[tt("0x78")],this[tt("0xa9")][tt("0xe4")][tt("0x7a")]=this[tt("0x7f")]&&this[tt("0x78")])):(this[tt("0xa9")]||this[tt("0x9f")](!0),this[tt("0xa9")][tt("0xe3")][tt("0x7a")]=!0)}else this[tt("0x7b")]&&(this[tt("0xd3")][tt("0xe5")]||(this[tt("0xd3")][tt("0xe5")]=this[tt("0xe0")](this[tt("0xd3")],t)),t[tt("0xe1")][tt("0x4c")](this[tt("0xd3")][tt("0xe5")])),this[tt("0xa9")]&&(this[tt("0xa9")][tt("0xe3")][tt("0x7a")]=!1,this[tt("0xa9")][tt("0xe4")][tt("0x7a")]=!1)}},M[tt("0xa4")][tt("0xe6")]=function(t){return tt("0xe7")},M[tt("0xa4")][tt("0xe8")]=function(t){return tt("0xe9")},M[tt("0xa4")][tt("0xe0")]=function(t,e,i){var n=e[tt("0xea")],a=new $[tt("0x9")],a=($[tt("0x11")][tt("0x12")](this[tt("0x90")],t[tt("0xeb")][tt("0xec")],a),new $[tt("0x4e")](a,t[tt("0xeb")][tt("0xed")]),new $[tt("0xee")]({modelMatrix:i||this[tt("0x90")],owner:this,primitiveType:t[tt("0xb3")],pass:$[tt("0xef")][tt("0xf0")]})),r=this,i=$[tt("0x53")][tt("0xf1")](t);return a[tt("0xaf")]=$[tt("0xf2")][tt("0xf3")]({context:n,geometry:t,attributeLocations:i,bufferUsage:$[tt("0xf4")][tt("0xf5")]}),a[tt("0xaf")][tt("0xf6")]=i,a[tt("0xf7")]=$[tt("0xf8")][tt("0xf9")]({context:n,vertexShaderSource:this[tt("0xe8")](t),fragmentShaderSource:this[tt("0xe6")](t),attributeLocations:i}),a[tt("0xfa")]=$[tt("0xfb")][tt("0xfc")]({blending:$[tt("0xfd")][tt("0xfe")],depthTest:{enabled:!0,func:$[tt("0xff")][tt("0x100")]},cull:{enabled:!1,face:$[tt("0x101")][tt("0x102")]},depthMask:!1}),a[tt("0x103")]={},a[tt("0x103")][tt("0x104")]=function(){return e[tt("0xea")][tt("0x105")][tt("0x106")]},a[tt("0x103")][tt("0x107")]=function(){return e[tt("0xea")][tt("0x105")][tt("0x108")]},a[tt("0x103")][tt("0x109")]=function(){return r[tt("0x109")]||(r[tt("0x109")]=0),r[tt("0x109")]},a[tt("0x103")][tt("0x10a")]=function(){return r[tt("0x10a")]||(r[tt("0x10a")]=new $[tt("0x9")](.2,.2,.2)),r[tt("0x10a")]},a[tt("0x103")][tt("0x10b")]=function(){return r[tt("0x10b")]||(r[tt("0x10b")]=0),r[tt("0x10b")]},a[tt("0x103")][tt("0x10c")]=function(){return t[tt("0xb3")]==$[tt("0x51")][tt("0x59")]},a[tt("0x103")][tt("0x81")]=function(){return t[tt("0x82")]?t[tt("0x82")]:t[tt("0xb3")]==$[tt("0x51")][tt("0x59")]?r[tt("0x85")]||r[tt("0x81")]||new $[tt("0x83")](1,1,0,.5):r[tt("0x81")]||new $[tt("0x83")](1,0,0,1)},a[tt("0x103")][tt("0x10d")]=function(){return r[tt("0x10d")]||(r[tt("0x10d")]=0),r[tt("0x10d")]},a[tt("0x103")][tt("0x10e")]=function(){return r[tt("0x10e")]||(r[tt("0x10e")]=new $[tt("0x83")](1,1,0,1)),r[tt("0x10e")]},a[tt("0x103")][tt("0x10f")]=function(){return e[tt("0xea")][tt("0x105")][tt("0x5")]},a[tt("0x103")][tt("0x110")]=function(){return.25},a},$.Scene[tt("0x111")]=S,$.Scene[tt("0x69")]=M),$[tt("0x112")]||($.Scene[tt("0x112")]=void 0,Object[tt("0xa3")](i[tt("0xa4")],{trackedEntity:{get:function(){return this[tt("0x97")]},set:function(t){this[tt("0x97")]=t}},color:{get:function(){return this[tt("0x81")]},set:function(t){this[tt("0x81")]=t}},lineColor:{get:function(){return this[tt("0x85")]},set:function(t){this[tt("0x85")]=t}},show:{get:function(){return this[tt("0x78")]},set:function(t){this[tt("0x78")]=t}},outline:{get:function(){return this[tt("0x7b")]},set:function(t){this[tt("0x7b")]=t,this[tt("0xd5")]()}},top:{get:function(){return this[tt("0x116")]},set:function(t){this[tt("0x116")]=t,this[tt("0xd5")]()}},topOutline:{get:function(){return this[tt("0x118")]},set:function(t){this[tt("0x118")]=t,this[tt("0xd5")]()}},groundArea:{get:function(){return this[tt("0x7d")]},set:function(t){this[tt("0x7d")]=t,this[tt("0x9f")](this[tt("0x7d")])}},angle:{get:function(){return this[tt("0x113")]},set:function(t){this[tt("0x113")]=t,this[tt("0x11a")](),this[tt("0xd5")]()}},radius:{get:function(){return this[tt("0x115")]},set:function(t){this[tt("0x115")]=t,this[tt("0x11a")](),this[tt("0xd5")]()}},heading:{get:function(){return this[tt("0x76")][tt("0xa6")]},set:function(t){this[tt("0x76")][tt("0xa6")]=t}},pitch:{get:function(){return this[tt("0x76")][tt("0xa7")]},set:function(t){this[tt("0x76")][tt("0xa7")]=t}},roll:{get:function(){return this[tt("0x76")][tt("0xa8")]},set:function(t){this[tt("0x76")][tt("0xa8")]=t}},position:{get:function(){return this[tt("0x74")]},set:function(t){this[tt("0x74")]=t}}}),i[tt("0xa4")][tt("0x11a")]=function(){this[tt("0x11b")]=this[tt("0x115")]*Math[tt("0x66")]($[tt("0x5d")][tt("0x5e")](this[tt("0x113")]))},i[tt("0xa4")][tt("0x9f")]=function(t){var e;t&&!this[tt("0xa9")]&&((e=this)[tt("0x11a")](),this[tt("0xa9")]=viewer[tt("0xab")][tt("0x9e")]({position:this[tt("0x74")],ellipse:{show:0===this[tt("0x76")][tt("0xa7")]&&0===this[tt("0x76")][tt("0xa8")],semiMinorAxis:new $[tt("0xac")](function(t){return e[tt("0x11b")]},!1),semiMajorAxis:new $[tt("0xac")](function(t){return e[tt("0x11b")]},!1),material:this[tt("0x81")]},polyline:{show:this[tt("0x11c")]&&(0!==this[tt("0x76")][tt("0xa7")]||0!==this[tt("0x76")][tt("0xa8")]),positions:new $[tt("0xac")](function(t){return!e[tt("0x11c")]||$[tt("0x9")][tt("0x11d")](e[tt("0x74")],e[tt("0x11c")])>e[tt("0x115")]?[]:[e[tt("0x74")],e[tt("0x11c")]]},!1),followSurface:!1,material:new $[tt("0x11e")]({color:$[tt("0x83")][tt("0x11f")]}),width:1}}))},c=new $[tt("0x9")],i[tt("0xa4")][tt("0xbd")]=function(t,e){var i;return this[tt("0x93")]||(this[tt("0x93")]=new $[tt("0x9")]),this[tt("0x3")]instanceof $[tt("0x9")]?this[tt("0x93")]=this[tt("0x3")]:tt("0xbe")==typeof this[tt("0x3")][tt("0xbf")]?this[tt("0x93")]=this[tt("0x3")][tt("0xbf")](t):this[tt("0x3")][tt("0xc0")]&&this[tt("0x3")][tt("0xc0")]instanceof $[tt("0x9")]&&(this[tt("0x93")]=this[tt("0x3")][tt("0xc0")]),this[tt("0x97")]&&this[tt("0x97")][tt("0x3")]&&(i=this[tt("0x93")],t=$[tt("0xc2")][tt("0xc3")](this[tt("0x97")][tt("0x3")],t,c))&&(this[tt("0x11c")]=t,i=mars3d[tt("0x120")][tt("0x121")](i,t,n),this[tt("0x76")][tt("0xa6")]=i[tt("0xa6")],this[tt("0x76")][tt("0xa7")]=i[tt("0xa7")],this[tt("0x76")][tt("0xa8")]=i[tt("0xa8")]),this[tt("0x8b")]=$[tt("0x24")][tt("0x25")](this[tt("0x93")],n,this[tt("0x8b")]),this[tt("0x92")]=$[tt("0x1b")][tt("0x1c")](this[tt("0x93")],n,this[tt("0x92")]),$[tt("0x24")][tt("0x25")](this[tt("0x93")],n,this[tt("0x8b")]),$[tt("0x29")][tt("0xc4")](this[tt("0x76")],this[tt("0x8d")]),this[tt("0x90")]=$[tt("0x11")][tt("0xc5")](this[tt("0x8e")],this[tt("0x8d")],this[tt("0x8f")],this[tt("0x90")]),$[tt("0x11")][tt("0xc6")](this[tt("0x8b")],this[tt("0x90")],this[tt("0x90")]),$[tt("0x11")][tt("0xc7")](this[tt("0x90")],this[tt("0x91")]),this[tt("0x90")]},i[tt("0xa4")][tt("0x122")]=function(){for(var t=this[tt("0xed")],e=[],i=[],n=[],a=[],r=90-parseInt(this[tt("0x114")]),o=r<1?r/8:1,s=2*Math.PI/127,l=0,c=this[tt("0x114")];c<91;c+=o){for(var h=$[tt("0x5d")][tt("0x5e")](c<90?c:90),h=Math[tt("0x66")](h)*t,d=[],u=0;u<128;u++){var x=s*u,p=h*Math[tt("0x66")](x),x=h*Math[tt("0x65")](x),m=Math[tt("0xe")](t*t-p*p-x*x);e[tt("0x4c")](p,x,m),i[tt("0x4c")](1,1),d[tt("0x4c")](l++)}a[tt("0x4c")](d)}for(c=1;c<a[tt("0x2")];c++)for(u=1;u<a[c][tt("0x2")];u++){var g=a[c-1][u-1],f=a[c][u-1],v=a[c][u],y=a[c-1][u];n[tt("0x4c")](g,f,v),n[tt("0x4c")](g,v,y)}var e=new Float32Array(e),n=new Int32Array(n),i=new Float32Array(i),r={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:e}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:i})},b=$[tt("0x4e")][tt("0x4f")](e),r=new $[tt("0x50")]({attributes:r,indices:n,primitiveType:$[tt("0x51")][tt("0x52")],boundingSphere:b});return(0,$.Scene[tt("0x1f")])(r),r},i[tt("0xa4")][tt("0x123")]=function(){for(var t=this[tt("0xed")],e=[],i=[],n=[],a=[],r=90-parseInt(this[tt("0x114")]),o=r<1?r/8:1,s=2*Math.PI/127,l=0,c=this[tt("0x114")];c<91;c+=o){for(var h=$[tt("0x5d")][tt("0x5e")](c<90?c:90),h=Math[tt("0x66")](h)*t,d=[],u=0;u<128;u++){var x=s*u,p=h*Math[tt("0x66")](x),x=h*Math[tt("0x65")](x),m=Math[tt("0xe")](t*t-p*p-x*x);e[tt("0x4c")](p,x,m),i[tt("0x4c")](1,1),d[tt("0x4c")](l++)}a[tt("0x4c")](d)}for(c=1;c<a[tt("0x2")];c++)for(u=1;u<a[c][tt("0x2")];u++){var g=a[c-1][u-1],f=a[c][u-1],v=a[c][u];a[c-1][u],u%8==1&&n[tt("0x4c")](g,f),c%8==1&&n[tt("0x4c")](f,v)}var e=new Float32Array(e),n=new Int32Array(n),i=new Float32Array(i),r={position:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x4d")],componentsPerAttribute:3,values:e}),st:new $[tt("0x6")]({componentDatatype:$[tt("0x7")][tt("0x8")],componentsPerAttribute:2,values:i})},y=$[tt("0x4e")][tt("0x4f")](e),r=new $[tt("0x50")]({attributes:r,indices:n,primitiveType:$[tt("0x51")][tt("0x59")],boundingSphere:y});return(0,$.Scene[tt("0x1f")])(r),r},i[tt("0xa4")][tt("0xd5")]=function(){this[tt("0x6b")]=$.Scene[tt("0x60")][tt("0x55")](new $.Scene[tt("0x60")]({topRadius:this[tt("0x115")]*Math[tt("0x66")]($[tt("0x5d")][tt("0x5e")](this[tt("0x114")])),bottomRadius:0,length:this[tt("0x115")]*Math[tt("0x65")]($[tt("0x5d")][tt("0x5e")](this[tt("0x114")]))})),this[tt("0x124")]=this[tt("0x122")](),this[tt("0x125")]=this[tt("0x123")](),this[tt("0xd3")]=$.Scene[tt("0x60")][tt("0x58")](new $.Scene[tt("0x60")]({topRadius:this[tt("0x115")]*Math[tt("0x66")]($[tt("0x5d")][tt("0x5e")](this[tt("0x114")])),bottomRadius:0,slices:128,length:this[tt("0x115")]*Math[tt("0x65")]($[tt("0x5d")][tt("0x5e")](this[tt("0x114")]))})),this[tt("0xc9")]=new Float32Array(this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")][tt("0x2")]);for(var t=0;t<this[tt("0xc9")][tt("0x2")];t++)this[tt("0xc9")][t]=this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")][t];this[tt("0x94")]&&this[tt("0x94")][tt("0x2")]&&(this[tt("0x94")][tt("0xae")](function(t){t[tt("0xaf")]=t[tt("0xaf")]&&t[tt("0xaf")][tt("0xb0")]()}),this[tt("0x94")][tt("0xdd")](0,this[tt("0x94")][tt("0x2")]))},i[tt("0xa4")][tt("0xdb")]=function(e){this[tt("0x78")]&&(this[tt("0xbd")](e[tt("0xdc")]),e[tt("0x34")]===$[tt("0x35")][tt("0x36")]?(this[tt("0x6b")][tt("0xeb")]=$[tt("0x4e")][tt("0x4f")](this[tt("0x6b")][tt("0x1")][tt("0x3")][tt("0x4")]),this[tt("0x94")]&&this[tt("0x94")][tt("0x2")]||(this[tt("0x94")][tt("0x4c")](this[tt("0xe0")](this[tt("0x6b")],e)),this[tt("0x7b")]&&this[tt("0x94")][tt("0x4c")](this[tt("0xe0")](this[tt("0xd3")],e)),this[tt("0x116")]&&(this[tt("0x94")][tt("0x4c")](this[tt("0xe0")](this[tt("0x124")],e)),this[tt("0x118")])&&this[tt("0x94")][tt("0x4c")](this[tt("0xe0")](this[tt("0x125")],e))),this[tt("0x94")][tt("0xae")](function(t){e[tt("0xe1")][tt("0x4c")](t)}),this[tt("0xa9")]&&(this[tt("0xa9")][tt("0x126")][tt("0x7a")]=this[tt("0x7d")]&&0===this[tt("0x76")][tt("0xa7")]&&0===this[tt("0x76")][tt("0xa8")],this[tt("0xa9")][tt("0xe4")][tt("0x7a")]=!1)):(this[tt("0xa9")]||this[tt("0x9f")](!0),this[tt("0xa9")][tt("0x126")][tt("0x7a")]=0===this[tt("0x76")][tt("0xa7")]&&0===this[tt("0x76")][tt("0xa8")],this[tt("0xa9")][tt("0xe4")][tt("0x7a")]=this[tt("0x11c")]&&(0!==this[tt("0x76")][tt("0xa7")]||0!==this[tt("0x76")][tt("0xa8")])))},i[tt("0xa4")][tt("0xe6")]=function(t){return tt("0x127")},i[tt("0xa4")][tt("0xe8")]=function(t){return tt("0x128")},i[tt("0xa4")][tt("0xe0")]=function(t,e,i){var n=e[tt("0xea")],a=new $[tt("0x9")],a=($[tt("0x11")][tt("0x12")](this[tt("0x90")],t[tt("0xeb")][tt("0xec")],a),new $[tt("0x4e")](a,t[tt("0xeb")][tt("0xed")])),i=new $[tt("0xee")]({modelMatrix:i||this[tt("0x90")],owner:this,primitiveType:t[tt("0xb3")],pass:$[tt("0xef")][tt("0x129")],boundingVolume:a}),r=this,a=$[tt("0x53")][tt("0xf1")](t);return i[tt("0xaf")]=$[tt("0xf2")][tt("0xf3")]({context:n,geometry:t,attributeLocations:a,bufferUsage:$[tt("0xf4")][tt("0xf5")]}),i[tt("0xaf")][tt("0xf6")]=a,i[tt("0xf7")]=$[tt("0xf8")][tt("0xf9")]({context:n,vertexShaderSource:this[tt("0xe8")](t),fragmentShaderSource:this[tt("0xe6")](t),attributeLocations:a}),i[tt("0xfa")]=$[tt("0xfb")][tt("0xfc")]({blending:$[tt("0xfd")][tt("0xfe")],depthTest:{enabled:!0,func:$[tt("0xff")][tt("0x100")]},cull:{enabled:!1,face:$[tt("0x101")][tt("0x102")]}}),i[tt("0x103")]={},i[tt("0x103")][tt("0x104")]=function(){return e[tt("0xea")][tt("0x105")][tt("0x106")]},i[tt("0x103")][tt("0x107")]=function(){return e[tt("0xea")][tt("0x105")][tt("0x108")]},i[tt("0x103")][tt("0x109")]=function(){return r[tt("0x109")]||(r[tt("0x109")]=0),r[tt("0x109")]},i[tt("0x103")][tt("0x10a")]=function(){return r[tt("0x10a")]||(r[tt("0x10a")]=new $[tt("0x9")](.2,.2,.2)),r[tt("0x10a")]},i[tt("0x103")][tt("0x10b")]=function(){return r[tt("0x10b")]||(r[tt("0x10b")]=0),r[tt("0x10b")]},i[tt("0x103")][tt("0x10c")]=function(){return t[tt("0xb3")]==$[tt("0x51")][tt("0x59")]||t[tt("0xb3")]==$[tt("0x51")][tt("0x12a")]},i[tt("0x103")][tt("0x81")]=function(){return t[tt("0xb3")]==$[tt("0x51")][tt("0x59")]||t[tt("0xb3")]==$[tt("0x51")][tt("0x12a")]?(r[tt("0x85")]||(r[tt("0x85")]=new $[tt("0x83")](1,1,0,1)),r[tt("0x85")]):(r[tt("0x81")]||(r[tt("0x81")]=new $[tt("0x83")](1,0,0,1)),r[tt("0x81")])},i[tt("0x103")][tt("0x10d")]=function(){return r[tt("0x10d")]||(r[tt("0x10d")]=0),r[tt("0x10d")]},i[tt("0x103")][tt("0x10e")]=function(){return r[tt("0x10e")]||(r[tt("0x10e")]=new $[tt("0x83")](1,1,0,1)),r[tt("0x10e")]},i[tt("0x103")][tt("0x10f")]=function(){return e[tt("0xea")][tt("0x105")][tt("0x5")]},i[tt("0x103")][tt("0x110")]=function(){return.25},i},i[tt("0xa4")][tt("0xd2")]=function(){this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0xd2")](this),this[tt("0xa9")]&&this[tt("0x9c")][tt("0xab")][tt("0xd2")](this[tt("0xa9")])},i[tt("0xa4")][tt("0xd4")]=function(){this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0x9e")](this),this[tt("0xa9")]&&this[tt("0x9c")][tt("0xab")][tt("0x9e")](this[tt("0xa9")])},i[tt("0xa4")][tt("0xb0")]=function(t){t&&(this[tt("0x9c")][tt("0x6a")][tt("0x9d")][tt("0xd2")](this),this[tt("0xa9")]&&this[tt("0x9c")][tt("0xab")][tt("0xd2")](this[tt("0xa9")]),this[tt("0x94")][tt("0xae")](function(t){t[tt("0xaf")]=t[tt("0xaf")]&&t[tt("0xaf")][tt("0xb0")]()}),this[tt("0x94")]=[])},$.Scene[tt("0x112")]=i),e[tt("0xa4")][tt("0x241")]=function(t){var e=this[tt("0x23d")]*this[tt("0x23b")],i=this[tt("0x23e")]*this[tt("0x23c")],n=r(this[tt("0x237")],this[tt("0x238")],this[tt("0x239")],this[tt("0x23a")],e,i,this[tt("0x242")]),a=r(this[tt("0x237")],this[tt("0x238")],this[tt("0x239")],this[tt("0x23a")],e,i,this[tt("0x242")]),e=s(e,i),i=l(this[tt("0x23b")],this[tt("0x23c")],this[tt("0x23d")],this[tt("0x23e")]);return this[tt("0x243")](t,n,a,e,i)},e[tt("0xa4")][tt("0x244")]=function(t){var e=this[tt("0x23d")]*this[tt("0x23b")],i=this[tt("0x23e")]*this[tt("0x23c")],n=r(this[tt("0x237")],this[tt("0x238")],this[tt("0x239")],this[tt("0x23a")],e,i,this[tt("0x245")]),a=r(this[tt("0x237")],this[tt("0x238")],this[tt("0x239")],this[tt("0x23a")],e,i,this[tt("0x245")]),e=s(e,i),i=l(this[tt("0x23b")],this[tt("0x23c")],this[tt("0x23d")],this[tt("0x23e")]);return this[tt("0x243")](t,n,a,e,i)},e[tt("0xa4")][tt("0x246")]=function(t){var e=this[tt("0x23e")]*this[tt("0x23c")],i=o(this[tt("0x237")],this[tt("0x239")],this[tt("0x23a")],10,e,this[tt("0x245")],this[tt("0x242")]),n=o(this[tt("0x237")],this[tt("0x239")],this[tt("0x23a")],10,e,this[tt("0x245")],this[tt("0x242")]),e=s(10,e),a=l(10,this[tt("0x23c")],1,this[tt("0x23e")]);return this[tt("0x243")](t,i,n,e,a)},e[tt("0xa4")][tt("0x247")]=function(t){var e=this[tt("0x23e")]*this[tt("0x23c")],i=o(this[tt("0x238")],this[tt("0x239")],this[tt("0x23a")],10,e,this[tt("0x245")],this[tt("0x242")]),n=o(this[tt("0x238")],this[tt("0x239")],this[tt("0x23a")],10,e,this[tt("0x245")],this[tt("0x242")]),e=s(10,e),a=l(10,this[tt("0x23c")],1,this[tt("0x23e")]);return this[tt("0x243")](t,i,n,e,a)},e[tt("0xa4")][tt("0x243")]=function(t,e,i,n,a){var r=this,o=$[tt("0x248")][tt("0x249")](!0,!1,void 0),o=$[tt("0xfb")][tt("0xfc")](o),s=new $[tt("0x136")]({sources:[tt("0x24a")]}),l=new $[tt("0x136")]({sources:[tt("0x24b")]}),c={xbsjColor:function(){return r[tt("0x236")]}},h={xbsjColor:function(){return r[tt("0x86")]}},s=$[tt("0xf8")][tt("0xfc")]({context:t,vertexShaderSource:s,fragmentShaderSource:l,attributeLocations:{position:0,normal:1}}),l=$[tt("0x135")][tt("0x190")]({context:t,typedArray:e,usage:$[tt("0xf4")][tt("0xf5")]}),i=$[tt("0x135")][tt("0x190")]({context:t,typedArray:i,usage:$[tt("0xf4")][tt("0xf5")]}),n=$[tt("0x135")][tt("0x24c")]({context:t,typedArray:n,usage:$[tt("0xf4")][tt("0xf5")],indexDatatype:$[tt("0x1a1")][tt("0x24d")]}),a=$[tt("0x135")][tt("0x24c")]({context:t,typedArray:a,usage:$[tt("0xf4")][tt("0xf5")],indexDatatype:$[tt("0x1a1")][tt("0x24d")]}),n=new $[tt("0xf2")]({context:t,attributes:[{index:0,vertexBuffer:l,componentsPerAttribute:3,componentDatatype:$[tt("0x7")][tt("0x8")]},{index:1,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:$[tt("0x7")][tt("0x8")]}],indexBuffer:n}),t=new $[tt("0xf2")]({context:t,attributes:[{index:0,vertexBuffer:l,componentsPerAttribute:3,componentDatatype:$[tt("0x7")][tt("0x8")]},{index:1,vertexBuffer:i,componentsPerAttribute:3,componentDatatype:$[tt("0x7")][tt("0x8")]}],indexBuffer:a}),l=$[tt("0x4e")][tt("0x4f")](e);return{command:new $[tt("0xee")]({vertexArray:n,primitiveType:$[tt("0x51")][tt("0x52")],renderState:o,shaderProgram:s,uniformMap:c,owner:this,pass:$[tt("0xef")][tt("0x129")],modelMatrix:new $[tt("0x11")],boundingVolume:new $[tt("0x4e")],cull:!0}),lineCommand:new $[tt("0xee")]({vertexArray:t,primitiveType:$[tt("0x51")][tt("0x59")],renderState:o,shaderProgram:s,uniformMap:h,owner:this,pass:$[tt("0xef")][tt("0x129")],modelMatrix:new $[tt("0x11")],boundingVolume:new $[tt("0x4e")],cull:!0}),initBoundingSphere:l}},e[tt("0xa4")][tt("0xdb")]=function(e){var i=this;this[tt("0x7a")]&&(this[tt("0x22b")]===this[tt("0x245")]&&this[tt("0x22c")]===this[tt("0x242")]&&this[tt("0x22e")]===this[tt("0x237")]&&this[tt("0x22f")]===this[tt("0x238")]&&this[tt("0x230")]===this[tt("0x239")]&&this[tt("0x231")]===this[tt("0x23a")]&&this[tt("0x232")]===this[tt("0x23b")]&&this[tt("0x233")]===this[tt("0x23c")]&&this[tt("0x234")]===this[tt("0x23d")]&&this[tt("0x235")]===this[tt("0x23e")]||(this[tt("0x245")]=this[tt("0x22b")],this[tt("0x242")]=this[tt("0x22c")],this[tt("0x237")]=this[tt("0x22e")],this[tt("0x238")]=this[tt("0x22f")],this[tt("0x239")]=this[tt("0x230")],this[tt("0x23a")]=this[tt("0x231")],this[tt("0x23b")]=this[tt("0x232")],this[tt("0x23c")]=this[tt("0x233")],this[tt("0x23d")]=this[tt("0x234")],this[tt("0x23e")]=this[tt("0x235")],this[tt("0x8b")]=$[tt("0x57")]($[tt("0x11")][tt("0x8c")]),this[tt("0x24e")]()),$[tt("0x2d")](this[tt("0x24f")])&&0!==this[tt("0x24f")][tt("0x2")]||(this[tt("0x24f")]||(this[tt("0x24f")]=[]),this[tt("0x24f")][tt("0x4c")](this[tt("0x241")](e[tt("0xea")])),this[tt("0x24f")][tt("0x4c")](this[tt("0x246")](e[tt("0xea")])),this[tt("0x24f")][tt("0x4c")](this[tt("0x247")](e[tt("0xea")])),this[tt("0x24f")][tt("0x4c")](this[tt("0x244")](e[tt("0xea")]))),$[tt("0x11")][tt("0xba")](this[tt("0x140")],this[tt("0x8b")])||($[tt("0x11")][tt("0x57")](this[tt("0x140")],this[tt("0x8b")]),this[tt("0x24f")][tt("0xae")](function(t){t[tt("0x250")][tt("0x140")]=$[tt("0x11")][tt("0x8c")],t[tt("0x250")][tt("0x140")]=i[tt("0x8b")],t[tt("0x250")][tt("0x251")]=$[tt("0x4e")][tt("0x180")](t[tt("0x252")],i[tt("0x8b")],i[tt("0x166")]),t[tt("0x253")][tt("0x140")]=$[tt("0x11")][tt("0x8c")],t[tt("0x253")][tt("0x140")]=i[tt("0x8b")],t[tt("0x253")][tt("0x251")]=$[tt("0x4e")][tt("0x180")](t[tt("0x252")],i[tt("0x8b")],i[tt("0x166")])})),this[tt("0x24f")][tt("0xae")](function(t){t[tt("0x250")]&&e[tt("0xe1")][tt("0x4c")](t[tt("0x250")]),t[tt("0x253")]&&e[tt("0xe1")][tt("0x4c")](t[tt("0x253")])}))},e[tt("0xa4")][tt("0x1f7")]=function(){return!1},e[tt("0xa4")][tt("0x24e")]=function(){this[tt("0x24f")]&&this[tt("0x24f")][tt("0xae")](function(t){$[tt("0x2d")](t[tt("0x250")])&&(t[tt("0x250")][tt("0xf7")]=t[tt("0x250")][tt("0xf7")]&&t[tt("0x250")][tt("0xf7")][tt("0xb0")](),t[tt("0x250")][tt("0xaf")]=t[tt("0x250")][tt("0xaf")]&&t[tt("0x250")][tt("0xaf")][tt("0xb0")](),t[tt("0x250")]=void 0),$[tt("0x2d")](t[tt("0x253")])&&(t[tt("0x253")][tt("0xf7")]=t[tt("0x253")][tt("0xf7")]&&t[tt("0x253")][tt("0xf7")][tt("0xb0")](),t[tt("0x253")][tt("0xaf")]=t[tt("0x253")][tt("0xaf")]&&t[tt("0x253")][tt("0xaf")][tt("0xb0")](),t[tt("0x253")]=void 0)}),this[tt("0x24f")]&&(this[tt("0x24f")][tt("0x2")]=0)},e[tt("0xa4")][tt("0xb0")]=function(){return this[tt("0x24e")](),$[tt("0x133")](this)},Object[tt("0xa3")](e[tt("0xa4")],{startRadius:{get:function(){return this[tt("0x254")]},set:function(t){this[tt("0x254")]=t,this[tt("0x22b")]=[{fov:$[tt("0x5d")][tt("0x5e")](0),radius:t},{fov:$[tt("0x5d")][tt("0x5e")](10),radius:.9*t},{fov:$[tt("0x5d")][tt("0x5e")](20),radius:.8*t},{fov:$[tt("0x5d")][tt("0x5e")](30),radius:.7*t},{fov:$[tt("0x5d")][tt("0x5e")](40),radius:.6*t},{fov:$[tt("0x5d")][tt("0x5e")](50),radius:.5*t},{fov:$[tt("0x5d")][tt("0x5e")](60),radius:.4*t},{fov:$[tt("0x5d")][tt("0x5e")](70),radius:.3*t},{fov:$[tt("0x5d")][tt("0x5e")](80),radius:.1*t},{fov:$[tt("0x5d")][tt("0x5e")](90),radius:.01*t}]}},radius:{get:function(){return this[tt("0x115")]},set:function(t){this[tt("0x115")]=t,this[tt("0x22c")]=[{fov:$[tt("0x5d")][tt("0x5e")](0),radius:t},{fov:$[tt("0x5d")][tt("0x5e")](10),radius:.9*t},{fov:$[tt("0x5d")][tt("0x5e")](20),radius:.8*t},{fov:$[tt("0x5d")][tt("0x5e")](30),radius:.7*t},{fov:$[tt("0x5d")][tt("0x5e")](40),radius:.6*t},{fov:$[tt("0x5d")][tt("0x5e")](50),radius:.5*t},{fov:$[tt("0x5d")][tt("0x5e")](60),radius:.4*t},{fov:$[tt("0x5d")][tt("0x5e")](70),radius:.3*t},{fov:$[tt("0x5d")][tt("0x5e")](80),radius:.1*t},{fov:$[tt("0x5d")][tt("0x5e")](90),radius:.01*t}]}}}),$.Scene[tt("0x255")]=e,function(){var t,e;$[tt("0x12b")]||(t=typeof self!==tt("0x68")?self:this,e=function(){return i=[function(c,t,e){Object[tt("0x1d")](t,tt("0x1e"),{value:!0}),t[tt("0x12b")]=void 0;var C=i(e(6)),w=i(e(7)),I=i(e(8)),Q=i(e(9));function i(t){return t&&t[tt("0x1e")]?t:{default:t}}var _=$[tt("0x4e")],A=$[tt("0x9")],n=$[tt("0x83")],u=$[tt("0x132")],G=$[tt("0x7")],a=$[tt("0x79")],r=$[tt("0x2d")],P=(Object[tt("0xa3")],$[tt("0x133")],$[tt("0x134")]),W=$[tt("0x11")],o=$[tt("0x51")],M=$[tt("0x135")],S=$[tt("0xf4")],s=$[tt("0xee")],Z=$[tt("0xef")],V=$[tt("0xfb")],R=$[tt("0xf8")],T=$[tt("0x136")],F=$[tt("0xf2")],X=$[tt("0xfd")],B=$[tt("0x101")],l=$[tt("0x137")],J=$[tt("0x35")],O=$[tt("0x138")],j=$[tt("0x5d")],D=$[tt("0x22")],k=(W=$[tt("0x11")],$[tt("0x139")]),d=($[tt("0x13a")],$[tt("0x13b")],Math[tt("0x65")]),N=Math[tt("0x66")],E=Math[tt("0x5f")],Y=Math[tt("0x13c")],z=(Math[tt("0x13d")],{position:0,normal:1});function h(t){var e=this;t=a(t,a[tt("0x13e")]),this[tt("0x7a")]=a(t[tt("0x7a")],!0),this[tt("0x13f")]=a(t[tt("0x13f")],32),this[tt("0x140")]=W[tt("0x57")](t[tt("0x140")],new W),this[tt("0x8b")]=new W,this[tt("0x141")]=new W,this[tt("0x142")]=new W,this[tt("0xed")]=a(t[tt("0xed")],Number[tt("0x143")]),this[tt("0x115")]=void 0,this[tt("0x144")]=a(t[tt("0x144")],0),this[tt("0x145")]=void 0,this[tt("0x146")]=a(t[tt("0x146")],0),this[tt("0x147")]=void 0,this[tt("0x86")]=a(t[tt("0x86")],n[tt("0x148")]),this[tt("0x149")]=a(t[tt("0x149")],!0),this[tt("0x14a")]=a(t[tt("0x14a")],!0),this[tt("0x14b")]=a(t[tt("0x14b")],!0),this[tt("0x14c")]=r(t[tt("0x14c")])?t[tt("0x14c")]:l[tt("0x14d")](l[tt("0x14e")]),this[tt("0x14f")]=void 0,this[tt("0x150")]=void 0,this[tt("0x151")]=r(t[tt("0x151")])?t[tt("0x151")]:l[tt("0x14d")](l[tt("0x14e")]),this[tt("0x152")]=void 0,this[tt("0x153")]=void 0,this[tt("0x154")]=a(t[tt("0x154")],!0),this[tt("0x155")]=r(t[tt("0x155")])?t[tt("0x155")]:l[tt("0x14d")](l[tt("0x14e")]),this[tt("0x156")]=void 0,this[tt("0x157")]=a(t[tt("0x157")],!0),this[tt("0x158")]=a(t[tt("0x158")],!0),this[tt("0x159")]=a(t[tt("0x159")],n[tt("0x148")]),this[tt("0x15a")]=a(t[tt("0x15a")],5),this[tt("0x15b")]=a(t[tt("0x15b")],!1),this[tt("0x15c")]=void 0,this[tt("0x15d")]=a(t[tt("0x15d")],!0),this[tt("0x15e")]=a(t[tt("0x15e")],n[tt("0x148")]),this[tt("0x15f")]=a(t[tt("0x15f")],tt("0x160")),this[tt("0x161")]=a(t[tt("0x161")],10),this[tt("0x162")]=0,this[tt("0x163")]=0,this[tt("0x164")]=k[tt("0x165")](),this[tt("0x166")]=new _,this[tt("0x167")]=new _,this[tt("0x168")]=new s({owner:this,primitiveType:o[tt("0x52")],boundingVolume:this[tt("0x167")]}),this[tt("0x169")]=new s({owner:this,primitiveType:o[tt("0x52")],boundingVolume:this[tt("0x167")]}),this[tt("0x16a")]=void 0,this[tt("0x16b")]=new s({owner:this,primitiveType:o[tt("0x59")],boundingVolume:this[tt("0x167")]}),this[tt("0x16c")]=void 0,this[tt("0x16d")]=new s({owner:this,primitiveType:o[tt("0x59")],boundingVolume:this[tt("0x167")]}),this[tt("0x16e")]=void 0,this[tt("0x16f")]=new s({owner:this,primitiveType:o[tt("0x52")],boundingVolume:this[tt("0x167")]}),this[tt("0x170")]=new s({owner:this,primitiveType:o[tt("0x52")],boundingVolume:this[tt("0x167")]}),this[tt("0x171")]=void 0,this[tt("0x172")]=new s({owner:this,primitiveType:o[tt("0x59")],boundingVolume:this[tt("0x167")]}),this[tt("0x173")]=void 0,this[tt("0x174")]=new s({owner:this,primitiveType:o[tt("0x52")],boundingVolume:this[tt("0x167")]}),this[tt("0x175")]=new s({owner:this,primitiveType:o[tt("0x52")],boundingVolume:this[tt("0x167")]}),this[tt("0x176")]=void 0,this[tt("0x177")]=[],this[tt("0x178")]=void 0,this[tt("0x179")]=void 0,this[tt("0x17a")]=void 0,this[tt("0x17b")]={u_type:function(){return 0},u_xHalfAngle:function(){return e[tt("0x144")]},u_yHalfAngle:function(){return e[tt("0x146")]},u_radius:function(){return e[tt("0xed")]},u_showThroughEllipsoid:function(){return e[tt("0x15b")]},u_showIntersection:function(){return e[tt("0x158")]},u_intersectionColor:function(){return e[tt("0x159")]},u_intersectionWidth:function(){return e[tt("0x15a")]},u_normalDirection:function(){return 1},u_lineColor:function(){return e[tt("0x86")]}},this[tt("0x17c")]={u_xHalfAngle:function(){return e[tt("0x162")]},u_yHalfAngle:function(){return e[tt("0x163")]},u_radius:function(){return e[tt("0xed")]},u_color:function(){return e[tt("0x15e")]},u_showThroughEllipsoid:function(){return e[tt("0x15b")]},u_showIntersection:function(){return e[tt("0x158")]},u_intersectionColor:function(){return e[tt("0x159")]},u_intersectionWidth:function(){return e[tt("0x15a")]},u_normalDirection:function(){return 1},u_lineColor:function(){return e[tt("0x86")]}}}h[tt("0xa4")][tt("0xdb")]=function(t){var e,i=t[tt("0x34")];if(this[tt("0x7a")]&&i===J[tt("0x36")]){var i=!1,n=!1,a=!1,r=this[tt("0x144")],o=this[tt("0x146")];if(r<0||o<0)throw new P(tt("0x17d"));if(0!=r&&0!=o){this[tt("0x145")]===r&&this[tt("0x147")]===o||(this[tt("0x145")]=r,this[tt("0x147")]=o,i=!0);var s=this[tt("0xed")];if(s<0)throw new P(tt("0x17e"));var l=!1,s=(this[tt("0x115")]!==s&&(l=!0,this[tt("0x115")]=s,this[tt("0x166")]=new _(A[tt("0x56")],this[tt("0xed")])),W[tt("0xba")](this[tt("0x140")],this[tt("0x8b")])&&!l||(W[tt("0x57")](this[tt("0x140")],this[tt("0x8b")]),W[tt("0x17f")](this[tt("0x140")],this[tt("0xed")],this[tt("0x141")]),_[tt("0x180")](this[tt("0x166")],this[tt("0x140")],this[tt("0x167")])),this[tt("0x15b")]),l=(this[tt("0x15c")]!==this[tt("0x15b")]&&(this[tt("0x15c")]=s,n=!0),this[tt("0x14c")]);this[tt("0x14f")]!==l&&(this[tt("0x14f")]=l,a=n=!0);var c,h,d,u,x,p,m=l[tt("0x181")](),g=(this[tt("0x150")]!==m&&(this[tt("0x150")]=m,n=!0),this[tt("0x15d")]&&(p=t[tt("0xdc")],(x=k[tt("0x182")](p,this[tt("0x164")]))<0&&(this[tt("0x164")]=k[tt("0x57")](p,this[tt("0x164")])),p=Math[tt("0x183")](x%this[tt("0x161")]/this[tt("0x161")],0),this[tt("0x15f")]==tt("0x160")?(x=N(d=2*o*p-o),u=E(r),x=Y(x*u),this[tt("0x162")]=x,this[tt("0x163")]=d,$[tt("0x22")][tt("0x184")](this[tt("0x163")],L)):(d=2*r*p-r,u=E(o),x=N(d),p=Y(x*u),this[tt("0x162")]=d,this[tt("0x163")]=p,$[tt("0x22")][tt("0x185")](this[tt("0x162")],L)),$[tt("0x11")][tt("0x186")](this[tt("0x140")],L,this[tt("0x142")]),W[tt("0x17f")](this[tt("0x142")],this[tt("0xed")],this[tt("0x142")])),i&&(r=this,o=t[tt("0xea")],x=U(r,r[tt("0x144")],r[tt("0x146")]),d=(u=r)[tt("0x144")],u=u[tt("0x146")],p=x[tt("0x189")],x=x[tt("0x18a")],i=[],e=D[tt("0x185")](d,L),i[tt("0x4c")](p[tt("0x18b")](function(t){return D[tt("0x18c")](e,t,new $[tt("0x9")])})),e=D[tt("0x184")](-u,L),i[tt("0x4c")](x[tt("0x18b")](function(t){return D[tt("0x18c")](e,t,new $[tt("0x9")])})[tt("0x18d")]()),e=D[tt("0x185")](-d,L),i[tt("0x4c")](p[tt("0x18b")](function(t){return D[tt("0x18c")](e,t,new $[tt("0x9")])})[tt("0x18d")]()),e=D[tt("0x184")](u,L),i[tt("0x4c")](x[tt("0x18b")](function(t){return D[tt("0x18c")](e,t,new $[tt("0x9")])})),d=i,r[tt("0x14b")]&&(r[tt("0x16a")]=function(t,e){for(var i=Array[tt("0xa4")][tt("0x18e")][tt("0x18f")]([],e)[tt("0x2")]-e[tt("0x2")],n=new Float32Array(18*i),a=0,r=0,o=e[tt("0x2")];r<o;r++)for(var s=e[r],l=A[tt("0x15")](A[tt("0xc")](s[0],s[s[tt("0x2")]-1],K),K),c=0,i=s[tt("0x2")]-1;c<i;c++)n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=-l.x,n[a++]=-l.y,n[a++]=-l.z,n[a++]=s[c].x,n[a++]=s[c].y,n[a++]=s[c].z,n[a++]=-l.x,n[a++]=-l.y,n[a++]=-l.z,n[a++]=s[c+1].x,n[a++]=s[c+1].y,n[a++]=s[c+1].z,n[a++]=-l.x,n[a++]=-l.y,n[a++]=-l.z;var h=M[tt("0x190")]({context:t,typedArray:n,usage:S[tt("0xf5")]}),d=6*Float32Array[tt("0x191")],h=[{index:z[tt("0x3")],vertexBuffer:h,componentsPerAttribute:3,componentDatatype:G[tt("0x8")],offsetInBytes:0,strideInBytes:d},{index:z[tt("0x5")],vertexBuffer:h,componentsPerAttribute:3,componentDatatype:G[tt("0x8")],offsetInBytes:3*Float32Array[tt("0x191")],strideInBytes:d}];return new F({context:t,attributes:h})}(o,d)),r[tt("0x149")]&&(r[tt("0x16c")]=function(t,e){for(var i=e[tt("0x2")],n=new Float32Array(9*i),a=0,r=0,o=e[tt("0x2")];r<o;r++){var s=e[r];n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=s[0].x,n[a++]=s[0].y,n[a++]=s[0].z}var i=M[tt("0x190")]({context:t,typedArray:n,usage:S[tt("0xf5")]}),l=3*Float32Array[tt("0x191")],i=[{index:z[tt("0x3")],vertexBuffer:i,componentsPerAttribute:3,componentDatatype:G[tt("0x8")],offsetInBytes:0,strideInBytes:l}];return new F({context:t,attributes:i})}(o,d)),r[tt("0x14a")]&&(r[tt("0x16e")]=function(t,e){for(var i=Array[tt("0xa4")][tt("0x18e")][tt("0x18f")]([],e)[tt("0x2")]-e[tt("0x2")],n=new Float32Array(9*i),a=0,r=0,o=e[tt("0x2")];r<o;r++)for(var s=e[r],l=0,i=s[tt("0x2")]-1;l<i;l++)n[a++]=s[l].x,n[a++]=s[l].y,n[a++]=s[l].z,n[a++]=s[l+1].x,n[a++]=s[l+1].y,n[a++]=s[l+1].z;var c=M[tt("0x190")]({context:t,typedArray:n,usage:S[tt("0xf5")]}),h=3*Float32Array[tt("0x191")],c=[{index:z[tt("0x3")],vertexBuffer:c,componentsPerAttribute:3,componentDatatype:G[tt("0x8")],offsetInBytes:0,strideInBytes:h}];return new F({context:t,attributes:c})}(o,d)),r[tt("0x154")]&&(r[tt("0x171")]=(p=o,u=$[tt("0x13b")][tt("0x55")](new $[tt("0x13b")]({vertexFormat:O[tt("0x192")],stackPartitions:32,slicePartitions:32})),F[tt("0xf3")]({context:p,geometry:u,attributeLocations:z,bufferUsage:S[tt("0xf5")],interleave:!1}))),r[tt("0x157")]&&(r[tt("0x173")]=(x=o,i=$[tt("0x193")][tt("0x55")](new $[tt("0x193")]({vertexFormat:O[tt("0x192")],stackPartitions:32,slicePartitions:32})),F[tt("0xf3")]({context:x,geometry:i,attributeLocations:z,bufferUsage:S[tt("0xf5")],interleave:!1}))),r[tt("0x15d")])&&(r[tt("0x15f")]==tt("0x160")?(c=U(r,j[tt("0x194")],0),r[tt("0x195")]=q(o,c[tt("0x18a")])):(c=U(r,0,j[tt("0x194")]),r[tt("0x195")]=q(o,c[tt("0x189")]))),n&&(i=this,r=s,m?(i[tt("0x178")]=V[tt("0xfc")]({depthTest:{enabled:!r},depthMask:!1,blending:X[tt("0xfe")],cull:{enabled:!0,face:B[tt("0x102")]}}),i[tt("0x179")]=V[tt("0xfc")]({depthTest:{enabled:!r},depthMask:!1,blending:X[tt("0xfe")],cull:{enabled:!0,face:B[tt("0x19a")]}}),i[tt("0x19b")]=V[tt("0xfc")]({depthTest:{enabled:!r},depthMask:!1,blending:X[tt("0xfe")]})):(i[tt("0x178")]=V[tt("0xfc")]({depthTest:{enabled:!r},depthMask:!0}),i[tt("0x19b")]=V[tt("0xfc")]({depthTest:{enabled:!0},depthMask:!0}))),a&&(o=this,s=c=l,i=(r=t)[tt("0xea")],l=C[tt("0x131")],h=new T({sources:[I[tt("0x131")],s[tt("0x196")],w[tt("0x131")]]}),o[tt("0x17a")]=R[tt("0xf9")]({context:i,shaderProgram:o[tt("0x17a")],vertexShaderSource:l,fragmentShaderSource:h,attributeLocations:z}),h=new T({sources:[I[tt("0x131")],s[tt("0x196")],w[tt("0x131")]],pickColorQualifier:tt("0x197")}),o[tt("0x198")]=R[tt("0xf9")]({context:i,shaderProgram:o[tt("0x198")],vertexShaderSource:l,fragmentShaderSource:h,attributeLocations:z}),this[tt("0x15d")])&&(s=this,i=c,o=r[tt("0xea")],l=C[tt("0x131")],h=new T({sources:[I[tt("0x131")],i[tt("0x196")],Q[tt("0x131")]]}),s[tt("0x199")]=R[tt("0xf9")]({context:o,shaderProgram:s[tt("0x199")],vertexShaderSource:l,fragmentShaderSource:h,attributeLocations:z})),(n||a)&&(r=m,(i=this)[tt("0x177")][tt("0x2")]=0,o=r?Z[tt("0x129")]:Z[tt("0xf0")],i[tt("0x14b")]&&H(i,i[tt("0x168")],i[tt("0x169")],i[tt("0x178")],i[tt("0x179")],i[tt("0x17a")],i[tt("0x16a")],i[tt("0x17b")],i[tt("0x141")],r,o),i[tt("0x149")]&&H(i,i[tt("0x16b")],void 0,i[tt("0x178")],i[tt("0x179")],i[tt("0x17a")],i[tt("0x16c")],i[tt("0x17b")],i[tt("0x141")],r,o,!0),i[tt("0x14a")]&&H(i,i[tt("0x16d")],void 0,i[tt("0x178")],i[tt("0x179")],i[tt("0x17a")],i[tt("0x16e")],i[tt("0x17b")],i[tt("0x141")],r,o,!0),i[tt("0x154")]&&H(i,i[tt("0x16f")],i[tt("0x170")],i[tt("0x178")],i[tt("0x179")],i[tt("0x17a")],i[tt("0x171")],i[tt("0x17b")],i[tt("0x141")],r,o),i[tt("0x157")]&&H(i,i[tt("0x172")],void 0,i[tt("0x178")],i[tt("0x179")],i[tt("0x17a")],i[tt("0x173")],i[tt("0x17b")],i[tt("0x141")],r,o,!0),i[tt("0x15d")])&&H(i,i[tt("0x174")],i[tt("0x175")],i[tt("0x178")],i[tt("0x179")],i[tt("0x199")],i[tt("0x195")],i[tt("0x17c")],i[tt("0x142")],r,o),t[tt("0xe1")]),s=t[tt("0x187")],f=this[tt("0x177")];if(s[tt("0x188")])for(var v=0,y=f[tt("0x2")];v<y;v++){var b=f[v];g[tt("0x4c")](b)}}}};var L=new D,K=new A;function U(t,e,i){for(var n=t[tt("0x13f")],t=N(i),i=E(i),a=N(e),e=E(e),r=Y(a*i),o=Y(t*e),s=[],l=0;l<n;l++){var c=2*r*l/(n-1)-r;s[tt("0x4c")](new A(0,d(c),N(c)))}for(var h=[],l=0;l<n;l++)c=2*o*l/(n-1)-o,h[tt("0x4c")](new A(d(c),0,N(c)));return{zoy:s,zox:h}}function q(t,e){for(var i=e[tt("0x2")]-1,n=new Float32Array(9*i),a=0,r=0;r<i;r++)n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=e[r].x,n[a++]=e[r].y,n[a++]=e[r].z,n[a++]=e[r+1].x,n[a++]=e[r+1].y,n[a++]=e[r+1].z;var o=M[tt("0x190")]({context:t,typedArray:n,usage:S[tt("0xf5")]}),s=3*Float32Array[tt("0x191")],o=[{index:z[tt("0x3")],vertexBuffer:o,componentsPerAttribute:3,componentDatatype:G[tt("0x8")],offsetInBytes:0,strideInBytes:s}];return new F({context:t,attributes:o})}function H(t,e,i,n,a,r,o,s,l,c,h,d){c&&i&&(i[tt("0xaf")]=o,i[tt("0xfa")]=a,i[tt("0xf7")]=r,i[tt("0x103")]=u(s,t[tt("0x14f")][tt("0x17b")]),i[tt("0x103")][tt("0x19c")]=function(){return-1},i[tt("0x19d")]=h,i[tt("0x140")]=l,t[tt("0x177")][tt("0x4c")](i)),e[tt("0xaf")]=o,e[tt("0xfa")]=n,e[tt("0xf7")]=r,e[tt("0x103")]=u(s,t[tt("0x14f")][tt("0x17b")]),d&&(e[tt("0x103")][tt("0x19e")]=function(){return 1}),e[tt("0x19d")]=h,e[tt("0x140")]=l,t[tt("0x177")][tt("0x4c")](e)}t[tt("0x12b")]=h},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0});var G=$[tt("0x4e")],P=$[tt("0x9")],r=$[tt("0x19f")],W=$[tt("0x7")],o=$[tt("0x79")],M=($[tt("0x2d")],$[tt("0x50")]),S=$[tt("0x6")],Z=$[tt("0x1a0")],V=$[tt("0x51")],s=$[tt("0x138")],R=$[tt("0x5d")],T=$[tt("0x53")],F=$[tt("0x1a1")],X=($[tt("0xf")],Math[tt("0x66")]),B=Math[tt("0x65")];function l(t){var e=(t=o(t,o[tt("0x13e")]))[tt("0x114")],i=t[tt("0xed")],n=Math[tt("0x1a2")](o(t[tt("0x1a3")],12)),a=Math[tt("0x1a2")](o(t[tt("0x1a4")],64)),t=(r[tt("0x1a5")][tt("0x1a6")](tt("0x114"),e),r[tt("0x1a5")][tt("0x1a6")](tt("0xed"),i),o(t[tt("0x1a7")],s[tt("0x1a8")]));this[tt("0x113")]=e,this[tt("0x115")]=i,this[tt("0x1a9")]=n,this[tt("0x1aa")]=a,this[tt("0x1ab")]=t}l[tt("0x1ac")]=function(t){var e=(t=o(t,o[tt("0x13e")]))[tt("0x114")],i=t[tt("0xed")],n=t[tt("0x1a3")],a=t[tt("0x1a4")];return r[tt("0x1a5")][tt("0x1a6")](tt("0x114"),e),r[tt("0x1a5")][tt("0x1a6")](tt("0xed"),i),r[tt("0x1a5")][tt("0x1a6")][tt("0x1ad")](tt("0x114"),e,0),r[tt("0x1a5")][tt("0x1a6")][tt("0x1ad")](tt("0x33"),height,0),new l({angle:e,radius:i,stackPartitions:n,slicePartitions:a,vertexFormat:t[tt("0x1a7")]})},l[tt("0x55")]=function(t){console[tt("0xdc")](tt("0x55"));var e,i=t[tt("0x113")],n=t[tt("0x115")],a=t[tt("0x1a9")]+1,r=t[tt("0x1aa")]+1,t=t[tt("0x1ab")],o=new Z,s=3*(r-1)+6*(r-1)*(a-2)+3*(r-1),l=a*r,c=F[tt("0x1ae")](l,s),h=new Float64Array(3*l+3*(r-1)*3);if(t[tt("0x3")]){for(var d=0,u=new Array(r),x=new Array(r),p=0;p<r;p++){var m=R[tt("0x1af")]*p/(r-1);u[p]=X(m),x[p]=B(m),h[d++]=0,h[d++]=0,h[d++]=-n}for(p=1;p<a;p++)for(var g=i*p/(a-1),f=B(g),v=n*f,y=n*f,b=n*X(g),C=0;C<r;C++)h[d++]=u[C]*v,h[d++]=x[C]*y,h[d++]=-b;for(e=d,p=0;p<r-1;p++)h[d++]=0,h[d++]=0,h[d++]=0,h[d++]=h[e-3*(r-p-1)],h[d++]=h[e-3*(r-p-1)+1],h[d++]=h[e-3*(r-p-1)+2],h[d++]=h[e-3*(r-p)],h[d++]=h[e-3*(r-p)+1],h[d++]=h[e-3*(r-p)+2];o[tt("0x3")]=new S({componentDatatype:W[tt("0x4d")],componentsPerAttribute:3,values:h})}for(var w,I,_=0,C=0;C<r-1;C++)c[_++]=r+C,c[_++]=r+C+1,c[_++]=C+1;for(p=1;p<a-1;p++)for(w=p*r,I=(p+1)*r,C=0;C<r-1;C++)c[_++]=I+C,c[_++]=I+C+1,c[_++]=w+C+1,c[_++]=I+C,c[_++]=w+C+1,c[_++]=w+C;for(var p=0,A=3*(r-1);p<A;p++)c[_++]=p+e/3;s=new M({attributes:o,indices:c,primitiveType:V[tt("0x52")],boundingSphere:new G(P[tt("0x56")],n)}),s=T[tt("0x54")](s);return console[tt("0x1b0")](tt("0x55")),s},e[tt("0x1b1")]=l},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0});var w=$[tt("0x4e")],I=$[tt("0x9")],_=$[tt("0x7")],r=$[tt("0x79")],o=($[tt("0x2d")],$[tt("0x134")]),A=($[tt("0xf")],$[tt("0x50")]),G=$[tt("0x6")],P=$[tt("0x1a0")],W=$[tt("0x1a1")],M=$[tt("0x5d")],S=$[tt("0x51")],Z=(new I(1,1,1),Math[tt("0x66")]),V=Math[tt("0x65")];function n(t){var e=(t=r(t,r[tt("0x13e")]))[tt("0x114")],i=t[tt("0xed")],n=Math[tt("0x1a2")](r(t[tt("0x1a3")],10)),a=Math[tt("0x1a2")](r(t[tt("0x1a4")],8)),t=Math[tt("0x1a2")](r(t[tt("0x1b2")],128));if(n<1)throw new o(tt("0x1b3"));if(a<0)throw new o(tt("0x1b4"));if(t<0)throw new o(tt("0x1b5"));this[tt("0x113")]=e,this[tt("0x115")]=i,this[tt("0x1a9")]=n,this[tt("0x1aa")]=a,this[tt("0x1b6")]=t}n[tt("0x55")]=function(t){var e=t[tt("0x113")],i=t[tt("0x115")];if(!(i<=0||e<=0)){for(var n,a,r,o,s=t[tt("0x1a9")],l=t[tt("0x1aa")],c=t[tt("0x1b6")],t=c*(s+l-1),h=t-l+2,d=new Float64Array(3*h),u=W[tt("0x1ae")](h,2*t),x=0,p=new Array(c),m=new Array(c),g=0;g<c;g++)n=M[tt("0x1af")]*g/c,p[g]=Z(n),m[g]=V(n);for(g=1;g<s;g++)for(r=Z(a=e*g/(s-1)),o=V(a),v=0;v<c;v++)d[x++]=i*p[v]*o,d[x++]=i*m[v]*o,d[x++]=-i*r;for(p[tt("0x2")]=l,m[tt("0x2")]=l,g=0;g<l;g++)n=M[tt("0x1af")]*g/l,p[g]=Z(n),m[g]=V(n);for(d[x++]=0,d[x++]=0,d[x++]=-i,g=1;g<c;g++)for(r=Z(a=e*g/c),o=V(a),v=0;v<l;v++)d[x++]=i*p[v]*o,d[x++]=i*m[v]*o,d[x++]=-i*r;for(g=x=0;g<s-1;++g){for(var f=g*c,v=0;v<c-1;++v)u[x++]=f+v,u[x++]=f+v+1;u[x++]=f+c-1,u[x++]=f}var y=c*(s-1);for(v=1;v<l+1;++v)u[x++]=y,u[x++]=y+v;for(g=0;g<c-2;++g){var b=g*l+1+y,C=(g+1)*l+1+y;for(v=0;v<l-1;++v)u[x++]=C+v,u[x++]=b+v;u[x++]=C+l-1,u[x++]=b+l-1}h=new P({position:new G({componentDatatype:_[tt("0x4d")],componentsPerAttribute:3,values:d})});return new A({attributes:h,indices:u,primitiveType:S[tt("0x59")],boundingSphere:new w(I[tt("0x56")],i)})}},e[tt("0x1b7")]=n},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0});var n=$[tt("0x79")],a=$[tt("0x2d")],r=Object[tt("0xa3")],o=$[tt("0x134")],s=$[tt("0x1b8")],l=$[tt("0x1b9")],c=$[tt("0x1ba")];function h(t){this[tt("0x113")]=void 0,this[tt("0x1bb")]=void 0,this[tt("0x115")]=void 0,this[tt("0x1bc")]=void 0,this[tt("0x1bd")]=void 0,this[tt("0x1be")]=void 0,this[tt("0x1bf")]=void 0,this[tt("0x1c0")]=void 0,this[tt("0x1c1")]=void 0,this[tt("0x1c2")]=void 0,this[tt("0x78")]=void 0,this[tt("0x1c3")]=void 0,this[tt("0x1c4")]=void 0,this[tt("0x1c5")]=void 0,this[tt("0x1c1")]=void 0,this[tt("0x1c2")]=void 0,this[tt("0x14f")]=void 0,this[tt("0x1c6")]=void 0,this[tt("0x7b")]=void 0,this[tt("0x1c7")]=void 0,this[tt("0x1c8")]=void 0,this[tt("0x1c9")]=void 0,this[tt("0x1ca")]=void 0,this[tt("0x1cb")]=void 0,this[tt("0x1cc")]=void 0,this[tt("0x1cd")]=void 0,this[tt("0x1ce")]=void 0,this[tt("0x1cf")]=void 0,this[tt("0x1d0")]=new s,this[tt("0x1d1")]=void 0,this[tt("0x1d2")]=void 0,this[tt("0x1d3")](n(t,n[tt("0x13e")]))}r(h[tt("0xa4")],{definitionChanged:{get:function(){return this[tt("0x1d0")]}},show:c(tt("0x7a")),angle:c(tt("0x114")),radius:c(tt("0xed")),stack:c(tt("0x1d4")),slice:c(tt("0x13f")),color:c(tt("0x82")),material:l(tt("0x14c")),fill:c(tt("0x1d5")),outline:c(tt("0x7c")),outlineColor:c(tt("0x1d6")),outlineWidth:c(tt("0x1d7")),shadows:c(tt("0x1d8")),distanceDisplayCondition:c(tt("0x1d9"))}),h[tt("0xa4")][tt("0x57")]=function(t){return a(t)?(t[tt("0x114")]=this[tt("0x114")],t[tt("0xed")]=this[tt("0xed")],t[tt("0x1d4")]=this[tt("0x1d4")],t[tt("0x13f")]=this[tt("0x13f")],t[tt("0x7a")]=this[tt("0x7a")],t[tt("0x14c")]=this[tt("0x14c")],t[tt("0x82")]=this[tt("0x82")],t[tt("0x1d5")]=this[tt("0x1d5")],t[tt("0x7c")]=this[tt("0x7c")],t[tt("0x1d6")]=this[tt("0x1d6")],t[tt("0x1d7")]=this[tt("0x1d7")],t[tt("0x1d8")]=this[tt("0x1d8")],t[tt("0x1d9")]=this[tt("0x1d9")],t[tt("0x1da")]=this[tt("0x1da")],t):new h(this)},h[tt("0xa4")][tt("0x1d3")]=function(t){if(!a(t))throw new o(tt("0x1db"));this[tt("0x114")]=n(this[tt("0x114")],t[tt("0x114")]),this[tt("0xed")]=n(this[tt("0xed")],t[tt("0xed")]),this[tt("0x1d4")]=n(this[tt("0x1d4")],t[tt("0x1d4")]),this[tt("0x13f")]=n(this[tt("0x13f")],t[tt("0x13f")]),this[tt("0x7a")]=n(this[tt("0x7a")],t[tt("0x7a")]),this[tt("0x82")]=n(this[tt("0x82")],t[tt("0x82")]),this[tt("0x14c")]=n(this[tt("0x14c")],t[tt("0x14c")]),this[tt("0x1d5")]=n(this[tt("0x1d5")],t[tt("0x1d5")]),this[tt("0x7c")]=n(this[tt("0x7c")],t[tt("0x7c")]),this[tt("0x1d6")]=n(this[tt("0x1d6")],t[tt("0x1d6")]),this[tt("0x1d7")]=n(this[tt("0x1d7")],t[tt("0x1d7")]),this[tt("0x1d8")]=n(this[tt("0x1d8")],t[tt("0x1d8")]),this[tt("0x1d9")]=n(this[tt("0x1d9")],t[tt("0x1d9")]),this[tt("0x1da")]=n(this[tt("0x1da")],t[tt("0x1da")])},e[tt("0x1dc")]=h},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0});var n=i(5);Object[tt("0x1dd")](n)[tt("0xae")](function(t){t!==tt("0x131")&&t!==tt("0x1e")&&Object[tt("0x1d")](e,t,{enumerable:!0,get:function(){return n[t]}})})},function(t,e,i){var n=i(0),a=i(10),r=i(11),o=i(1),s=i(2),l=i(3),i=i(12),n=($.Scene[tt("0x12b")]=n[tt("0x12b")],$.Scene[tt("0x1de")]=a[tt("0x1de")],$.Scene[tt("0x1df")]=r[tt("0x1df")],$.Scene[tt("0x1b1")]=o[tt("0x1b1")],$.Scene[tt("0x1b7")]=s[tt("0x1b7")],$.Scene[tt("0x1dc")]=l[tt("0x1dc")],$.Scene[tt("0x1e0")]=i[tt("0x1e0")],$[tt("0x1e1")]),c=n[tt("0x1e2")];n[tt("0x1e2")]=function(t,e,i){var n=i[tt("0xab")];return c(t,e,i)[tt("0x18e")]([new r[tt("0x1df")](t,n)])}},function(t,e){t[tt("0x12d")]=tt("0x1e3")},function(t,e){t[tt("0x12d")]=tt("0x1e4")},function(t,e){t[tt("0x12d")]=tt("0x1e5")},function(t,e){t[tt("0x12d")]=tt("0x1e6")},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0});var n=$[tt("0x79")],a=$[tt("0x2d")],r=Object[tt("0xa3")],o=$[tt("0x134")],s=$[tt("0x1b8")],l=$[tt("0x1b9")],c=$[tt("0x1ba")];function h(t){this[tt("0x78")]=void 0,this[tt("0x115")]=void 0,this[tt("0x145")]=void 0,this[tt("0x147")]=void 0,this[tt("0x1e7")]=void 0,this[tt("0x1e8")]=void 0,this[tt("0x1e9")]=void 0,this[tt("0x1ea")]=void 0,this[tt("0x14f")]=void 0,this[tt("0x1eb")]=void 0,this[tt("0x1ec")]=void 0,this[tt("0x1ed")]=void 0,this[tt("0x1ee")]=void 0,this[tt("0x1ef")]=void 0,this[tt("0x15c")]=void 0,this[tt("0x1d1")]=void 0,this[tt("0x1f0")]=void 0,this[tt("0x1f1")]=void 0,this[tt("0x1f2")]=void 0,this[tt("0x1f3")]=void 0,this[tt("0x1d0")]=new s,this[tt("0x1d3")](n(t,n[tt("0x13e")]))}r(h[tt("0xa4")],{definitionChanged:{get:function(){return this[tt("0x1d0")]}},show:c(tt("0x7a")),radius:c(tt("0xed")),xHalfAngle:c(tt("0x144")),yHalfAngle:c(tt("0x146")),lineColor:c(tt("0x86")),showSectorLines:c(tt("0x149")),showSectorSegmentLines:c(tt("0x14a")),showLateralSurfaces:c(tt("0x14b")),material:l(tt("0x14c")),showDomeSurfaces:c(tt("0x154")),showDomeLines:c(tt("0x1f4")),showIntersection:c(tt("0x158")),intersectionColor:c(tt("0x159")),intersectionWidth:c(tt("0x15a")),showThroughEllipsoid:c(tt("0x15b")),gaze:c(tt("0x1da")),showScanPlane:c(tt("0x15d")),scanPlaneColor:c(tt("0x15e")),scanPlaneMode:c(tt("0x15f")),scanPlaneRate:c(tt("0x161"))}),h[tt("0xa4")][tt("0x57")]=function(t){return(t=a(t)?t:new h)[tt("0x7a")]=this[tt("0x7a")],t[tt("0xed")]=this[tt("0xed")],t[tt("0x144")]=this[tt("0x144")],t[tt("0x146")]=this[tt("0x146")],t[tt("0x86")]=this[tt("0x86")],t[tt("0x149")]=this[tt("0x149")],t[tt("0x14a")]=this[tt("0x14a")],t[tt("0x14b")]=this[tt("0x14b")],t[tt("0x14c")]=this[tt("0x14c")],t[tt("0x154")]=this[tt("0x154")],t[tt("0x157")]=this[tt("0x157")],t[tt("0x158")]=this[tt("0x158")],t[tt("0x159")]=this[tt("0x159")],t[tt("0x15a")]=this[tt("0x15a")],t[tt("0x15b")]=this[tt("0x15b")],t[tt("0x1da")]=this[tt("0x1da")],t[tt("0x15d")]=this[tt("0x15d")],t[tt("0x15e")]=this[tt("0x15e")],t[tt("0x15f")]=this[tt("0x15f")],t[tt("0x161")]=this[tt("0x161")],t},h[tt("0xa4")][tt("0x1d3")]=function(t){if(!a(t))throw new o(tt("0x1db"));this[tt("0x7a")]=n(this[tt("0x7a")],t[tt("0x7a")]),this[tt("0xed")]=n(this[tt("0xed")],t[tt("0xed")]),this[tt("0x144")]=n(this[tt("0x144")],t[tt("0x144")]),this[tt("0x146")]=n(this[tt("0x146")],t[tt("0x146")]),this[tt("0x86")]=n(this[tt("0x86")],t[tt("0x86")]),this[tt("0x149")]=n(this[tt("0x149")],t[tt("0x149")]),this[tt("0x14a")]=n(this[tt("0x14a")],t[tt("0x14a")]),this[tt("0x14b")]=n(this[tt("0x14b")],t[tt("0x14b")]),this[tt("0x14c")]=n(this[tt("0x14c")],t[tt("0x14c")]),this[tt("0x154")]=n(this[tt("0x154")],t[tt("0x154")]),this[tt("0x157")]=n(this[tt("0x157")],t[tt("0x157")]),this[tt("0x158")]=n(this[tt("0x158")],t[tt("0x158")]),this[tt("0x159")]=n(this[tt("0x159")],t[tt("0x159")]),this[tt("0x15a")]=n(this[tt("0x15a")],t[tt("0x15a")]),this[tt("0x15b")]=n(this[tt("0x15b")],t[tt("0x15b")]),this[tt("0x1da")]=n(this[tt("0x1da")],t[tt("0x1da")]),this[tt("0x15d")]=n(this[tt("0x15d")],t[tt("0x15d")]),this[tt("0x15e")]=n(this[tt("0x15e")],t[tt("0x15e")]),this[tt("0x15f")]=n(this[tt("0x15f")],t[tt("0x15f")]),this[tt("0x161")]=n(this[tt("0x161")],t[tt("0x161")])},e[tt("0x1de")]=h},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0}),e[tt("0x1df")]=void 0;var v=i(0),n=$[tt("0x1f5")],y=$[tt("0x9")],b=$[tt("0x83")],C=$[tt("0x2d")],a=$[tt("0x133")],w=$[tt("0x134")],I=$[tt("0x22")],_=$[tt("0x11")],A=$[tt("0x29")],G=$[tt("0x1f6")],P=$[tt("0xc2")],W=new I,M=(new _,new y),S=new y,Z=new A,V=new y,R=new A;function c(t,e,i){var n=e[t.id];C(n)&&(n=n[tt("0x2f")],i[tt("0xd2")](n),n[tt("0x1f7")]()||n[tt("0xb0")](),delete e[t.id])}function r(t,e){if(!C(t))throw new w(tt("0x1f8"));if(!C(e))throw new w(tt("0x1f9"));e[tt("0x1fa")][tt("0x1fb")](r[tt("0xa4")][tt("0x1fc")],this),this[tt("0x1fd")]=t,this[tt("0x1fe")]=t[tt("0x9d")],this[tt("0x1ff")]=e,this[tt("0x200")]={},this[tt("0x201")]=new n,this[tt("0x1fc")](e,e[tt("0x4")],[],[])}r[tt("0xa4")][tt("0xdb")]=function(t){if(!C(t))throw new w(tt("0x202"));for(var e=this[tt("0x201")][tt("0x4")],i=this[tt("0x200")],n=this[tt("0x1fe")],a=0,r=e[tt("0x2")];a<r;a++){var o,s,l,c=e[a],h=c[tt("0x203")],d=i[c.id],u=c[tt("0x204")]&&c[tt("0x205")](t)&&P[tt("0x206")](h[tt("0x78")],t,!0);if(u&&(o=P[tt("0xc3")](c[tt("0x74")],t,M),g=P[tt("0xc3")](c[tt("0x207")],t,Z),f=P[tt("0xc3")](h[tt("0x115")],t),s=P[tt("0xc3")](h[tt("0x145")],t),l=P[tt("0xc3")](h[tt("0x147")],t),u=C(o)&&C(s)&&C(l)),u){u=C(d)?d[tt("0x2f")]:void 0,c=(C(u)||((u=new v[tt("0x12b")]).id=c,n[tt("0x9e")](u),i[c.id]=d={primitive:u,position:void 0,orientation:void 0}),P[tt("0xc3")](h[tt("0x1d1")],t));if(C(c)){var x=P[tt("0xc3")](c[tt("0x74")],t,S);if(!C(o)||!C(x))continue;var p=y[tt("0xb")](o,x,V),m=y[tt("0x208")]($[tt("0x9")][tt("0x209")],p),p=y[tt("0xc")]($[tt("0x9")][tt("0x209")],p,V),g=A[tt("0x20a")](p,m-Math.PI,R),f=y[tt("0x11d")](o,x);u[tt("0x140")]=_[tt("0x21")](I[tt("0x23")](g,W),o,u[tt("0x140")])}else y[tt("0xba")](o,d[tt("0x3")])&&A[tt("0xba")](g,d[tt("0xc1")])||(C(g)?(u[tt("0x140")]=_[tt("0x21")](I[tt("0x23")](g,W),o,u[tt("0x140")]),d[tt("0x3")]=y[tt("0x57")](o,d[tt("0x3")]),d[tt("0xc1")]=A[tt("0x57")](g,d[tt("0xc1")])):(u[tt("0x140")]=$[tt("0x24")][tt("0x25")](o),d[tt("0x3")]=y[tt("0x57")](o,d[tt("0x3")])));u[tt("0x7a")]=!0,u[tt("0x1da")]=c,u[tt("0xed")]=f,u[tt("0x144")]=s,u[tt("0x146")]=l,u[tt("0x86")]=P[tt("0x206")](h[tt("0x1e7")],t,b[tt("0x148")]),u[tt("0x149")]=P[tt("0x206")](h[tt("0x1e8")],t,!0),u[tt("0x14a")]=P[tt("0x206")](h[tt("0x1e9")],t,!0),u[tt("0x14b")]=P[tt("0x206")](h[tt("0x1ea")],t,!0),u[tt("0x14c")]=G[tt("0xbf")](t,h[tt("0x14f")],u[tt("0x14c")]),u[tt("0x154")]=P[tt("0x206")](h[tt("0x1eb")],t,!0),u[tt("0x157")]=P[tt("0x206")](h[tt("0x1ec")],t,!0),u[tt("0x158")]=P[tt("0x206")](h[tt("0x1ed")],t,!0),u[tt("0x159")]=P[tt("0x206")](h[tt("0x1ee")],t,b[tt("0x148")]),u[tt("0x15a")]=P[tt("0x206")](h[tt("0x1ef")],t,1),u[tt("0x15b")]=P[tt("0x206")](h[tt("0x15c")],t,!0),u[tt("0x15f")]=P[tt("0x206")](h[tt("0x1f2")],t),u[tt("0x15e")]=P[tt("0x206")](h[tt("0x1f1")],t,b[tt("0x148")]),u[tt("0x15d")]=P[tt("0x206")](h[tt("0x1f0")],t,!0),u[tt("0x161")]=P[tt("0x206")](h[tt("0x1f3")],t,1)}else C(d)&&(d[tt("0x2f")][tt("0x7a")]=!1)}return!0},r[tt("0xa4")][tt("0x1f7")]=function(){return!1},r[tt("0xa4")][tt("0xb0")]=function(){for(var t=this[tt("0x201")][tt("0x4")],e=this[tt("0x200")],i=this[tt("0x1fe")],n=t[tt("0x2")]-1;-1<n;n--)c(t[n],e,i);return a(this)},r[tt("0xa4")][tt("0x1fc")]=function(t,e,i,n){for(var a,r=this[tt("0x201")],o=this[tt("0x200")],s=this[tt("0x1fe")],l=e[tt("0x2")]-1;-1<l;l--)a=e[l],C(a[tt("0x203")])&&C(a[tt("0x74")])&&r[tt("0x20b")](a.id,a);for(l=n[tt("0x2")]-1;-1<l;l--)a=n[l],C(a[tt("0x203")])&&C(a[tt("0x74")])?r[tt("0x20b")](a.id,a):(c(a,o,s),r[tt("0xd2")](a.id));for(l=i[tt("0x2")]-1;-1<l;l--)c(a=i[l],o,s),r[tt("0xd2")](a.id)},e[tt("0x1df")]=r},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0}),e[tt("0x1e0")]=void 0;var b=i(1),C=i(2),n=i(13),w=($[tt("0x79")],$[tt("0x2d")]),I=($[tt("0x20c")],$[tt("0x24")]),a=$[tt("0x134")],_=($[tt("0x20d")],$[tt("0x83")]),A=$[tt("0x20e")],G=$[tt("0x20f")],P=$[tt("0x9")],W=($[tt("0x138")],$[tt("0x29")]),M=$[tt("0x22")],S=$[tt("0x11")],Z=$[tt("0xc2")];function r(t){var e=this;if(!w(t))throw new a(tt("0x212"));var i=(this[tt("0x213")]=t)[tt("0x6a")],t=(this[tt("0x1fd")]=i,t[tt("0x214")]);this[tt("0x215")]=t,this[tt("0x1fe")]=i[tt("0x9d")],this[tt("0x216")]=void 0,this[tt("0x217")]=void 0,this[tt("0x218")]=[],t[tt("0x219")][tt("0x1fb")](function(){e[tt("0xdb")]()})}$[tt("0x1b8")],$[tt("0x210")],$[tt("0x211")];var V=new M,R=new S,T=new P,F=new P,X=new P,B=new W;r[tt("0xa4")][tt("0x9e")]=function(t){return t instanceof n[tt("0x21a")]||(t=new n[tt("0x21a")](t)),this[tt("0x218")][tt("0x4c")](t),t},r[tt("0xa4")][tt("0xd2")]=function(t){t=this[tt("0x218")][tt("0x21b")](t);-1!==t&&this[tt("0x218")][tt("0xdd")](t,1)},r[tt("0xa4")][tt("0x21c")]=function(){this[tt("0x218")][tt("0x2")]=0},r[tt("0xa4")][tt("0xdb")]=function(){var t=this[tt("0x215")][tt("0x21d")],e=this[tt("0x218")],i=this[tt("0x1fe")],n=this[tt("0x216")],a=this[tt("0x217")],r=[],o=[];w(n)&&i[tt("0x21e")](n),w(a)&&i[tt("0x21e")](a);for(var s=0,l=e[tt("0x2")];s<l;s++){var c=e[s],h=c[tt("0x21f")];if(Z[tt("0x206")](h[tt("0x7a")],t,!0)){var d=h[tt("0x114")],u=h[tt("0xed")],x=h[tt("0x1d4")],p=h[tt("0x13f")];if(w(d)&&Z[tt("0x206")](c[tt("0x7a")],t,!0)){var m=Z[tt("0xc3")](c[tt("0x3")],t,T);if(w(m)){var g,f=h[tt("0x1da")];if(w(f)){var f=Z[tt("0xc3")](f[tt("0x3")],t,F);if(!w(m)||!w(f))continue;var v=P[tt("0xb")](m,f,X),y=P[tt("0x208")]($[tt("0x9")][tt("0x209")],v),v=P[tt("0xc")]($[tt("0x9")][tt("0x209")],v,X),v=W[tt("0x20a")](v,y,B),y=P[tt("0x11d")](m,f),u=1,y=S[tt("0x21")]($[tt("0x22")][tt("0x220")](M[tt("0x23")](v,V),y,V),m,R)}else v=Z[tt("0xc3")](c[tt("0xc1")],t,B),y=w(v)?S[tt("0x21")](M[tt("0x23")](v,V),m,R):I[tt("0x25")](m,void 0,R);w(y)&&(f=c[tt("0x6b")],w(f)||(m=new b[tt("0x1b1")]({vertexFormat:$[tt("0x138")][tt("0x221")],angle:d,radius:u,stackPartitions:x,slicePartitions:p}),c[tt("0x6b")]=b[tt("0x1b1")][tt("0x55")](m),f=c[tt("0x6b")]),x=h[tt("0x82")],p=h[tt("0x7c")],g=h[tt("0x1d7")],w(g)||(g=1),m=h[tt("0x1d6")],w(m)||(m=_[tt("0x148")]),h=new $[tt("0x222")]({geometry:f,modelMatrix:y,attributes:{color:$[tt("0x20d")][tt("0x223")](x)}}),r[tt("0x4c")](h),p)&&(f=c[tt("0xd3")],w(f)||(x=new C[tt("0x1b7")]({vertexFormat:$[tt("0x138")][tt("0x192")],angle:d,radius:u}),c[tt("0xd3")]=C[tt("0x1b7")][tt("0x55")](x),f=c[tt("0xd3")]),h=new $[tt("0x222")]({geometry:f,modelMatrix:y,attributes:{color:$[tt("0x20d")][tt("0x223")](m)}}),o[tt("0x4c")](h))}}}}0<r[tt("0x2")]&&(this[tt("0x216")]=this[tt("0x1fe")][tt("0x9e")](new A({asynchronous:!1,geometryInstances:r,appearance:new G({flat:!1,translucent:!0,closed:!0})}))),0<o[tt("0x2")]&&(this[tt("0x217")]=this[tt("0x1fe")][tt("0x9e")](new A({asynchronous:!1,geometryInstances:o,appearance:new G({flat:!0,translucent:!0,renderState:{lineWidth:this[tt("0x1fd")][tt("0x224")](g)}})})))},e[tt("0x1e0")]=r},function(t,e,i){Object[tt("0x1d")](e,tt("0x1e"),{value:!0}),e[tt("0x21a")]=void 0;var n=i(3),a=$[tt("0x225")],r=$[tt("0x1b8")],o=$[tt("0x226")],i=$[tt("0x1ba")],s=$[tt("0x210")];function l(t){t=t||{},this[tt("0x74")]=void 0,this[tt("0x207")]=void 0,this[tt("0x78")]=void 0;var e=t[tt("0x227")];e instanceof n[tt("0x1dc")]||(e=new n[tt("0x1dc")](e)),this[tt("0x21f")]=e,this[tt("0x1ce")]=new s,this[tt("0x6b")]=void 0,this[tt("0xd3")]=void 0,this[tt("0x1d0")]=new r,this[tt("0x1d3")](t)}$[tt("0x211")],Object[tt("0xa3")](l[tt("0xa4")],{position:i(tt("0x3"),void 0,function(t){return new o(t)}),orientation:i(tt("0xc1")),show:i(tt("0x7a"))}),l[tt("0xa4")][tt("0x1d3")]=function(t){this[tt("0x3")]=t[tt("0x3")],this[tt("0xc1")]=t[tt("0xc1")],this[tt("0x7a")]=t[tt("0x7a")]},l[tt("0xa4")][tt("0x228")]=function(t){t instanceof a&&(this[tt("0x21f")][tt("0x1da")]=t)},e[tt("0x21a")]=l}],a={},n.m=i,n.c=a,n.d=function(t,e,i){n.o(t,e)||Object[tt("0x1d")](t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t[tt("0x1e")]?function(){return t[tt("0x131")]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object[tt("0xa4")][tt("0xa0")][tt("0x130")](t,e)},n.p="",n(n.s=4);function n(t){var e;return(a[t]||(e=a[t]={i:t,l:!1,exports:{}},i[t][tt("0x130")](e[tt("0x12d")],e,e[tt("0x12d")],n),e.l=!0,e))[tt("0x12d")]}var i,a},typeof R===tt("0x12c")&&typeof module===tt("0x12c")?module[tt("0x12d")]=e():typeof define===tt("0xbe")&&define[tt("0x12e")]?define([],e):typeof R===tt("0x12c")?R[tt("0x12f")]=e():t[tt("0x12f")]=e())}(),t[tt("0x256")]=!0}let n=null;function $(t,e){t&&(this._viewer=t,n=e,q(Window,n),this._customPluginLayer=new n.CustomDataSource("_customPluginLayer"),t)&&t.dataSources.add(this._customPluginLayer)}$.prototype={createRectangularSensorGraphics:function(t){var e,i;if(this._customPluginLayer&&t)return e=new n.HeadingPitchRoll(n.Math.toRadians(t.heading||90),n.Math.toRadians(t.pitch||0),n.Math.toRadians(t.roll||0)),i=t.position,this._customPluginLayer.entities.add({position:i,orientation:n.Transforms.headingPitchRollQuaternion(i,e),rectangularSensor:new n.Scene.RectangularSensorGraphics({radius:t.radius||1e5,xHalfAngle:n.Math.toRadians(t.xHalfAngle||45),yHalfAngle:n.Math.toRadians(t.yHalfAngle||45),material:t.material||new n.Color(1,0,1,.4),lineColor:t.lineColor||new n.Color(1,0,1,1),showScanPlane:t.showScanPlane||!0,scanPlaneColor:t.scanPlaneColor||new n.Color(1,0,1,1),scanPlaneMode:t.scanPlaneMode||"vertical",scanPlaneRate:t.scanPlaneRate||3,showThroughEllipsoid:t.showThroughEllipsoid||!1,show:!0})})},createSatelliteCoverageSimulationGraphics:function(t){if(t)return new n.Scene.SatelliteCoverageSimulation(this._viewer,{position:t.position,angle1:t.angle1||30,angle2:t.angle2||45,areaType:t.areaType||2,rotation:{heading:n.Math.toRadians(t.heading||0),pitch:n.Math.toRadians(t.pitch||0),roll:n.Math.toRadians(t.roll||0)},color:t.color||{red:.43137254901960786,green:.9607843137254902,blue:0,alpha:.8}})},createRadarPrimitive:function(t){if(t)return new n.Scene.RadarPrimitiveRight(this._viewer,{position:t.position,angle:t.angle||80,radius:t.radius||7e5,rotation:{heading:n.Math.toRadians(t.heading||0),pitch:n.Math.toRadians(t.pitch||40),roll:n.Math.toRadians(t.roll||0)},color:t.color||{red:1,green:0,blue:0,alpha:.4},lineColor:t.lineColor||{red:1,green:1,blue:1,alpha:.9}})}};let s,m,g=null,v={},w="move",A=null;function et(t,e){t&&(this._viewer=t,A=t,g=e,this._installFileDragDropHandler())}et.prototype={_installFileDragDropHandler(){function i(t,e){var i=document.createElement("div");i.id="fileDragDrop",i.classList.add("filedragdrop"),i.innerHTML="请将Json文件拖拽到此区域",this._dragBox=i,this._viewer=e,(this._parentDiv=t).appendChild(i),this.fileDragDropCallBack=void 0,this.callBackParms=void 0}i.prototype.startuploadfile=function(){var i=this,t=i._dragBox,e=null;document.ondragover=function(){clearTimeout(e),e=setTimeout(function(){t.innerHTML="请将文件拖拽到此区域"},200)},t.ondragenter=function(){t.innerHTML="请释放鼠标"},t.ondragover=function(){return!1},t.ondragleave=function(){t.innerHTML="请将文件拖拽到此区域"},t.ondrop=function(t){t.preventDefault();var t=t.dataTransfer.files[0],e=new FileReader;return e.readAsText(t,"UTF-8"),e.onload=function(){var t=JSON.parse(this.result);i.fileDragDropCallBack&&i.fileDragDropCallBack(i.callBackParms,t,i._viewer)},e.onloadstart=function(){},e.onloadend=function(){},e.onabort=function(){alert("读取数据中断")},!(e.onerror=function(){alert("读取数据失败")})}},g.Scene.FileDragDropMixin=function(t){var e=new i(document.querySelector(".cesium-viewer"),t);Object.defineProperties(t,{fileDragDropMixin:{get:function(){return e}}})}},showLoadDataToScenePanel(t){if(t=t||{}){let t=new c.GUI,a=this._viewer,e=t.addFolder("加载数据文件"),i=t=>{let e=document.createElement("input");e.type="file",e.className="datgui_upload",e.onchange=function(){"function"==typeof t&&e.files.length&&t(URL.createObjectURL(e.files[0]))},document.getElementsByTagName("body")&&document.getElementsByTagName("body")[0].appendChild(e),e.click()},n={point:()=>{i(t=>{g.GeoJsonDataSource.load(t).then(function(t){a.dataSources.add(t);for(var e=t.entities.values,i=0;i<e.length;i++){var n=e[i];n.nameID=i,n.point={color:g.Color.BLUE}}a.flyTo(t)})})},polyline:()=>{i(t=>{g.GeoJsonDataSource.load(t).then(function(t){a.dataSources.add(t);for(var e=t.entities.values,i=0;i<e.length;i++){var n=e[i];n.nameID=i,n.polyline.width=5,n.polyline.material=new g.PolylineGlowMaterialProperty({glowPower:.1,color:g.Color.ORANGERED.withAlpha(.9)})}a.flyTo(t)})})},polygon:()=>{i(t=>{g.GeoJsonDataSource.load(t).then(function(t){a.dataSources.add(t);for(var e=t.entities.values,i=0;i<e.length;i++){var n=e[i];n.nameID=i,n.polygon.width=10,n.polygon.material=g.Color.BLUE.withAlpha(.9)}a.flyTo(t)})})},model:()=>{i(t=>{a.flyTo(d3kit.createModelGraphics({position:g.Cartesian3.fromDegrees(120.38105869,31.10115627),m_url:t}))})},czml:()=>{i(t=>{a.flyTo(a.dataSources.add(g.CzmlDataSource.load(t)))})},"3dtilset":()=>{i(t=>{a.flyTo(a.scene.primitives.add(new g.Cesium3DTileset({url:t})))})}};e.add(n,"point"),e.add(n,"polyline"),e.add(n,"polygon"),e.add(n,"model"),e.add(n,"czml"),e.add(n,"3dtilset"),e.open()}},showPostProcessStagesPanel(t){t=t||{};let e=null,i=new function(){this.blackAndWhiteShow=!1,this.blackAndWhiteGradations=5,this.brightnessShow=!1,this.brightnessValue=.5,this.nightVisionShow=!1,this.silhouette=!1},n=(t&&t.elementId?(e=new c.GUI({autoPlace:!1}),document.getElementById(t.elementId).appendChild(e.domElement)):e=new c.GUI,this._viewer.scene.postProcessStages),a=n.add(g.PostProcessStageLibrary.createSilhouetteStage()),r=n.add(g.PostProcessStageLibrary.createBlackAndWhiteStage()),o=n.add(g.PostProcessStageLibrary.createBrightnessStage()),s=n.add(g.PostProcessStageLibrary.createNightVisionStage());a.uniforms.color=t.silhouetteColor||g.Color.YELLOW,a.enabled=!1,r.enabled=!1,r.uniforms.gradations=5,o.enabled=!1,o.uniforms.brightness=.5,s.enabled=!1,e.add(i,"blackAndWhiteShow").name("blackAndWhiteShow").onChange(function(t){r.enabled=t}),e.add(i,"blackAndWhiteGradations",0,10,.1).name("blackAndWhiteGradations").onChange(function(t){r.uniforms.gradations=t}),e.add(i,"brightnessShow").name("brightnessShow").onChange(function(t){o.enabled=t}),e.add(i,"brightnessValue",0,10,.1).name("brightnessValue").onChange(function(t){o.uniforms.brightness=t}),e.add(i,"nightVisionShow").name("nightVisionShow").onChange(function(t){s.enabled=t}),e.add(i,"silhouette").name("silhouette").onChange(function(t){a.enabled=t})},showSceneBloomPanel(t){let e=null,i=new function(){this.contrast=128,this.brightness=-.3,this.delta=1,this.gamma=3.5,this.enabled=!1,this.highDynamicRange=!1,this.shadows=!1,this.glowOnly=!1,this.sigma=1,this.stepSize=5},n=(t&&t.elementId?(e=new c.GUI({autoPlace:!1}),document.getElementById(t.elementId).appendChild(e.domElement)):e=new c.GUI,this._viewer),a=(e.__closeButton.innerHTML="收缩面板",n.scene.postProcessStages.bloom);e.add(i,"enabled").name("bloom").onChange(function(t){a.enabled=t}),e.add(i,"glowOnly").name("发光").onChange(function(t){a.uniforms.glowOnly=t}),e.add(i,"enabled").name("启用模糊").onChange(function(t){a.enabled=t}),e.add(i,"contrast",-255,255,.01).name("对比度").onChange(function(t){a.uniforms.contrast=t}),e.add(i,"brightness",-1,1,.01).name("光泽亮度").onChange(function(t){a.uniforms.brightness=t}),e.add(i,"delta",1,5,.01).name("因子").onChange(function(t){a.uniforms.delta=t}),e.add(i,"sigma",1,10,.01).name("sigma").onChange(function(t){a.uniforms.sigma=t}),e.add(i,"stepSize",.1,10).name("stepSize").onChange(function(t){a.uniforms.stepSize=t}),e.add(i,"shadows").name("启用阴影").onChange(function(t){n.shadows=t}),e.add(i,"highDynamicRange").name("高动态范围").onChange(function(t){n.scene.highDynamicRange=t}),e.add(i,"gamma",1,10,.01).name("伽马亮度").onChange(function(t){n.scene.gamma=t})},showPrimitiveMatrixPanel(e){let i=e.primitives._delegate||e.primitives,n=e.primitives,t=(this._viewer,null);e&&e.elementId?(t=new c.GUI({autoPlace:!1}),document.getElementById(e.elementId).appendChild(t.domElement)):t=new c.GUI;var a=t.addFolder("离地高度"),a=(a.add({height:100},"height",0,1e3,1).onChange(function(t){var e=n.boundingSphere,e=g.Cartographic.fromCartesian(e.center),i=g.Cartesian3.fromRadians(e.longitude,e.latitude,0),e=g.Cartesian3.fromRadians(e.longitude,e.latitude,t),t=g.Cartesian3.subtract(e,i,new g.Cartesian3);n.modelMatrix=g.Matrix4.fromTranslation(t)}),a.open(),t.addFolder("缩放大小")),r={"m+Scale":()=>{i.readyPromise.then(t=>{var e=t.root.transform;g.Matrix4.multiplyByUniformScale(e,1.2,e),t.root.transform=e})},"m-Scale":()=>{i.readyPromise.then(t=>{var e=t.root.transform;g.Matrix4.multiplyByUniformScale(e,.8,e),t.root.transform=e})}},r=(a.add(r,"m+Scale"),a.add(r,"m-Scale"),a.open(),{"x+Axis":()=>{var t=g.Matrix4.fromTranslation(new g.Cartesian3(20,0,0));g.Matrix4.multiply(i.modelMatrix,t,i.modelMatrix)},"x-Axis":()=>{var t=g.Matrix4.fromTranslation(new g.Cartesian3(-20,0,0));g.Matrix4.multiply(i.modelMatrix,t,i.modelMatrix)},"y+Axis":()=>{var t=g.Matrix4.fromTranslation(new g.Cartesian3(0,20,0));g.Matrix4.multiply(i.modelMatrix,t,i.modelMatrix)},"y-Axis":()=>{var t=g.Matrix4.fromTranslation(new g.Cartesian3(0,-20,0));g.Matrix4.multiply(i.modelMatrix,t,i.modelMatrix)},"z+Axis":()=>{var t=g.Matrix4.fromTranslation(new g.Cartesian3(0,0,20));g.Matrix4.multiply(i.modelMatrix,t,i.modelMatrix)},"z-Axis":()=>{var t=g.Matrix4.fromTranslation(new g.Cartesian3(0,0,-20));g.Matrix4.multiply(i.modelMatrix,t,i.modelMatrix)}}),a=t.addFolder("矩阵平移");a.add(r,"x+Axis"),a.add(r,"x-Axis"),a.add(r,"y+Axis"),a.add(r,"y-Axis"),a.add(r,"z+Axis"),a.add(r,"z-Axis"),a.open();let o={x:0,y:0,z:0},s={"x+Axis":()=>{o.x+=15,i.readyPromise.then(t=>{var e=g.Matrix3.fromRotationX(g.Math.toRadians(o.x)),e=g.Matrix4.fromRotationTranslation(e),i=g.Transforms.eastNorthUpToFixedFrame(t.boundingSphere.center);g.Matrix4.multiply(i,e,i),t._root.transform=i})},"x-Axis":()=>{o.x-=15,i.readyPromise.then(t=>{var e=g.Matrix3.fromRotationX(g.Math.toRadians(o.x)),e=g.Matrix4.fromRotationTranslation(e),i=g.Transforms.eastNorthUpToFixedFrame(t.boundingSphere.center);g.Matrix4.multiply(i,e,i),t._root.transform=i})},"y+Axis":()=>{o.y+=15,i.readyPromise.then(t=>{var e=g.Matrix3.fromRotationY(g.Math.toRadians(o.y)),e=g.Matrix4.fromRotationTranslation(e),i=g.Transforms.eastNorthUpToFixedFrame(t.boundingSphere.center);g.Matrix4.multiply(i,e,i),t._root.transform=i})},"y-Axis":()=>{o.y-=15,i.readyPromise.then(t=>{var e=g.Matrix3.fromRotationY(g.Math.toRadians(o.y)),e=g.Matrix4.fromRotationTranslation(e),i=g.Transforms.eastNorthUpToFixedFrame(t.boundingSphere.center);g.Matrix4.multiply(i,e,i),t._root.transform=i})},"z+Axis":()=>{o.z+=15,i.readyPromise.then(t=>{var e=g.Matrix3.fromRotationZ(g.Math.toRadians(o.z)),e=g.Matrix4.fromRotationTranslation(e),i=g.Transforms.eastNorthUpToFixedFrame(t.boundingSphere.center);g.Matrix4.multiply(i,e,i),t._root.transform=i})},"z-Axis":()=>{o.z-=15,i.readyPromise.then(t=>{var e=g.Matrix3.fromRotationZ(g.Math.toRadians(o.z)),e=g.Matrix4.fromRotationTranslation(e),i=g.Transforms.eastNorthUpToFixedFrame(t.boundingSphere.center);g.Matrix4.multiply(i,e,i),t._root.transform=i})}},l=t.addFolder("旋转矩阵");l.add(s,"x+Axis"),l.add(s,"x-Axis"),l.add(s,"y+Axis"),l.add(s,"y-Axis"),l.add(s,"z+Axis"),l.add(s,"z-Axis"),l.open(),e.cb&&((r=t.addFolder("获取调整后的模型矩阵")).add({getModelMaterix:()=>{i.readyPromise.then(t=>{t=t.root.transform;e.cb({modelTransformMatrix:t,modelMatrix:n.modelMatrix})})}},"getModelMaterix").name("获取模型矩阵"),r.open()),t.__closeButton.innerHTML="收缩面板"},showLayerParamPanel:function(e,i){if(e){let t=null;i&&i.elementId?(t=new c.GUI({autoPlace:!1}),document.getElementById(i.elementId).appendChild(t.domElement)):t=new c.GUI;var i=new function(){this.alpha=e.alpha,this.brightness=e.brightness,this.contrast=e.contrast,this.gamma=e.gamma,this.hue=e.hue,this.dayAlpha=e.dayAlpha,this.nightAlpha=e.nightAlpha,this.saturation=e.saturation},n=t.addFolder("图层调整");n.add(i,"alpha",0,1,.05).name("透明度").onChange(function(t){e.alpha=t}),n.add(i,"brightness",0,5,.05).name("亮度").onChange(function(t){e.brightness=t}),n.add(i,"contrast",0,5,.05).name("对比").onChange(function(t){e.contrast=t}),n.add(i,"gamma",0,5,.05).name("伽马").onChange(function(t){e.gamma=t}),n.add(i,"hue",0,5,.05).name("色调").onChange(function(t){e.hue=t}),n.add(i,"dayAlpha",0,1,.05).name("白天透明").onChange(function(t){e.dayAlpha=t}),n.add(i,"nightAlpha",0,1,.05).name("夜晚透明").onChange(function(t){e.nightAlpha=t}),n.add(i,"saturation",0,5,.05).name("饱和").onChange(function(t){e.saturation=t}),n.open()}},showLayerSwitchPanel:function(e,i){if(e&&e.length){let t=null;i&&i.elementId?(t=new c.GUI({autoPlace:!1}),document.getElementById(i.elementId).appendChild(t.domElement)):t=new c.GUI;var n=new function(){e.forEach(t=>{this[t.id]=t.show})},a=t.addFolder("图层切换"),r=(e.forEach(e=>{a.add(n,e.id).name(e.name).onChange(function(t){e.show=t})}),new function(){e.forEach(t=>{this[t.id]=t.alpha})}),o=t.addFolder("透明度");e.forEach(e=>{o.add(r,e.id,0,1,.05).name(e.name).onChange(function(t){e.alpha=t})}),a.open(),o.open()}},showSceneEffectEditPanel:function(t){var e,i,n;t=t||{},c.GUI&&this._viewer.scene.colorCorrection&&(n=new c.GUI,(e=this._viewer).scene.lightSource.ambientLightColor=t.ambientLightColor||new g.Color(.3,.3,.3,1),e.scene.colorCorrection.show=t.colorCorrection||!1,e.scene.colorCorrection.saturation=t.saturation||3.1,e.scene.colorCorrection.brightness=t.brightness||1.8,e.scene.colorCorrection.contrast=t.contrast||1.2,e.scene.colorCorrection.hue=t.hue||0,e.scene.bloomEffect.show=t.bloomEffect||!1,e.scene.hdrEnabled=t.hdrEnabled||!0,e.scene.bloomEffect.threshold=t.threshold||1,e.scene.bloomEffect.bloomIntensity=t.bloomIntensity||2,i=new function(){this.bloomEffectShow=t.bloomEffect||!1,this.bloomThreshold=t.threshold||1,this.bloomIntensity=t.bloomIntensity||2,this.ambientLightColor=t.ambientLightColor||.3,this.hdrEnabled=t.hdrEnabled||!0,this.colorCorrectionShow=!1,this.colorCorrectionSaturation=t.saturation||3.1,this.colorCorrectionBrightness=t.brightness||1.8,this.colorCorrectionContrast=t.contrast||1.2,this.colorCorrectionHue=t.hue||0},n=n.addFolder("场景效果"),console.log("sceneEffect:",i),n.add(i,"bloomEffectShow").name("泛光开关").onChange(function(t){e.scene.bloomEffect.show=t,e.scene.bloomEffect.threshold=i.bloomThreshold,e.scene.bloomEffect.bloomIntensity=i.bloomIntensity}),n.add(i,"bloomThreshold",0,1,.1).name("泛光阈值").onChange(function(t){e.scene.bloomEffect.threshold=t}),n.add(i,"bloomIntensity",0,10,.1).name("泛光强度").onChange(function(t){e.scene.bloomEffect.bloomIntensity=t}),n.add(i,"hdrEnabled").name("HDR开关").onChange(function(t){e.scene.hdrEnabled=t}),n.add(i,"colorCorrectionShow").name("颜色校正").onChange(function(t){e.scene.colorCorrection.show=t}),n.add(i,"colorCorrectionSaturation",0,5,.1).name("饱和度").onChange(function(t){e.scene.colorCorrection.saturation=t}),n.add(i,"colorCorrectionBrightness",0,5,.1).name("亮度").onChange(function(t){e.scene.colorCorrection.brightness=t}),n.add(i,"colorCorrectionContrast",0,5,.1).name("对比度").onChange(function(t){e.scene.colorCorrection.contrast=t}),n.add(i,"colorCorrectionHue",0,5,.1).name("色调").onChange(function(t){e.scene.hdrEnabled=t}),n.add(i,"colorCorrectionHue",0,1,.1).name("环境光").onChange(function(t){e.scene.lightSource.ambientLightColor=new g.Color(t,t,t,1)}),n.open())},showEntityOrientationEditPanel:function(i={}){if(i.entity){let e=i.entity;var t=new c.GUI,n=(i&&i.elementId?(t=new c.GUI({autoPlace:!1}),document.getElementById(i.elementId).appendChild(t.domElement)):t=new c.GUI,new function(){this.heading=360,this.pitch=1,this.roll=1}),t=t.addFolder("实体姿态调整"),a=this;t.add(n,"heading",0,360,1).name("角度").onChange(function(t){n.heading=t;t=g.Transforms.headingPitchRollQuaternion(e.position.getValue(a._viewer.clock.currentTime),new g.HeadingPitchRoll(g.Math.toRadians(n.heading),g.Math.toRadians(n.pitch),g.Math.toRadians(n.roll)));e.orientation=t,i.cb&&i.cb({orientation:t})}),t.add(n,"pitch",0,360,1).name("航向").onChange(function(t){n.pitch=t;t=g.Transforms.headingPitchRollQuaternion(e.position.getValue(a._viewer.clock.currentTime),new g.HeadingPitchRoll(g.Math.toRadians(n.heading),g.Math.toRadians(n.pitch),g.Math.toRadians(n.roll)));e.orientation=t,i.cb&&i.cb({orientation:t})}),t.add(n,"roll",0,360,1).name("翻转").onChange(function(t){n.roll=t;t=g.Transforms.headingPitchRollQuaternion(e.position.getValue(a._viewer.clock.currentTime),new g.HeadingPitchRoll(g.Math.toRadians(n.heading),g.Math.toRadians(n.pitch),g.Math.toRadians(n.roll)));e.orientation=t,i.cb&&i.cb({orientation:t})}),t.open()}},definedMouseEvent({targetEntity:t,ctrlFlag:e}){m=t,v=e,this.bindHandelEvent({leftDown:this.defLeftDown,mouseMove:this.defMouseMove,mouseWheel:this.defMouseWheel,leftUp:this.defLeftUp})},defMouseMove(e){if(v.leftDown&&s){let t=A.camera.getPickRay(e.endPosition),a=A.scene.globe.pick(t,A.scene);if(document.body.style.cursor="pointer",s&&s.id&&"move"===w){let t=g.JulianDate.fromDate(new Date),e=m.position.getValue(t),i=g.Cartographic.fromCartesian(e),n=Number(i.height.toFixed(3));m.position=new g.CallbackProperty(()=>{var t=A.scene.globe.ellipsoid.cartesianToCartographic(a),e=g.Math.toDegrees(t.longitude),t=g.Math.toDegrees(t.latitude);return g.Cartesian3.fromDegrees(e,t,n)},!1)}else{var i,n,r;s&&s.id&&"rotate"===w&&(n=g.JulianDate.fromDate(new Date),n=m.position.getValue(n),r=A.scene.camera.pickEllipsoid(e.startPosition),e=A.scene.camera.pickEllipsoid(e.endPosition),i=g.Cartesian3.subtract(n,e,new g.Cartesian3),i=g.Cartesian3.normalize(i,new g.Cartesian3),r=g.Cartesian3.subtract(r,n,new g.Cartesian3),e=g.Cartesian3.subtract(e,n,new g.Cartesian3),n=g.Cartesian3.angleBetween(r,e),r=g.Quaternion.fromAxisAngle(i,100*n),m.orientation=r)}}},defLeftDown(t){s=A.scene.pick(t.position),g.defined(s)&&w?(v.selected=!0,v.leftDown=!0):v.selected=!1},defMouseWheel(n){if(s&&s.id&&"scale"===w){let t=g.JulianDate.fromDate(new Date),e=m.box.dimensions.getValue(t),i=0<n?2:.5;m.box.dimensions=new g.CallbackProperty(()=>g.Cartesian3.multiplyByScalar(e,i,new g.Cartesian3),!1)}},defLeftUp(t){v.leftDown=!1,document.body.style.cursor="default"},manualMoveModel:function(t){w=t,this._viewer.scene.screenSpaceCameraController.enableRotate=!1,this._viewer.scene.screenSpaceCameraController.enableZoom=!0},manualRotateModel:function(t){w=t,this._viewer.scene.screenSpaceCameraController.enableRotate=!1,this._viewer.scene.screenSpaceCameraController.enableZoom=!0},manualScaleModel:function(t){w=t,this._viewer.scene.screenSpaceCameraController.enableZoom=!1}};let G=null;function it(t,e,i){t&&(this._viewer=t,G=e,this._pluginLayer=new G.CustomDataSource("pluginLayer"),t&&t.dataSources.add(this._pluginLayer),this._installPlugin())}it.prototype={_installPlugin:function(){this._installCss3Renderer(),this._installTerrainClipPlan()},_installTerrainClipPlan:function(){function t(t,e){this.viewer=t,this.options=e||{},this._positions=e.positions,this._height=this.options.height||0,this.bottomImg=e.bottomImg,this.wallImg=e.wallImg,this.splitNum=G.defaultValue(e.splitNum,50),this._positions&&0<this._positions.length&&this.updateData(this._positions)}Object.defineProperties(t.prototype,{show:{get:function(){return this._show},set:function(t){this._show=t,this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=t),this._switchExcavate(t)}},height:{get:function(){return this._height},set:function(t){this._height=t,this._updateExcavateDepth(t)}}}),t.prototype.updateData=function(t){var e=[],i=t.length-1,n=new G.Cartesian3,a=0<G.Cartesian3.subtract(t[0],t[1],n).x;this.excavateMinHeight=9999;for(var r=0;r<i;r++){var o=(r+1)%i,s=G.Cartesian3.midpoint(t[r],t[o],new G.Cartesian3),l=G.Cartographic.fromCartesian(t[r]),l=this.viewer.scene.globe.getHeight(l)||l.height;l<this.excavateMinHeight&&(this.excavateMinHeight=l);l=G.Cartesian3.normalize(s,new G.Cartesian3),o=a?G.Cartesian3.subtract(t[r],s,new G.Cartesian3):G.Cartesian3.subtract(t[o],s,new G.Cartesian3),o=(o=G.Cartesian3.normalize(o,o),G.Cartesian3.cross(o,l,new G.Cartesian3)),o=G.Cartesian3.normalize(o,o),l=new G.Plane(o,0),l=G.Plane.getPointDistance(l,s);e.push(new G.ClippingPlane(o,l))}this.viewer.scene.globe.clippingPlanes=new G.ClippingPlaneCollection({planes:e,edgeWidth:1,edgeColor:G.Color.WHITE,enabled:!0}),this._prepareWell(t),this._createWell(this.wellData)},t.prototype.clear=function(){this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=!1,this.viewer.scene.globe.clippingPlanes.removeAll(),this.viewer.scene.globe.clippingPlanes.isDestroyed()||this.viewer.scene.globe.clippingPlanes.destroy()),this.viewer.scene.globe.clippingPlanes=void 0,this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall),delete this.bottomSurface,delete this.wellWall,this.viewer.scene.render()},t.prototype._prepareWell=function(t){var e=this.splitNum,i=t.length;if(0!=i){for(var n=this.excavateMinHeight-this.height,a=[],r=[],o=[],s=0;s<i;s++){var l=s==i-1?0:s+1,c=G.Cartographic.fromCartesian(t[s]),l=G.Cartographic.fromCartesian(t[l]),h=[c.longitude,c.latitude],d=[l.longitude,l.latitude];0==s&&(o.push(new G.Cartographic(h[0],h[1])),r.push(G.Cartesian3.fromRadians(h[0],h[1],n)),a.push(G.Cartesian3.fromRadians(h[0],h[1],0)));for(var u=1;u<=e;u++){var x=G.Math.lerp(h[0],d[0],u/e),p=G.Math.lerp(h[1],d[1],u/e);s==i-1&&u==e||(o.push(new G.Cartographic(x,p)),r.push(G.Cartesian3.fromRadians(x,p,n)),a.push(G.Cartesian3.fromRadians(x,p,0)))}}this.wellData={lerp_pos:o,bottom_pos:r,no_height_top:a}}},t.prototype._createWell=function(r){var o,t;this.viewer.terrainProvider._layers?((o=this)._createBottomSurface(r.bottom_pos),t=G.sampleTerrainMostDetailed(this.viewer.terrainProvider,r.lerp_pos),G.when(t,function(t){for(var e=t.length,i=[],n=0;n<e;n++){var a=G.Cartesian3.fromRadians(t[n].longitude,t[n].latitude,t[n].height);i.push(a)}o._createWellWall(r.bottom_pos,i)})):(this._createBottomSurface(r.bottom_pos),this._createWellWall(r.bottom_pos,r.no_height_top))},t.prototype._getMinHeight=function(e){let i=5e6,n=null;for(let t=0;t<e.length;t++){var a=e[t].z;a<i&&(i=a,n=this._ellipsoidToLonLat(e[t]))}return n.altitude},t.prototype._ellipsoidToLonLat=function(t){var e=this.viewer.scene.globe.ellipsoid,t=new G.Cartesian3(t.x,t.y,t.z),e=e.cartesianToCartographic(t),t=G.Math.toDegrees(e.latitude);return{longitude:G.Math.toDegrees(e.longitude),latitude:t,altitude:e.height}},t.prototype._createBottomSurface=function(e){if(e.length){var i=this._getMinHeight(e),n=[];for(let t=0;t<e.length;t++){var a=this._ellipsoidToLonLat(e[t]);n.push(a.longitude),n.push(a.latitude),n.push(i)}var t=new G.PolygonGeometry({polygonHierarchy:new G.PolygonHierarchy(G.Cartesian3.fromDegreesArrayHeights(n)),perPositionHeight:!0}),t=G.PolygonGeometry.createGeometry(t),r=new G.Material({fabric:{type:"Image",uniforms:{image:this.bottomImg}}}),r=new G.MaterialAppearance({translucent:!1,flat:!0,material:r});this.bottomSurface=new G.Primitive({geometryInstances:new G.GeometryInstance({geometry:t}),appearance:r,asynchronous:!1}),this.viewer.scene.primitives.add(this.bottomSurface)}},t.prototype._createWellWall=function(t,e){var i=this._getMinHeight(t),n=[],a=[];for(let t=0;t<e.length;t++)n.push(this._ellipsoidToLonLat(e[t]).altitude),a.push(i);var t=new G.WallGeometry({positions:e,maximumHeights:n,minimumHeights:a}),t=G.WallGeometry.createGeometry(t),r=new G.Material({fabric:{type:"Image",uniforms:{image:this.wallImg}}}),r=new G.MaterialAppearance({translucent:!1,flat:!0,material:r});this.wellWall=new G.Primitive({geometryInstances:new G.GeometryInstance({geometry:t,attributes:{color:G.ColorGeometryInstanceAttribute.fromColor(G.Color.GREY)},id:"PitWall"}),appearance:r,asynchronous:!1}),this.viewer.scene.primitives.add(this.wellWall)},t.prototype._switchExcavate=function(t){t?(this.viewer.scene.globe.material=G.Material.fromType("WaJue"),this.wellWall.show=!0,this.bottomSurface.show=!0):(this.viewer.scene.globe.material=null,this.wellWall.show=!1,this.bottomSurface.show=!1)},t.prototype._updateExcavateDepth=function(t){this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall);for(var e=this.wellData.lerp_pos,i=[],n=e.length,a=0;a<n;a++)i.push(G.Cartesian3.fromRadians(e[a].longitude,e[a].latitude,this.excavateMinHeight-t));this.wellData.bottom_pos=i,this._createWell(this.wellData),this.viewer.scene.primitives.add(this.bottomSurface),this.viewer.scene.primitives.add(this.wellWall)},G.Scene.TerrainClipPlan=t},buildLightScanGraphics:function(t){if(this._viewer&&t){for(var l=this,e=function(e,t,i){var n,a,r,o,s,l,c=e.positionList,h=0,d=0;function u(t){n=c[t+1][0]-c[t][0],a=c[t+1][1]-c[t][1],r=n/e.number,o=a/e.number,d=0}u(h),t.polygon.hierarchy=new G.CallbackProperty(function(){return Math.abs(s)>=Math.abs(n)&&Math.abs(l)>=Math.abs(a)&&((h+=1)===c.length-1&&(h=0),i[0]=i[0]+s,i[1]=i[1]+l,i[2]=i[2]+s,i[3]=i[3]+l,u(h)),s=d*r,l=d*o,d++,new G.PolygonHierarchy(G.Cartesian3.fromDegreesArrayHeights([e.observer[0],e.observer[1],e.observer[2],i[0]+s,i[1]+l,0,i[2]+s,i[3]+l,0]))},!1)},i=l._getCirclePoints(t.circle[0],t.circle[1],t.circle[2],t.circle[3]),n=function(t,e){for(var i=e.observer[0],n=e.observer[1],a=e.observer[2],r=[],o=0;o<t.length;o++){var s=o===t.length-1?new G.PolygonHierarchy(G.Cartesian3.fromDegreesArrayHeights([i,n,a,t[o].x,t[o].y,0,t[0].x,t[0].y,0])):new G.PolygonHierarchy(G.Cartesian3.fromDegreesArrayHeights([i,n,a,t[o].x,t[o].y,0,t[o+1].x,t[o+1].y,0])),s=l._pluginLayer.entities.add({name:"三角形",polygon:{hierarchy:s,outline:!1,perPositionHeight:!0,material:e.material}});r.push(s)}return r}(i,t),a=0;a<n.length;a++)a!==n.length-1?e(t,n[a],[i[a].x,i[a].y,i[a+1].x,i[a+1].y]):e(t,n[a],[i[a].x,i[a].y,i[0].x,i[0].y]);return n}},buildPathRoaming:function(t){if(this._viewer&&t&&t.paths){for(var e=t.paths,i=this.createGraphics(),n=[],a=0;a<e.length;a++){var r=G.Cartesian3.fromDegrees(Number(e[a].lng),Number(e[a].lat),Number(e[a].alt));n.push(r)}if(i.position=this._createSampledPosition(n),i.name=t.name||"路径漫游",i.availability=new G.TimeIntervalCollection([new G.TimeInterval({start:this.startTime,stop:this.stopTime})]),i.orientation=this._sampleOrientation(),t.polyline){const{width:e,material:a,clampToGround:r,...o}=t.polyline;i.polyline={positions:new G.CallbackProperty(function(){return n},!1),width:e||10,material:a||new G.PolylineGlowMaterialProperty({glowPower:1,color:G.Color.RED}),clampToGround:r||!0,resOpt:o}}return t.model&&(i.model=this.getModelGraphics(t.model)),t.label&&(i.label=this.getLabelGraphics(t)),t.billboard&&(i.billboard=this.getBillboardGraphics(t)),this.droneEntity=i,this._beginRoamTrace(t),this._viewer.entities.add(i)}},_beginRoamTrace(i){this._viewer.clock.onTick.addEventListener(()=>{var t,e;this._viewer.clock.shouldAnimate&&(e=this._viewer.clock.currentTime,t=this.droneEntity.position.getValue(e),e=this.droneEntity.orientation.getValue(e),t)&&e&&(e=G.Matrix4.fromRotationTranslation(G.Matrix3.fromQuaternion(e),t),this._viewer.camera.lookAtTransform(e,i.cameraOffset()))})},_createSampledPosition(e){this.startTime=G.JulianDate.now(),this.stopTime=G.JulianDate.addSeconds(this.startTime,60*e.length,new G.JulianDate),this._viewer.clock.startTime=this.startTime.clone(),this._viewer.clock.stopTime=this.stopTime.clone(),this._viewer.clock.currentTime=this.startTime.clone(),this._viewer.clock.clockRange=G.ClockRange.CLAMPED;var i=new G.SampledPositionProperty;for(let t=0;t<e.length;t++){var n=G.JulianDate.addSeconds(this.startTime,60*t,new G.JulianDate),a=e[t];i.addSample(n,a)}return i},_sampleOrientation(){let a,r,o;return new G.CallbackProperty(t=>{var e=this.droneEntity.position.getValue(t);if(r=this.droneEntity.position.getValue(G.JulianDate.addSeconds(t,1/60,new G.JulianDate)),e&&r){a=e;const t=G.Cartesian3.subtract(r,a,new G.Cartesian3),i=G.Cartesian3.normalize(t,new G.Cartesian3),n=G.Transforms.rotationMatrixFromPositionVelocity(a,i,G.Ellipsoid.WGS84);o=G.Quaternion.fromRotationMatrix(n)}return o},!1)},_installCss3Renderer:function(){function t(t,e){this._scratch=new G.Cartesian2,this._viewer=i,this._scene=i.scene,this._camera=i.camera,this._container=null,this._elements=t,this._isBackHide=e,this.init()}var i;this._viewer&&(i=this._viewer,t.prototype.init=function(){var a=document.createElement("div"),r=(a.className="ys-css3-container",document.getElementById("info-warp").appendChild(a),this._container=a,this._elements.forEach(function(t){a.insertAdjacentHTML("beforeend",t.element)}),this);this._scene.preRender.addEventListener(function(){for(var t=0;t<a.children.length;t++){var e,i=G.Cartesian3.fromDegrees(r._elements[t].position[0],r._elements[t].position[1],r._elements[t].position[2]||0),n=r._scene.cartesianToCanvasCoordinates(i,r._scratch);G.defined(n)&&(a.children[t].style.left=parseFloat(n.x)+parseFloat(r._elements[t].offset[0])+"px",a.children[t].style.top=parseFloat(n.y)+parseFloat(r._elements[t].offset[1])+"px",r._isBackHide)&&(n=r._camera.position,e=r._scene.globe.ellipsoid.cartesianToCartographic(n).height,e+=+r._scene.globe.ellipsoid.maximumRadius,G.Cartesian3.distance(n,i)>e?a.children[t].style.display="none":a.children[t].style.display="block")}})},t.prototype.remove=function(t){this._elements=this._elements.filter(function(t){t.id}),this._container.removeChild(document.getElementById(t))},t.prototype.append=function(t){this._elements.push(t),this._container.insertAdjacentHTML("beforeend",t.element)},t.prototype.removeEntityLayer=function(t){this._viewer.entities.removeById(t+"_1"),this._viewer.entities.removeById(t+"_2"),this._viewer.entities.removeById(t+"_3"),this.remove(t)},t.prototype.addEntityLayer=function(t){var e=t.position[0],i=t.position[1],n=this,a=(setTimeout(function(t){},300),G.Math.toRadians(30)),r=G.Math.toRadians(30),o=t.boxHeight||300,s=t.boxHeightMax||400,l=t.boxHeightDif||10,c=!0;t.boxShow?this._viewer.entities.add({id:t.id+"_1",name:"立方体盒子",position:new G.CallbackProperty(function(){return(o+=l)>=s&&(o=s),G.Cartesian3.fromDegrees(e,i,o/2)},!1),box:{dimensions:new G.CallbackProperty(function(){return(o+=l)>=s&&(o=s,c)&&(c=!1,n.append(t,!0)),new G.Cartesian3(t.boxSide||100,t.boxSide||100,o)},!1),material:t.boxMaterial||G.Color.DEEPSKYBLUE.withAlpha(.5)}}):setTimeout(function(){n.append(t,!0)},100),t.circleShow&&(t.circleSize=t.circleSize||120,this._viewer.entities.add({id:t.id+"_2",name:"椭圆",position:G.Cartesian3.fromDegrees(e,i),ellipse:{semiMinorAxis:new G.CallbackProperty(function(){return.001},!1),semiMajorAxis:new G.CallbackProperty(function(){return.001},!1),material:this.getDfSt(["plugin","Css3Renderer_one"])||"static/data/images/Textures/circle2.png",rotation:new G.CallbackProperty(function(){return a+=.05},!1),stRotation:new G.CallbackProperty(function(){return a+=.05},!1),zIndex:2}}),this._viewer.entities.add({id:t.id+"_3",name:"椭圆",position:G.Cartesian3.fromDegrees(e,i),ellipse:{semiMinorAxis:new G.CallbackProperty(function(){return.001},!1),semiMajorAxis:new G.CallbackProperty(function(){return.001},!1),material:this.getDfSt(["plugin","Css3Renderer_two"])||"static/data/images/Textures/circle1.png",rotation:new G.CallbackProperty(function(){return r-=.03},!1),stRotation:new G.CallbackProperty(function(){return r-=.03},!1),zIndex:3}}))},G.Scene.Css3Renderer=t)}};let P=null;function nt(t,e,i){t&&(P=e,this._analysisLayer=new P.CustomDataSource("analysisLayer"),this.$math3d=new z(t,e),this.$graphics=new y(t,e),t)&&t.dataSources.add(this._analysisLayer)}function at(t){if(t&&t.positions){var e=t.positions,i=t.that,n=[],t=[],a=[],r=i.transformWGS84ToCartesian(e[0]),e=i.transformWGS84ToCartesian(e[1]),n=i.$graphics.createPointsGraphics({point:!0,positions:[r,e]}),o=i.$math3d.getIntersectObj(r,e,n,!0);if(0===o.length)return alert("没有取到相交点 , 请检查是否开启深度检测。"),!1;for(let t=o.length-1;0<=t;t--){const l=o[t];P.defined(l.position)||o.splice(t,1)}if(!P.defined(o[0].position))throw new P.DeveloperError("position is undefined");var s=o[0].position,l=P.Cartesian3.distance(s,e)<5,s=[r,o[0].position],s=i._analysisLayer.entities.add({polyline:{positions:s,width:10,arcType:P.ArcType.NONE,material:new P.PolylineArrowMaterialProperty(P.Color.GREEN)}});t.push(s),l||(s=[o[0].position,e],s=i._analysisLayer.entities.add({polyline:{positions:s,width:10,arcType:P.ArcType.NONE,material:new P.PolylineArrowMaterialProperty(P.Color.RED)}}),t.push(s));for(let t=0;t<o.length;++t){var c,h=o[t].object;h&&(h instanceof P.Cesium3DTileFeature?(a.push(h),h.oldColor=h.color.clone(),h.color=P.Color.fromAlpha(P.Color.YELLOW,h.color.alpha)):h.id instanceof P.Entity&&(c=(h=h.id).polygon||h.polyline,a.push(h),h=c.material.color.getValue(),c.oldColor=h.clone(),c.material=P.Color.fromAlpha(P.Color.YELLOW,h.alpha))),n.push(i._analysisLayer.entities.add({position:o[t].position,ellipsoid:{radii:new P.Cartesian3(.8,.8,.8),material:P.Color.RED}}))}var s=P.Cartographic.fromCartesian(r),t=P.Cartographic.fromCartesian(e),s={longitude:s.longitude/Math.PI*180,latitude:s.latitude/Math.PI*180,height:s.height},t={longitude:t.longitude/Math.PI*180,latitude:t.latitude/Math.PI*180,height:t.height},r=Math.sqrt(Math.pow(r.x-e.x,2)+Math.pow(r.y-e.y,2)+Math.pow(r.z-e.z,2)),e=Math.abs(t.height-s.height),d=Math.sqrt(Math.pow(r,2)+Math.pow(e,2)),l=l?"是":"否",s="起点坐标: ("+s.longitude.toFixed(6)+"°,"+s.latitude.toFixed(6)+"°,"+s.height.toFixed(2)+")\n终点坐标: ("+t.longitude.toFixed(6)+"°,"+t.latitude.toFixed(6)+"°,"+t.height.toFixed(2)+")\n垂直距离: "+e.toFixed(2)+"m\n水平距离: "+r.toFixed(2)+"m\n空间距离: "+d.toFixed(2)+"m\n是否可视: "+l;n&&n[0]&&(n[0].label={text:s,showBackground:!0,font:"14px monospace",fillColor:P.Color.YELLOW,pixelOffset:{x:0,y:-20},verticalOrigin:P.VerticalOrigin.BOTTOM,horizontalOrigin:P.HorizontalOrigin.LEFT})}at.prototype.remove=function(){}}function rt(t){if(!t&&!t.center&&!t.radius&&t.that)return alert("没有获取到分析参数"),!1;var l=t.that,e=this;if(!l._viewer.scene.globe.depthTestAgainstTerrain)return alert("请开启深度检测"),!1;var c=t.viewHeight||10,i=P.Cartographic.fromCartesian(t.center);try{var n=t.radius,a={},r=(a.semiMinorAxis=n,a.semiMajorAxis=n,a.rotation=0,a.center=t.center,a.granularity=Math.PI/45,l.computeEllipseEdgePositions(a));for(let t=0;t<r.outerPositions.length;t+=3){var o=new P.Cartesian3(r.outerPositions[t],r.outerPositions[t+1],r.outerPositions[t+2]),s=P.Cartographic.fromCartesian(o),h=5e-5*Math.PI/180,d=l.computeInterpolateLineCartographic(i,s,h);l.computeCartographicPointsTerrainData(d,function(r){if(0<r.length){let i=!0,n=[],a=[];for(let t=1;t<r.length;t++){let e=!0;if(1<t){var o=new P.Cartographic(r[0].longitude,r[0].latitude,r[0].height+c);if(i)e=l.computeInterpolateIndexLineHeightCartographic(o,r[t],t,t-1).height>=r[t-1].height?i=!0:i=!1;else{var s=l.computeInterpolateIndexLineHeightCartographic(o,r[t],t,t-1);for(let t=0;t<s.length;t++){if(!(s[t].height>=r[t].height)){i=!1,e=!1;break}i=!0,e=!0}}}o=P.Cartesian3.fromRadians(r[t].longitude,r[t].latitude,r[t].height+1);n.push(o),e?(a.push(0),a.push(0),a.push(1)):(a.push(1),a.push(0),a.push(0)),a.push(1)}e._pointsKSYResult=new P.Scene.PointsPrimitive({viewer:l._viewer,Cartesians:n,Colors:a})}else alert("高程异常!")})}}catch(t){console.log(t)}rt.prototype.remove=function(){}}function ot(t){if(t&&t.positions){for(var e=t.positions,i=t.that,n=i.transformWGS84ToCartesian(e[0]),a=i.transformWGS84ToCartesian(e[1]),r=[P.Cartographic.fromCartesian(n)],o=new P.Cartesian3,s=[0],l=[0],c=1;c<=10;c++){P.Cartesian3.lerp(n,a,c/10,o);var h=P.Cartographic.fromCartesian(o),d=i._viewer.scene.globe.getHeight(h),d=(h.height=d,r.push(h),r[c-1]),u=P.Cartesian3.distance(P.Cartographic.toCartesian(d),P.Cartographic.toCartesian(h));l.push(l[c-1]+u),h=Math.asin((h.height-d.height)/u),s.push(100*Math.tan(h))}t=document.createElement("div");t.className="echart-viewer",i._viewer.container.appendChild(t,"dark",{renderer:"canvas",width:640,height:480}),t.style.position="absolute",t.style.left="20px",t.style.bottom="20px",t.style.height="300px",t.style.width="640px",t.style.overflow="hidden",t.style.zIndex="9999",t.style.opacity=.9,x.init(t).setOption({title:{text:"剖面示意图",left:"center",subtext:"",textStyle:{color:"white",fontSize:15}},tooltip:{trigger:"axis"},legend:{data:[""]},toolbox:{show:!1,feature:{mark:{show:!0},dataView:{show:!0,readOnly:!1},magicType:{show:!0,type:["line","bar"]},restore:{show:!0},saveAsImage:{show:!0}}},calculable:!0,xAxis:[{type:"category",name:"长度(米)",boundaryGap:!1,data:l,axisLabel:{textStyle:{color:"white"}},axisLine:{lineStyle:{color:"white"}}}],yAxis:[{type:"value",name:"坡度(%)",axisLabel:{formatter:function(t){return t.toFixed(2)+"%"},textStyle:{color:"white"}},axisLine:{lineStyle:{color:"white"}}}],series:[{name:"坡度",type:"line",areaStyle:{},smooth:!0,data:s,markPoint:{data:[{type:"max",name:"最大值"},{type:"min",name:"最小值"}]},markLine:{data:[{type:"average",name:"平均值"}]}}]})}}function st(t){if(t&&t.positions&&t.that){var e=t.that,i=t.positions,t=this,n=e._viewer.terrainProvider.availability;if(n){for(var a=15e3,r=0;r<i.length;r++){var o=P.Cartographic.fromCartesian(i[r]),s=e._viewer.scene.globe.getHeight(o);s<a&&(a=s),n.computeMaximumLevelAtPosition(o)}var l=Math.PI/Math.pow(2,11);l/=64;for(var c,h,d,u,x,p,m,g,l=new P.PolygonGeometry.fromPositions({positions:i,vertexFormat:P.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,granularity:l}),f=new P.PolygonGeometry.createGeometry(l),v=0,y=0,b=new P.Cartesian3,r=0;r<f.indices.length;r+=3){c=f.indices[r],h=f.indices[r+1],x=f.indices[r+2],p=f.attributes.position.values,b.x=p[3*c],b.y=p[3*c+1],b.z=p[3*c+2],o=P.Cartographic.fromCartesian(b),c=e._viewer.scene.globe.getHeight(o),d=P.Cartesian3.fromRadians(o.longitude,o.latitude,c),m=P.Cartesian3.fromRadians(o.longitude,o.latitude,0),y<c&&(y=c),b.x=p[3*h],b.y=p[3*h+1],b.z=p[3*h+2],o=P.Cartographic.fromCartesian(b),h=e._viewer.scene.globe.getHeight(o),u=P.Cartesian3.fromRadians(o.longitude,o.latitude,h),w=P.Cartesian3.fromRadians(o.longitude,o.latitude,0),y<h&&(y=h),b.x=p[3*x],b.y=p[3*x+1],b.z=p[3*x+2],o=P.Cartographic.fromCartesian(b),p=e._viewer.scene.globe.getHeight(o),x=P.Cartesian3.fromRadians(o.longitude,o.latitude,p),g=P.Cartesian3.fromRadians(o.longitude,o.latitude,0),y<p&&(y=p),m=m,w=w,g=g,C=void 0,C=P.Cartesian3.distance(m,w),w=P.Cartesian3.distance(w,g),g=P.Cartesian3.distance(g,m),m=(C+w+g)/2,v+=Math.sqrt(m*(m-C)*(m-w)*(m-g))*(c-a+h-a+p-a)/3;var C=[],w=(C.push(d),C.push(u),C.push(x),{polygon:{hierarchy:{positions:C},extrudedHeight:0,perPositionHeight:!0,material:P.Color.fromRandom().withAlpha(.5),outline:!0,closeTop:!0,closeBottom:!0,outlineColor:P.Color.WHITE,outlineWidth:2}});e._analysisLayer.entities.add(w)}l=function(t){for(var e=[],i=[],n=0;n<t.length;n++){var a=P.Cartographic.fromCartesian(t[n]);e.push(a.longitude),i.push(a.latitude)}for(var r,o,s,l=0,c=0,h=0,d=0,u=0,n=0;n<t.length;n++)h+=s=(r=e[n])*(c=n==t.length-1?(l=e[0],i[0]):(l=e[n+1],i[n+1]))-l*(o=i[n]),d+=(r+l)*s,u+=(o+c)*s;return d/=6*(h*=.5),u/=6*h,new P.Cartographic(d,u)}(i),t._volumeLabel=e._analysisLayer.entities.add({position:P.Cartesian3.fromRadians(l.longitude,l.latitude,y+1e3),label:{text:"Cut Volume "+v.toString()+"m3"}})}else alert("未获取到地形")}}nt.prototype={createVisibilityAnalysis:function(i){i=i||{};var n=this;n.drawLineGraphics({type:"straightLine",clampToGround:!1,callback:function(t,e){t=new at({positions:t,that:n});n._graphicsLayer&&n._graphicsLayer.entities.remove(e),"function"==typeof i.callback&&i.callback(t)}})},createLookAroundAnalysis:function(i){var n;i=i||{},this._viewer&&i&&(n=this).drawCircleGraphics({callback:function(t,e){n._drawLayer.entities.remove(e);e=new rt({that:n,radius:t.radius,center:t.center});"function"==typeof i.callback&&i.callback(e)}})},createVisualFieldAnalysis:function(t){var i,n;t=t||{},this._viewer&&t&&(n=null,(i=this).bindHandelEvent({leftClick:function(t,e){t=i._viewer.scene.pickPosition(t.position);if(!t)return!1;P.defined(n)?e.destroy():(n=new P.Scene.ShadowPrimitive({scene:i._viewer.scene,viewerPosition:t}),i._analysisLayer._primitives.add(n))},mouseMove:function(t){t=i._viewer.scene.pickPosition(t.endPosition);if(!t)return!1;n&&n.setPoseByTargetPoint(t)}}))},createClipPlanAnalysis:function(i){var n,a,r,o,s;i=i||{},this._viewer&&i&&(n=this,a=i.height||30,r=i.splitNum||50,o=i.wallImg||this.getDfSt(["amalysis","createClipPlanAnalysis_wallImg"])||"static/data/images/file/excavate_side_min.jpg",s=i.bottomImg||this.getDfSt(["amalysis","createClipPlanAnalysis_bottomImg"])||"static/data/images/file/excavate_bottom_min.jpg",n.drawPolygonGraphics({callback:function(t,e){n._drawLayer.entities.remove(e);e=new P.Scene.TerrainClipPlan(n._viewer,{height:a,splitNum:r,wallImg:o,bottomImg:s}),t=n.transformWGS84ArrayToCartesianArray(t);e.updateData(t),"function"==typeof i.callback&&i.callback(e)}}))},createSubmergedAnalysis:function(t){var e,n,a,r,o;t=t||{},this._viewer&&t&&(n=t.maxH||15,a=t.speed||1,r=t.interval||10,o=(e=this).getDfSt(["amalysis","createSubmergedAnalysis"])||"static/data/images/file/water.png",e.drawPolygonGraphics({height:1,callback:function(t,i){if(!e._viewer.scene.globe.depthTestAgainstTerrain)return alert("请开启深度检测"),!1;i&&setTimeout(()=>{i.polygon.heightReference="CLAMP_TO_GROUND",i.polygon.material=o;var t=0,e=(i.polygon.extrudedHeight=t,setInterval(function(){(t+=a)>=n&&(t=n,clearTimeout(e)),i.polygon.extrudedHeight=t},r))},2e3)}}))},createSlopeAnalysis:function(i){if(i=i||{},!x)return alert("需要引入echarts库"),!1;var n=this;this._viewer&&i&&n.drawLineGraphics({type:"straightLine",clampToGround:!1,callback:function(t,e){t=new ot({positions:t,that:n});n._graphicsLayer&&n._graphicsLayer.entities.remove(e),"function"==typeof i.callback&&i.callback(t)}})},createCutVolumeAnalysis:function(e){var i;e=e||{},this._viewer&&e&&(i=this).drawWallGraphics({callback:function(t){t=new st({positions:i.transformWGS84ArrayToCartesianArray(t,100),that:i});"function"==typeof e.callback&&e.callback(t)}})}};var W={version:"1.0.0",PlotUtils:{}},M=(W.PlotUtils.distance=function(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))},W.PlotUtils.wholeDistance=function(t){for(var e=0,i=0;i<t.length-1;i++)e+=W.PlotUtils.distance(t[i],t[i+1]);return e},W.PlotUtils.getBaseLength=function(t){return Math.pow(W.PlotUtils.wholeDistance(t),.99)},W.PlotUtils.mid=function(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]},W.PlotUtils.getCircleCenterOfThreePoints=function(t,e,i){var n=[(t[0]+e[0])/2,(t[1]+e[1])/2],e=[n[0]-t[1]+e[1],n[1]+t[0]-e[0]],a=[(t[0]+i[0])/2,(t[1]+i[1])/2],t=[a[0]-t[1]+i[1],a[1]+t[0]-i[0]];return W.PlotUtils.getIntersectPoint(n,e,a,t)},W.PlotUtils.getIntersectPoint=function(t,e,i,n){var a,r,o;return t[1]==e[1]?[(a=(n[0]-i[0])/(n[1]-i[1]))*(t[1]-i[1])+i[0],r=t[1]]:i[1]==n[1]?[(o=(e[0]-t[0])/(e[1]-t[1]))*(i[1]-t[1])+t[0],r=i[1]]:(o=(e[0]-t[0])/(e[1]-t[1]),a=(n[0]-i[0])/(n[1]-i[1]),[o*(r=(o*t[1]-t[0]-a*i[1]+i[0])/(o-a))-o*t[1]+t[0],r])},W.PlotUtils.getAzimuth=function(t,e){var i,n=Math.asin(Math.abs(e[1]-t[1])/W.PlotUtils.distance(t,e));return e[1]>=t[1]&&e[0]>=t[0]?i=n+Math.PI:e[1]>=t[1]&&e[0]<t[0]?i=W.Constants.TWO_PI-n:e[1]<t[1]&&e[0]<t[0]?i=n:e[1]<t[1]&&e[0]>=t[0]&&(i=Math.PI-n),i},W.PlotUtils.getAngleOfThreePoints=function(t,e,i){t=W.PlotUtils.getAzimuth(e,t)-W.PlotUtils.getAzimuth(e,i);return t<0?t+W.Constants.TWO_PI:t},W.PlotUtils.isClockWise=function(t,e,i){return(i[1]-t[1])*(e[0]-t[0])>(e[1]-t[1])*(i[0]-t[0])},W.PlotUtils.getPointOnLine=function(t,e,i){return[e[0]+t*(i[0]-e[0]),e[1]+t*(i[1]-e[1])]},W.PlotUtils.getCubicValue=function(t,e,i,n,a){var r=1-(t=Math.max(Math.min(t,1),0)),o=t*t,s=o*t,l=r*r,c=l*r;return[c*e[0]+3*l*t*i[0]+3*r*o*n[0]+s*a[0],c*e[1]+3*l*t*i[1]+3*r*o*n[1]+s*a[1]]},W.PlotUtils.getThirdPoint=function(t,e,i,n,a){t=W.PlotUtils.getAzimuth(t,e),a=a?t+i:t-i,t=n*Math.cos(a),i=n*Math.sin(a);return[e[0]+t,e[1]+i]},W.PlotUtils.getArcPoints=function(t,e,i,n){for(var a=[],r=(r=n-i)<0?r+W.Constants.TWO_PI:r,o=0;o<=W.Constants.FITTING_COUNT;o++){var s=i+r*o/W.Constants.FITTING_COUNT,l=t[0]+e*Math.cos(s),s=t[1]+e*Math.sin(s);a.push([l,s])}return a},W.PlotUtils.getBisectorNormals=function(t,e,i,n){var a,r,o=W.PlotUtils.getNormal(e,i,n),s=Math.sqrt(o[0]*o[0]+o[1]*o[1]),l=o[0]/s,o=o[1]/s,c=W.PlotUtils.distance(e,i),h=W.PlotUtils.distance(i,n),s=s>W.Constants.ZERO_TOLERANCE?W.PlotUtils.isClockWise(e,i,n)?(a=[i[0]-(r=t*c)*o,i[1]+r*l],[i[0]+(r=t*h)*o,i[1]-r*l]):(a=[i[0]+(r=t*c)*o,i[1]-r*l],[i[0]-(r=t*h)*o,i[1]+r*l]):(a=[i[0]+t*(e[0]-i[0]),i[1]+t*(e[1]-i[1])],[i[0]+t*(n[0]-i[0]),i[1]+t*(n[1]-i[1])]);return[a,s]},W.PlotUtils.getNormal=function(t,e,i){var n=t[0]-e[0],t=t[1]-e[1],a=Math.sqrt(n*n+t*t),a=(n/=a,t/=a,i[0]-e[0]),i=i[1]-e[1],e=Math.sqrt(a*a+i*i);return[n+(a/=e),t+(i/=e)]},W.PlotUtils.getCurvePoints=function(t,e){for(var i=[W.PlotUtils.getLeftMostControlPoint(e)],n=0;n<e.length-2;n++)var a=e[n],r=e[n+1],o=e[n+2],o=W.PlotUtils.getBisectorNormals(t,a,r,o),i=i.concat(o);for(var s=W.PlotUtils.getRightMostControlPoint(e),l=(i.push(s),[]),n=0;n<e.length-1;n++){for(a=e[n],r=e[n+1],l.push(a),t=0;t<W.Constants.FITTING_COUNT;t++){var c=W.PlotUtils.getCubicValue(t/W.Constants.FITTING_COUNT,a,i[2*n],i[2*n+1],r);l.push(c)}l.push(r)}return l},W.PlotUtils.getLeftMostControlPoint=function(e){var i,n,a,r,o,s=e[0],l=e[1],e=e[2],c=W.PlotUtils.getBisectorNormals(0,s,l,e)[0],e=W.PlotUtils.getNormal(s,l,e),e=Math.sqrt(e[0]*e[0]+e[1]*e[1])>W.Constants.ZERO_TOLERANCE?(e=W.PlotUtils.mid(s,l),a=s[0]-e[0],i=s[1]-e[1],n=2/W.PlotUtils.distance(s,l),r=c[0]-e[0],c=c[1]-e[1],o=e[0]+((i=-n*i)*i-(n=n*a)*n)*r+(a=2*i*n)*c,e[1]+a*r+(n*n-i*i)*c):(o=s[0]+t*(l[0]-s[0]),s[1]+t*(l[1]-s[1]));return[o,e]},W.PlotUtils.getRightMostControlPoint=function(e){var i,n,a,r,o,s=e.length,l=e[s-3],c=e[s-2],e=e[s-1],s=W.PlotUtils.getBisectorNormals(0,l,c,e)[1],l=W.PlotUtils.getNormal(l,c,e),l=Math.sqrt(l[0]*l[0]+l[1]*l[1])>W.Constants.ZERO_TOLERANCE?(l=W.PlotUtils.mid(c,e),a=e[0]-l[0],i=e[1]-l[1],n=2/W.PlotUtils.distance(c,e),r=s[0]-l[0],s=s[1]-l[1],o=l[0]+((i=-n*i)*i-(n=n*a)*n)*r+(a=2*i*n)*s,l[1]+a*r+(n*n-i*i)*s):(o=e[0]+t*(c[0]-e[0]),e[1]+t*(c[1]-e[1]));return[o,l]},W.PlotUtils.getBezierPoints=function(t){if(t.length<=2)return t;for(var e=[],i=t.length-1,n=0;n<=1;n+=.01){for(var a=0,r=0,o=0;o<=i;o++){var s=W.PlotUtils.getBinomialFactor(i,o),l=Math.pow(n,o),c=Math.pow(1-n,i-o);a+=s*l*c*t[o][0],r+=s*l*c*t[o][1]}e.push([a,r])}return e.push(t[i]),e},W.PlotUtils.getBinomialFactor=function(t,e){return W.PlotUtils.getFactorial(t)/(W.PlotUtils.getFactorial(e)*W.PlotUtils.getFactorial(t-e))},W.PlotUtils.getFactorial=function(t){if(t<=1)return 1;if(2==t)return 2;if(3==t)return 6;if(4==t)return 24;if(5==t)return 120;for(var e=1,i=1;i<=t;i++)e*=i;return e},W.PlotUtils.getQBSplinePoints=function(t){if(t.length<=2)return t;var e=[],i=t.length-2-1;e.push(t[0]);for(var n=0;n<=i;n++)for(var a=0;a<=1;a+=.05){for(var r=0,o=0,s=0;s<=2;s++){var l=W.PlotUtils.getQuadricBSplineFactor(s,a);r+=l*t[n+s][0],o+=l*t[n+s][1]}e.push([r,o])}return e.push(t[t.length-1]),e},W.PlotUtils.getQuadricBSplineFactor=function(t,e){return 0==t?Math.pow(e-1,2)/2:1==t?(-2*Math.pow(e,2)+2*e+1)/2:2==t?Math.pow(e,2)/2:0},W.Constants={TWO_PI:2*Math.PI,HALF_PI:Math.PI/2,FITTING_COUNT:100,ZERO_TOLERANCE:1e-4},{version:"1.0.0",createTime:"2018.6.19",author:"xupinhui"}),lt="doublearrow",ct={headHeightFactor:.18,headWidthFactor:.3,neckHeightFactor:.85,neckWidthFactor:.15,tailWidthFactor:.1,headTailFactor:.8,swallowTailFactor:1},ht={tailWidthFactor:.15,neckWidthFactor:.2,headWidthFactor:.25,headAngle:Math.PI/8.5,neckAngle:Math.PI/13};M.algorithm={},M.algorithm.doubleArrow=function(t,e){this.connPoint=null;var i={controlPoint:this.tempPoint4=null,polygonalPoint:null};if(!((o=(this.points=t).length)<2)){if(2==o)return t;var n=this.points[0],a=this.points[1],r=this.points[2],o=t.length,o=(this.tempPoint4=3==o?M.algorithm.getTempPoint4(n,a,r):this.points[3],this.connPoint=3==o||4==o?W.PlotUtils.mid(n,a):this.points[4],t=W.PlotUtils.isClockWise(n,a,r)?(h=M.algorithm.getArrowPoints(n,this.connPoint,this.tempPoint4,!1),M.algorithm.getArrowPoints(this.connPoint,a,r,!0)):(h=M.algorithm.getArrowPoints(a,this.connPoint,r,!1),M.algorithm.getArrowPoints(this.connPoint,n,this.tempPoint4,!0)),h.length),s=(o-5)/2,l=h.slice(0,s),c=h.slice(s,5+s),h=h.slice(5+s,o),d=t.slice(0,s),u=t.slice(s,5+s),t=t.slice(5+s,o),d=W.PlotUtils.getBezierPoints(d),s=W.PlotUtils.getBezierPoints(t.concat(l.slice(1))),h=W.PlotUtils.getBezierPoints(h),o=d.concat(u,s,c,h),t=M.algorithm.array2Dto1D(o);i.controlPoint=[n,a,r,this.tempPoint4,this.connPoint],i.polygonalPoint=e.Cartesian3.fromDegreesArray(t)}return i},M.algorithm.threeArrow=function(t){this.connPoint=null,this.tempPoint4=null;var e={controlPoint:this.tempPoint5=null,polygonalPoint:null};if(2<=(r=(this.points=t).length)){if(2==r)return t;var i=this.points[0],n=this.points[1],a=this.points[2],r=(3==(r=t.length)?(this.tempPoint4=M.algorithm.getTempPoint4(i,n,a),this.tempPoint5=W.PlotUtils.mid(a,this.tempPoint4)):(this.tempPoint4=this.points[3],this.tempPoint5=this.points[4]),this.connPoint=r<6?W.PlotUtils.mid(i,n):this.points[5],t=W.PlotUtils.isClockWise(i,n,a)?(c=M.algorithm.getArrowPoints(i,this.connPoint,this.tempPoint4,!1),M.algorithm.getArrowPoints(this.connPoint,n,a,!0)):(c=M.algorithm.getArrowPoints(n,this.connPoint,a,!1),M.algorithm.getArrowPoints(this.connPoint,i,this.tempPoint4,!0)),c.length),o=(r-5)/2,s=c.slice(0,o),l=c.slice(o,5+o),c=c.slice(5+o,r),h=t.slice(0,o),d=t.slice(o,5+o),t=t.slice(5+o,r),h=W.PlotUtils.getBezierPoints(h),o=W.PlotUtils.getBezierPoints(t.concat(s.slice(1))),c=W.PlotUtils.getBezierPoints(c),r=h.concat(d,o,l,c),t=M.algorithm.array2Dto1D(r);e.controlPoint=[i,n,a,this.tempPoint4,this.tempPoint5,this.connPoint],e.polygonalPoint=Cesium.Cartesian3.fromDegreesArray(t)}return e},M.algorithm.array2Dto1D=function(t){var e=[];return t.forEach(function(t){e.push(t[0]),e.push(t[1])}),e},M.algorithm.getArrowPoints=function(t,e,i,n){this.type=lt,this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15;var a=W.PlotUtils.mid(t,e),r=W.PlotUtils.distance(a,i),o=W.PlotUtils.getThirdPoint(i,a,0,.3*r,!0),s=W.PlotUtils.getThirdPoint(i,a,0,.5*r,!0),o=[a,W.PlotUtils.getThirdPoint(a,o,W.Constants.HALF_PI,r/5,n),W.PlotUtils.getThirdPoint(a,s,W.Constants.HALF_PI,r/4,n),i],a=M.algorithm.getArrowHeadPoints(o,this.headHeightFactor,this.headWidthFactor,this.neckHeightFactor,this.neckWidthFactor),s=a[0],r=a[4],n=W.PlotUtils.distance(t,e)/W.PlotUtils.getBaseLength(o)/2,i=M.algorithm.getArrowBodyPoints(o,s,r,n),o=i.length,n=i.slice(0,o/2),i=i.slice(o/2,o);return n.push(s),i.push(r),(n=n.reverse()).push(e),(i=i.reverse()).push(t),n.reverse().concat(a,i)},M.algorithm.getArrowHeadPoints=function(t,e,i){this.type=lt,this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15;var n=W.PlotUtils.getBaseLength(t)*this.headHeightFactor,a=t[t.length-1],e=(W.PlotUtils.distance(e,i),n*this.headWidthFactor),i=n*this.neckWidthFactor,r=n*this.neckHeightFactor,n=W.PlotUtils.getThirdPoint(t[t.length-2],a,0,n,!0),t=W.PlotUtils.getThirdPoint(t[t.length-2],a,0,r,!0),r=W.PlotUtils.getThirdPoint(a,n,W.Constants.HALF_PI,e,!1),n=W.PlotUtils.getThirdPoint(a,n,W.Constants.HALF_PI,e,!0);return[W.PlotUtils.getThirdPoint(a,t,W.Constants.HALF_PI,i,!1),r,a,n,W.PlotUtils.getThirdPoint(a,t,W.Constants.HALF_PI,i,!0)]},M.algorithm.getArrowBodyPoints=function(t,e,i,n){for(var a=W.PlotUtils.wholeDistance(t),r=W.PlotUtils.getBaseLength(t)*n,o=(r-W.PlotUtils.distance(e,i))/2,s=0,l=[],c=[],h=1;h<t.length-1;h++){var d=W.PlotUtils.getAngleOfThreePoints(t[h-1],t[h],t[h+1])/2,u=(r/2-(s+=W.PlotUtils.distance(t[h-1],t[h]))/a*o)/Math.sin(d),x=W.PlotUtils.getThirdPoint(t[h-1],t[h],Math.PI-d,u,!0),d=W.PlotUtils.getThirdPoint(t[h-1],t[h],d,u,!1);l.push(x),c.push(d)}return l.concat(c)},M.algorithm.getTempPoint4=function(t,e,i){var n,a,r,e=W.PlotUtils.mid(t,e),o=W.PlotUtils.distance(e,i),i=W.PlotUtils.getAngleOfThreePoints(t,e,i),o=i<W.Constants.HALF_PI?(n=o*Math.sin(i),a=o*Math.cos(i),r=W.PlotUtils.getThirdPoint(t,e,W.Constants.HALF_PI,n,!1),W.PlotUtils.getThirdPoint(e,r,W.Constants.HALF_PI,a,!0)):i>=W.Constants.HALF_PI&&i<Math.PI?(n=o*Math.sin(Math.PI-i),a=o*Math.cos(Math.PI-i),r=W.PlotUtils.getThirdPoint(t,e,W.Constants.HALF_PI,n,!1),W.PlotUtils.getThirdPoint(e,r,W.Constants.HALF_PI,a,!1)):i>=Math.PI&&i<1.5*Math.PI?(n=o*Math.sin(i-Math.PI),a=o*Math.cos(i-Math.PI),r=W.PlotUtils.getThirdPoint(t,e,W.Constants.HALF_PI,n,!0),W.PlotUtils.getThirdPoint(e,r,W.Constants.HALF_PI,a,!0)):(n=o*Math.sin(2*Math.PI-i),a=o*Math.cos(2*Math.PI-i),r=W.PlotUtils.getThirdPoint(t,e,W.Constants.HALF_PI,n,!0),W.PlotUtils.getThirdPoint(e,r,W.Constants.HALF_PI,a,!1));return o},M.algorithm.tailedAttackArrow=function(t,e){t=M.algorithm.dereplication(t),this.tailWidthFactor=ct.tailWidthFactor,this.swallowTailFactor=ct.swallowTailFactor,this.swallowTailPnt=ct.swallowTailPnt;var i={controlPoint:null,polygonalPoint:null};if(!((i.controlPoint=t).length<2)){if(2==t.length)return i.polygonalPoint=t,i;var n=t[0],a=t[1],t=(W.PlotUtils.isClockWise(t[0],t[1],t[2])&&(n=t[1],a=t[0]),[W.PlotUtils.mid(n,a)].concat(t.slice(2))),r=M.algorithm.getAttackArrowHeadPoints(t,n,a,ct),o=r[0],s=r[4],l=W.PlotUtils.distance(n,a),c=W.PlotUtils.getBaseLength(t),h=c*this.tailWidthFactor*this.swallowTailFactor;this.swallowTailPnt=W.PlotUtils.getThirdPoint(t[1],t[0],0,h,!0);h=M.algorithm.getAttackArrowBodyPoints(t,o,s,l/c),t=h.length,l=[n].concat(h.slice(0,t/2));l.push(o);c=[a].concat(h.slice(t/2,t));c.push(s),l=W.PlotUtils.getQBSplinePoints(l),c=W.PlotUtils.getQBSplinePoints(c),n=M.algorithm.array2Dto1D(l.concat(r,c.reverse(),[this.swallowTailPnt,l[0]])),i.polygonalPoint=e.Cartesian3.fromDegreesArray(n)}return i},M.algorithm.getAttackArrowHeadPoints=function(t,e,i,n){this.headHeightFactor=n.headHeightFactor,this.headTailFactor=n.headTailFactor,this.headWidthFactor=n.headWidthFactor,this.neckWidthFactor=n.neckWidthFactor,this.neckHeightFactor=n.neckHeightFactor;var n=W.PlotUtils.getBaseLength(t)*this.headHeightFactor,a=t[t.length-1],r=W.PlotUtils.distance(a,t[t.length-2]),e=W.PlotUtils.distance(e,i),i=(n=n>e*this.headTailFactor?e*this.headTailFactor:n)*this.headWidthFactor,e=n*this.neckWidthFactor,r=(n=r<n?r:n)*this.neckHeightFactor,n=W.PlotUtils.getThirdPoint(t[t.length-2],a,0,n,!0),t=W.PlotUtils.getThirdPoint(t[t.length-2],a,0,r,!0),r=W.PlotUtils.getThirdPoint(a,n,W.Constants.HALF_PI,i,!1),n=W.PlotUtils.getThirdPoint(a,n,W.Constants.HALF_PI,i,!0);return[W.PlotUtils.getThirdPoint(a,t,W.Constants.HALF_PI,e,!1),r,a,n,W.PlotUtils.getThirdPoint(a,t,W.Constants.HALF_PI,e,!0)]},M.algorithm.getAttackArrowBodyPoints=function(t,e,i,n){for(var a=W.PlotUtils.wholeDistance(t),r=W.PlotUtils.getBaseLength(t)*n,o=(r-W.PlotUtils.distance(e,i))/2,s=0,l=[],c=[],h=1;h<t.length-1;h++){var d=W.PlotUtils.getAngleOfThreePoints(t[h-1],t[h],t[h+1])/2,u=(r/2-(s+=W.PlotUtils.distance(t[h-1],t[h]))/a*o)/Math.sin(d),x=W.PlotUtils.getThirdPoint(t[h-1],t[h],Math.PI-d,u,!0),d=W.PlotUtils.getThirdPoint(t[h-1],t[h],d,u,!1);l.push(x),c.push(d)}return l.concat(c)},M.algorithm.dereplication=function(t){var e=t[t.length-1],i=!1,n=[],n=t.filter(function(t){if(t[0]!=e[0]&&t[1]!=e[1])return t;i=!0});return i&&n.push(e),n},M.algorithm.fineArrow=function(t,e,i){var n,a,r,o,s,l,c;if(!(t.length<2||e.length<2))return n=ht.tailWidthFactor,c=ht.neckWidthFactor,s=ht.headWidthFactor,o=ht.headAngle,l=ht.neckAngle,(a=[])[0]=t,a[1]=e,t=a[0],e=a[1],c=(a=W.PlotUtils.getBaseLength(a))*c,s=a*s,n=W.PlotUtils.getThirdPoint(e,t,W.Constants.HALF_PI,a=a*n,!0),a=W.PlotUtils.getThirdPoint(e,t,W.Constants.HALF_PI,a,!1),r=W.PlotUtils.getThirdPoint(t,e,o,s,!1),o=W.PlotUtils.getThirdPoint(t,e,o,s,!0),s=W.PlotUtils.getThirdPoint(t,e,l,c,!1),l=W.PlotUtils.getThirdPoint(t,e,l,c,!0),(c=[]).push(n[0],n[1],s[0],s[1],r[0],r[1],e[0],e[1],o[0],o[1],l[0],l[1],a[0],a[1],t[0],t[1]),c.some(t=>isNaN(t))?"":i.Cartesian3.fromDegreesArray(c)};let dt=null;function i(t,e){this.viewer=t,dt=e,this.handler=new dt.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.fillMaterial=dt.Color.RED.withAlpha(.5),this.positions=[],this.state=-1,this.floatPoint=null,this.arrowEntity=null,this.pointArr=[],this.selectPoint=null,this.clickStep=0,this.modifyHandler=null,this.xp=M}i.prototype.clear=function(){this.state=0,this.firstPoint&&this.viewer.entities.remove(this.firstPoint),this.floatPoint&&this.viewer.entities.remove(this.floatPoint),this.arrowEntity&&this.viewer.entities.remove(this.arrowEntity),this.state=-1},i.prototype.disableHandler=function(){this.handler&&(this.handler.destroy(),this.handler=new dt.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)};let S=null;function Z(t,e){i.call(this,t,e),S=e,this.type="AttackArrow",this.fillMaterial=S.Color.RED.withAlpha(.5)}function ut(t,e){t=e.camera.getPickRay(t);return t?e.scene.globe.pick(t,e.scene):null}Z.prototype={disable:function(){this.positions=[],this.arrowEntity&&(this.viewer.entities.remove(this.arrowEntity),this.arrowEntity=null),this.state=-1,this.handler&&(this.handler.destroy(),this.handler=new S.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.floatPoint&&(this.viewer.entities.remove(this.floatPoint),this.floatPoint=null),this.selectPoint&&(this.viewer.entities.remove(this.selectPoint),this.selectPoint=null);for(var t=0;t<this.pointArr.length;t++)this.pointArr[t]&&this.viewer.entities.remove(this.pointArr[t]);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null),this.clickStep=0},startDraw:function(e){this.objId=Number((new Date).getTime()+""+Number(1e3*Math.random()).toFixed(0));var i=this;this.state=1,this.handler||(this.handler=new S.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.handler.setInputAction(function(t){(t=ut(t.position,i.viewer))&&(0==i.positions.length&&(i.floatPoint=i.creatPoint(t),i.floatPoint.wz=-1),i.positions.push(t),t=i.creatPoint(t),2<i.positions.length?t.wz=i.positions.length-1:t.wz=i.positions.length,i.pointArr.push(t))},S.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction(function(t){!i.floatPoint||i.positions.length<2||(t=ut(t.endPosition,i.viewer))&&(i.floatPoint.position.setValue(t),2<=i.positions.length)&&(S.defined(i.arrowEntity)?(i.positions.pop(),i.positions.push(t)):(i.positions.push(t),i.arrowEntity=i.showArrowOnMap(i.positions),i.arrowEntity.objId=i.objId,e&&e(i.objId)))},S.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(t){if(t=ut(t.position,i.viewer)){for(var e=0;e<i.pointArr.length;e++)i.pointArr[e].show=!1;i.floatPoint.show=!1,i.viewer.entities.remove(i.floatPoint),i.floatPoint=null;t=i.creatPoint(t);t.show=!1,t.wz=i.positions.length,i.pointArr.push(t),i.positions=[],i.pointArr=[],i.arrowEntity=null}},S.ScreenSpaceEventType.RIGHT_CLICK)},createByData:function(t){this.positions=[],this.state=-1,this.floatPoint=null,this.pointArr=[],this.selectPoint=null,this.clickStep=0,this.modifyHandler=null;for(var e=[],i=0;i<t.length;i++){var n=S.Cartesian3.fromDegrees(t[i][0],t[i][1]);e.push(n)}for(this.positions=e,i=0;i<this.positions.length;i++){var a=this.creatPoint(this.positions[i]);a.show=!1,a.wz=i+1,this.pointArr.push(a)}this.arrowEntity=this.showArrowOnMap(this.positions),this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var n=this,t=0;t<n.pointArr.length;t++)n.pointArr[t].show=!0;this.modifyHandler||(this.modifyHandler=new S.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.modifyHandler.setInputAction(function(t){var e=n.viewer.scene.pick(t.position);if(S.defined(e)&&e.id)n.clickStep++,e.id.objId||(n.selectPoint=e.id);else{for(var i=0;i<n.pointArr.length;i++)n.pointArr[i].show=!1;n.floatPoint&&(n.floatPoint.show=!1),n.state=-1,n.modifyHandler.destroy(),n.modifyHandler=null}2==n.clickStep&&(n.clickStep=0,e=ut(t.position,n.viewer))&&n.selectPoint&&(n.selectPoint.position.setValue(e),n.selectPoint=null)},S.ScreenSpaceEventType.LEFT_CLICK),this.modifyHandler.setInputAction(function(t){(t=ut(t.endPosition,n.viewer))&&n.selectPoint&&(n.selectPoint.position.setValue(t),n.positions[n.selectPoint.wz-1]=t)},S.ScreenSpaceEventType.MOUSE_MOVE)},getLnglats:function(){for(var t=[],e=0;e<this.positions.length;e++){var i=this.cartesianToLatlng(this.positions[e]);t.push(i)}return t},getPositions:function(){return this.positions},creatPoint:function(t){t=this.viewer.entities.add({position:t,point:{pixelSize:10,color:S.Color.YELLOW}});return t.attr="editPoint",t},showArrowOnMap:function(r){var o=this;return this.viewer.entities.add({id:o.objId,polygon:new S.PolygonGraphics({hierarchy:new S.CallbackProperty(function(){if(r.length<3)return null;for(var t=[],e=0;e<r.length;e++){var i=o.cartesianToLatlng(r[e]);t.push(i)}var n=o.xp.algorithm.tailedAttackArrow(t,S),a=[];return-1==JSON.stringify(n.polygonalPoint).indexOf("null")&&(a=n.polygonalPoint),new S.PolygonHierarchy(a)},!1),show:!0,fill:!0,material:o.fillMaterial})})},cartesianToLatlng:function(t){var t=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(t),e=S.Math.toDegrees(t.latitude);return[S.Math.toDegrees(t.longitude),e]}},(Z.prototype=Object.create(Object.assign({},Z.prototype,i.prototype))).constructor=Z;let V=null;function X(t,e){i.call(this,t,e),V=e,this.type="StraightArrow",this.fillMaterial=V.Color.fromCssColorString("#0000FF").withAlpha(.8)}function xt(t,e){t=e.camera.getPickRay(t);return t?e.scene.globe.pick(t,e.scene):null}X.prototype={disable:function(){this.positions=[],this.firstPoint&&(this.viewer.entities.remove(this.firstPoint),this.firstPoint=null),this.floatPoint&&(this.viewer.entities.remove(this.floatPoint),this.floatPoint=null),this.arrowEntity&&(this.viewer.entities.remove(this.arrowEntity),this.arrowEntity=null),this.state=-1,this.handler&&(this.handler.destroy(),this.handler=new V.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.selectPoint&&(this.viewer.entities.remove(this.selectPoint),this.selectPoint=null),this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null),this.clickStep=0},startDraw:function(e){this.objId=Number((new Date).getTime()+""+Number(1e3*Math.random()).toFixed(0));var i=this;this.state=1,this.handler.setInputAction(function(t){(t=xt(t.position,i.viewer))&&(0==i.positions.length&&(i.firstPoint=i.creatPoint(t),i.firstPoint.type="firstPoint",i.floatPoint=i.creatPoint(t),i.floatPoint.type="floatPoint",i.positions.push(t)),i.firstPoint.position.setValue(t),i.firstPoint.show=!0,i.positions&&3==i.positions.length&&(i.firstPoint.show=!1,i.positions=[],i.pointArr=[],i.arrowEntity=null),i.positions.push(t.clone()))},V.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction(function(t){i.positions.length<1||(t=xt(t.endPosition,i.viewer))&&(i.floatPoint.position.setValue(t),2<=i.positions.length)&&(V.defined(i.arrowEntity)?(i.positions.pop(),i.positions.push(t)):(i.positions.push(t),i.arrowEntity=i.showArrowOnMap(i.positions),e&&e(i.objId)))},V.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(t){(t=xt(t.position,i.viewer))&&(i.firstPoint.show=!1,i.positions=[],i.pointArr=[],i.arrowEntity=null,i.positions.push(t.clone()))},V.ScreenSpaceEventType.RIGHT_CLICK)},startModify:function(){this.state=2,this.firstPoint.show=!0,this.floatPoint.show=!0;var i=this;this.clickStep=0,this.modifyHandler||(this.modifyHandler=new V.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.modifyHandler.setInputAction(function(t){var e=i.viewer.scene.pick(t.position);V.defined(e)&&e.id?(i.clickStep++,e.id.objId||(i.selectPoint=e.id)):(i.modifyHandler.destroy(),i.modifyHandler=null,i.firstPoint.show=!1,i.floatPoint.show=!1,i.state=-1),2==i.clickStep&&(i.clickStep=0,e=xt(t.position,i.viewer))&&i.selectPoint&&(i.selectPoint.position.setValue(e),i.selectPoint=null)},V.ScreenSpaceEventType.LEFT_CLICK),this.modifyHandler.setInputAction(function(t){i.selectPoint&&(t=xt(t.endPosition,i.viewer))&&(i.selectPoint.position.setValue(t),"firstPoint"==i.selectPoint.type&&(i.positions[1]=t),"floatPoint"==i.selectPoint.type)&&(i.positions[2]=t)},V.ScreenSpaceEventType.MOUSE_MOVE)},createByData:function(t){this.state=-1,this.positions=[];for(var e=[],i=0;i<t.length;i++){var n=V.Cartesian3.fromDegrees(t[i][0],t[i][1]);e.push(n)}this.positions=e,this.firstPoint=this.creatPoint(this.positions[1]),this.firstPoint.type="firstPoint",this.floatPoint=this.creatPoint(this.positions[2]),this.floatPoint.type="floatPoint",this.arrowEntity=this.showArrowOnMap(this.positions),this.firstPoint.show=!1,this.floatPoint.show=!1,this.arrowEntity.objId=this.objId},getLnglats:function(){for(var t=[],e=0;e<this.positions.length;e++){var i=this.cartesianToLatlng(this.positions[e]);t.push(i)}return t},getPositions:function(){return this.positions},creatPoint:function(t){t=this.viewer.entities.add({position:t,point:{pixelSize:10,color:V.Color.YELLOW}});return t.attr="editPoint",t},showArrowOnMap:function(o){var s=this;return this.viewer.entities.add({id:s.objId,polygon:new V.PolygonGraphics({hierarchy:new V.CallbackProperty(function(){if(o.length<2)return null;var t=o[1],e=o[2],t=s.cartesianToLatlng(t),e=s.cartesianToLatlng(e),i=[],n=s.xp.algorithm.fineArrow([t[0],t[1]],[e[0],e[1]],V);if(-1!=JSON.stringify(n).indexOf("null"))return[];for(var a=0;a<n.length;a++){var r=new V.Cartesian3(n[a].x,n[a].y,n[a].z);i.push(r)}return new V.PolygonHierarchy(i)},!1),show:!0,fill:!0,material:s.fillMaterial})})},cartesianToLatlng:function(t){var t=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(t),e=V.Math.toDegrees(t.latitude);return[V.Math.toDegrees(t.longitude),e]}},(X.prototype=Object.create(Object.assign({},X.prototype,i.prototype))).constructor=X;let B=null;function D(t,e){i.call(this,t,e),B=e,this.type="PincerArrow",this.fillMaterial=B.Color.YELLOW.withAlpha(.8)}function pt(t,e){t=e.camera.getPickRay(t);return t?e.scene.globe.pick(t,e.scene):null}D.prototype={disable:function(){this.positions=[],this.arrowEntity&&(this.viewer.entities.remove(this.arrowEntity),this.arrowEntity=null),this.state=-1,this.handler&&(this.handler.destroy(),this.handler=new B.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.floatPoint&&(this.viewer.entities.remove(this.floatPoint),this.floatPoint=null),this.selectPoint&&(this.viewer.entities.remove(this.selectPoint),this.selectPoint=null);for(var t=0;t<this.pointArr.length;t++)this.pointArr[t]&&this.viewer.entities.remove(this.pointArr[t]);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null),this.clickStep=0},startDraw:function(e){this.objId=Number((new Date).getTime()+""+Number(1e3*Math.random()).toFixed(0));var n=this;this.state=1,this.handler.setInputAction(function(t){if(t=pt(t.position,n.viewer))if(0==n.positions.length&&(n.floatPoint=n.creatPoint(t)),4<n.positions.length){(i=n.creatPoint(t)).wz=n.positions.length,n.pointArr.push(i);for(var e=0;e<n.pointArr.length;e++)n.pointArr[e].show=!1;n.floatPoint&&(n.floatPoint.show=!1,n.viewer.entities.remove(n.floatPoint),n.floatPoint=null),n.positions=[],n.pointArr=[],n.arrowEntity=null}else{n.positions.push(t);var i=n.creatPoint(t);2<n.positions.length?i.wz=n.positions.length-1:i.wz=n.positions.length,n.pointArr.push(i)}},B.ScreenSpaceEventType.LEFT_CLICK),this.handler.setInputAction(function(t){!n.floatPoint||n.positions.length<2||(t=pt(t.endPosition,n.viewer))&&(n.floatPoint.position.setValue(t),2<=n.positions.length)&&(B.defined(n.arrowEntity)?(n.positions.pop(),n.positions.push(t)):(n.positions.push(t),n.arrowEntity=n.showArrowOnMap(n.positions),n.arrowEntity.objId=n.objId,e&&e(n.objId)))},B.ScreenSpaceEventType.MOUSE_MOVE),this.handler.setInputAction(function(t){if(4<=n.positions.length&&(t=pt(t.position,n.viewer))){for(var e=0;e<n.pointArr.length;e++)n.pointArr[e].show=!1;n.floatPoint.show=!1,n.viewer.entities.remove(n.floatPoint),n.floatPoint=null;t=n.creatPoint(t);t.show=!1,t.wz=n.positions.length,n.pointArr.push(t),n.positions=[],n.pointArr=[],n.arrowEntity=null}},B.ScreenSpaceEventType.RIGHT_CLICK)},createByData:function(t){this.positions=[],this.state=-1,this.floatPoint=null,this.pointArr=[],this.selectPoint=null,this.clickStep=0,this.modifyHandler=null;for(var e=[],i=0;i<t.length;i++){var n=B.Cartesian3.fromDegrees(t[i][0],t[i][1]);e.push(n)}for(this.positions=e,i=0;i<this.positions.length;i++){var a=this.creatPoint(this.positions[i]);a.show=!1,a.wz=i+1,this.pointArr.push(a)}this.arrowEntity=this.showArrowOnMap(this.positions),this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var n=this,t=0;t<n.pointArr.length;t++)n.pointArr[t].show=!0;this.modifyHandler||(this.modifyHandler=new B.ScreenSpaceEventHandler(this.viewer.scene.canvas)),this.modifyHandler.setInputAction(function(t){var e=n.viewer.scene.pick(t.position);if(B.defined(e)&&e.id)n.clickStep++,e.id.objId||(n.selectPoint=e.id);else{for(var i=0;i<n.pointArr.length;i++)n.pointArr[i].show=!1;n.state=-1,n.modifyHandler.destroy(),n.modifyHandler=null}2==n.clickStep&&(n.clickStep=0,e=pt(t.position,n.viewer))&&n.selectPoint&&(n.selectPoint.position.setValue(e),n.selectPoint=null)},B.ScreenSpaceEventType.LEFT_CLICK),this.modifyHandler.setInputAction(function(t){(t=pt(t.endPosition,n.viewer))&&n.selectPoint&&(n.selectPoint.position.setValue(t),n.positions[n.selectPoint.wz-1]=t)},B.ScreenSpaceEventType.MOUSE_MOVE)},getLnglats:function(){for(var t=[],e=0;e<this.positions.length;e++){var i=this.cartesianToLatlng(this.positions[e]);t.push(i)}return t},getPositions:function(){return this.positions},creatPoint:function(t){return this.viewer.entities.add({position:t,point:{pixelSize:10,color:B.Color.YELLOW}})},showArrowOnMap:function(r){var o=this;return this.viewer.entities.add({id:o.objId,polygon:new B.PolygonGraphics({hierarchy:new B.CallbackProperty(function(){if(r.length<3)return null;for(var t=[],e=0;e<r.length;e++){var i=o.cartesianToLatlng(r[e]);t.push(i)}var n=o.xp.algorithm.doubleArrow(t,B),a=[];return-1==JSON.stringify(n.polygonalPoint).indexOf("null")&&(a=n.polygonalPoint),new B.PolygonHierarchy(a)},!1),show:!0,fill:!0,material:o.fillMaterial})})},cartesianToLatlng:function(t){var t=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(t),e=B.Math.toDegrees(t.latitude);return[B.Math.toDegrees(t.longitude),e]}},(D.prototype=Object.create(Object.assign({},D.prototype,i.prototype))).constructor=D;let k=null;function mt(t,e,i){t&&(this._viewer=t,k=e,this._installPlugin())}mt.prototype={_installPlugin:function(){this._installCounputeVertex(),this._installCylinderGeometry(),this._installRadarPrimitive()},_installCylinderGeometry:function(){function _(t){this.length=t.length,this.topRadius=t.topRadius,this.bottomRadius=t.bottomRadius,this.slices=t.slices||64,this.zReverse=t.zReverse}var G=new k.Cartesian2,A=new k.Cartesian3,P=new k.Ray;_._createGeometry=function(t){var e=t.length,i=t.topRadius,n=t.bottomRadius,a=t.slices,r=2*Math.PI/(a-1),o=[],s=[],l=[],c=[],h=[n,i],d=[0,t.zReverse?-e:e],u=0,t=Math.atan2(n-i,e),x=G;x.z=Math.sin(t);for(var p=Math.cos(t),m=0;m<d.length;m++){c[m]=[];for(var g=h[m],f=0;f<a;f++){c[m].push(u++);var v=r*f,y=g*Math.cos(v),b=g*Math.sin(v);o.push(y,b,d[m]),y=p*Math.cos(v),b=p*Math.sin(v),s.push(y,b,x.z),l.push(m/(d.length-1),0)}}for(var C=[],m=1;m<d.length;m++)for(f=1;f<a;f++){var w=c[m-1][f-1],I=c[m][f-1],_=c[m][f],A=c[m-1][f];C.push(_),C.push(A),C.push(w),C.push(_),C.push(w),C.push(I),f==c[m].length-1&&(w=c[m-1][f],I=c[m][f],_=c[m][0],A=c[m-1][0],C.push(_),C.push(A),C.push(w),C.push(_),C.push(w),C.push(I))}C=new Int16Array(C),o=new Float32Array(o),s=new Float32Array(s),l=new Float32Array(l),n={position:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o}),normal:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:s}),st:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:l})},i=k.BoundingSphere.fromVertices(o),e=new k.Geometry({attributes:n,indices:C,primitiveType:k.PrimitiveType.TRIANGLES,boundingSphere:i});return o=[],C=[],l=[],e},_.createGeometry=function(t,e){if(!e)return _._createGeometry(t);k.Matrix4.multiplyByPoint(e,k.Cartesian3.ZERO,A),A.clone(P.origin);var i=t.length,n=t.topRadius,a=(t.bottomRadius,t.slices),r=2*Math.PI/(a-1),o=[],s=[],l=[],c=[],h=[0,t.zReverse?-i:i],d=0,d=0;o.push(0,0,0),s.push(1,1),d++;for(var u=new k.Cartesian3,x=n/15,p=0;p<16;p++){for(var m=x*p,g=[],f=0;f<a;f++){var v=r*f,y=m*Math.cos(v),v=m*Math.sin(v);u.x=y,u.y=v,u.z=h[1],(0,k.Scene.extend2Earth)(u,e,P)?(g.push(d),o.push(y,v,h[1]),s.push(p/15,1),d++):g.push(-1)}c.push(g)}for(var b,C,w=[0,c.length-1],I=0;I<w.length;I++)for(p=w[I],f=1;f<c[p].length;f++)b=c[p][f-1],C=c[p][f],0<=b&&0<=C&&l.push(0,b,C);o=new Float32Array(o),l=new Int32Array(l),s=new Float32Array(s),t={position:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o}),st:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:s})},i=k.BoundingSphere.fromVertices(o),n=new k.Geometry({attributes:t,indices:l,primitiveType:k.PrimitiveType.TRIANGLES,boundingSphere:i});return(0,k.Scene.computeVertexNormals)(n),o=[],l=[],n},_.createOutlineGeometry=function(t){var e=t.length,i=t.topRadius,n=t.bottomRadius,a=t.slices,r=2*Math.PI/(a-1),o=[],s=[],l=[],c=[],h=[n,i],d=[0,t.zReverse?-e:e],u=0,t=Math.atan2(n-i,e),x=G;x.z=Math.sin(t);for(var p=Math.cos(t),m=0;m<d.length;m++){c[m]=[];for(var g=h[m],f=0;f<a;f++){c[m].push(u++);var v=r*f,y=g*Math.cos(v),b=g*Math.sin(v);o.push(y,b,d[m]),y=p*Math.cos(v),b=p*Math.sin(v),s.push(y,b,x.z),l.push(m/(d.length-1),0)}}for(var C=[],m=1;m<d.length;m++)for(f=1;f<a;f+=1){var w=c[m-1][f-1],I=c[m][f-1];c[m][f],c[m-1][f],f%8==1&&C.push(w,I)}C=new Int16Array(C),o=new Float32Array(o),s=new Float32Array(s),l=new Float32Array(l),n={position:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:o}),normal:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:s}),st:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:l})},i=k.BoundingSphere.fromVertices(o),e=new k.Geometry({attributes:n,indices:C,primitiveType:k.PrimitiveType.LINES,boundingSphere:i});return o=[],C=[],l=[],e},_.fromAngleAndLength=function(t,e,i){return t=k.Math.toRadians(t),new _({topRadius:Math.tan(t)*e/2,bottomRadius:0,length:e,zReverse:i})},k.Scene.CylinderGeometry=_},_installRadarPrimitive:function(){var i;function t(t,e){e=e||{},i=t.scene.globe.ellipsoid,this._geometry=null,this._angle=e.angle,this._radius=e.radius||5,this._position=e.position,this._rotation=e.rotation||{heading:0,pitch:0,roll:0},this._trackedEntity=e.trackedEntity,this.defaultColor=e.color||k.Color.YELLOW,this.defaultLineColor=e.lineColor||this.defaultColor,this._show=k.defaultValue(e.show,!0),this._outline=k.defaultValue(e.outline,!1),this._topShow=k.defaultValue(e.top,!0),this._topOutline=k.defaultValue(e.topOutline,!0),this._modelMatrix=k.Matrix4.clone(k.Matrix4.IDENTITY),this._quaternion=new k.Quaternion,this._translation=new k.Cartesian3,this._scale=new k.Cartesian3(1,1,1),this._matrix=new k.Matrix4,this._inverseMatrix=new k.Matrix4,this._positionCartographic=new k.Cartographic,this._positionCartesian=null,this._drawCommands=[],this._outlinePositions=[],this.viewer=t,this.viewer.scene.primitives.add(this),this.updateGeometry(),this._groundArea=k.defaultValue(e.groundArea,!1),this.addGroundAreaEntity(this._groundArea)}Object.defineProperties(t.prototype,{trackedEntity:{get:function(){return this._trackedEntity},set:function(t){this._trackedEntity=t}},color:{get:function(){return this.defaultColor},set:function(t){this.defaultColor=t}},lineColor:{get:function(){return this.defaultLineColor},set:function(t){this.defaultLineColor=t}},show:{get:function(){return this._show},set:function(t){this._show=t}},outline:{get:function(){return this._outline},set:function(t){this._outline=t,this.updateGeometry()}},top:{get:function(){return this._topShow},set:function(t){this._topShow=t,this.updateGeometry()}},topOutline:{get:function(){return this._topOutline},set:function(t){this._topOutline=t,this.updateGeometry()}},groundArea:{get:function(){return this._groundArea},set:function(t){this._groundArea=t,this.addGroundAreaEntity(this._groundArea)}},angle:{get:function(){return this._angle},set:function(t){this._angle=t,this.updateGroundCircleRadius(),this.updateGeometry()}},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this.updateGroundCircleRadius(),this.updateGeometry()}},heading:{get:function(){return this._rotation.heading},set:function(t){this._rotation.heading=t}},pitch:{get:function(){return this._rotation.pitch},set:function(t){this._rotation.pitch=t}},roll:{get:function(){return this._rotation.roll},set:function(t){this._rotation.roll=t}},position:{get:function(){return this._position},set:function(t){this._position=t}}}),t.prototype.updateGroundCircleRadius=function(){this._ground_radius=this._radius*Math.cos(k.Math.toRadians(this._angle))},t.prototype.addGroundAreaEntity=function(t){var e;t&&!this.groundAreaEntity&&((e=this).updateGroundCircleRadius(),this.groundAreaEntity=viewer.entities.add({position:this._position,ellipse:{show:0===this._rotation.pitch&&0===this._rotation.roll,semiMinorAxis:new k.CallbackProperty(function(t){return e._ground_radius},!1),semiMajorAxis:new k.CallbackProperty(function(t){return e._ground_radius},!1),material:this.defaultColor},polyline:{show:this._trackedEntityPosition&&(0!==this._rotation.pitch||0!==this._rotation.roll),positions:new k.CallbackProperty(function(t){return!e._trackedEntityPosition||k.Cartesian3.distance(e._position,e._trackedEntityPosition)>e._radius?[]:[e._position,e._trackedEntityPosition]},!1),followSurface:!1,material:new k.PolylineDashMaterialProperty({color:k.Color.CYAN}),width:1}}))};var n=new k.Cartesian3;t.prototype.computeMatrix=function(t,e){return this._positionCartesian||(this._positionCartesian=new k.Cartesian3),this.position instanceof k.Cartesian3?this._positionCartesian=this.position:"function"==typeof this.position.getValue?this._positionCartesian=this.position.getValue(t):this.position._value&&this.position._value instanceof k.Cartesian3&&(this._positionCartesian=this.position._value),this._trackedEntity&&this._trackedEntity.position&&(this._positionCartesian,t=k.Property.getValueOrUndefined(this._trackedEntity.position,t,n))&&(this._trackedEntityPosition=t,this._rotation.heading=0,this._rotation.pitch=40,this._rotation.roll=0),this._modelMatrix=k.Transforms.eastNorthUpToFixedFrame(this._positionCartesian,i,this._modelMatrix),this._positionCartographic=k.Cartographic.fromCartesian(this._positionCartesian,i,this._positionCartographic),k.Transforms.eastNorthUpToFixedFrame(this._positionCartesian,i,this._modelMatrix),k.Quaternion.fromHeadingPitchRoll(this._rotation,this._quaternion),this._matrix=k.Matrix4.fromTranslationQuaternionRotationScale(this._translation,this._quaternion,this._scale,this._matrix),k.Matrix4.multiplyTransformation(this._modelMatrix,this._matrix,this._matrix),k.Matrix4.inverseTransformation(this._matrix,this._inverseMatrix),this._matrix},t.prototype.getTopGeometry=function(){for(var t=this.radius,e=[],i=[],n=[],a=[],r=90-parseInt(this.angle),o=r<1?r/8:1,s=2*Math.PI/127,l=0,c=this.angle;c<91;c+=o){for(var h=k.Math.toRadians(c<90?c:90),h=Math.cos(h)*t,d=[],u=0;u<128;u++){var x=s*u,p=h*Math.cos(x),x=h*Math.sin(x),m=Math.sqrt(t*t-p*p-x*x);e.push(p,x,m),i.push(1,1),d.push(l++)}a.push(d)}for(c=1;c<a.length;c++)for(u=1;u<a[c].length;u++){var g=a[c-1][u-1],f=a[c][u-1],v=a[c][u],y=a[c-1][u];n.push(g,f,v),n.push(g,v,y)}var e=new Float32Array(e),n=new Int32Array(n),i=new Float32Array(i),r={position:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e}),st:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:i})},b=k.BoundingSphere.fromVertices(e),r=new k.Geometry({attributes:r,indices:n,primitiveType:k.PrimitiveType.TRIANGLES,boundingSphere:b});return(0,k.Scene.computeVertexNormals)(r),r},t.prototype.getTopOutlineGeometry=function(){for(var t=this.radius,e=[],i=[],n=[],a=[],r=90-parseInt(this.angle),o=r<1?r/8:1,s=2*Math.PI/127,l=0,c=this.angle;c<91;c+=o){for(var h=k.Math.toRadians(c<90?c:90),h=Math.cos(h)*t,d=[],u=0;u<128;u++){var x=s*u,p=h*Math.cos(x),x=h*Math.sin(x),m=Math.sqrt(t*t-p*p-x*x);e.push(p,x,m),i.push(1,1),d.push(l++)}a.push(d)}for(c=1;c<a.length;c++)for(u=1;u<a[c].length;u++){var g=a[c-1][u-1],f=a[c][u-1],v=a[c][u];a[c-1][u],u%8==1&&n.push(g,f),c%8==1&&n.push(f,v)}var e=new Float32Array(e),n=new Int32Array(n),i=new Float32Array(i),r={position:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e}),st:new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:i})},y=k.BoundingSphere.fromVertices(e),r=new k.Geometry({attributes:r,indices:n,primitiveType:k.PrimitiveType.LINES,boundingSphere:y});return(0,k.Scene.computeVertexNormals)(r),r},t.prototype.updateGeometry=function(){this._geometry=k.Scene.CylinderGeometry.createGeometry(new k.Scene.CylinderGeometry({topRadius:this._radius*Math.cos(k.Math.toRadians(this.angle)),bottomRadius:0,length:this._radius*Math.sin(k.Math.toRadians(this.angle))})),this._topGeometry=this.getTopGeometry(),this._topOutlineGeometry=this.getTopOutlineGeometry(),this._outlineGeometry=k.Scene.CylinderGeometry.createOutlineGeometry(new k.Scene.CylinderGeometry({topRadius:this._radius*Math.cos(k.Math.toRadians(this.angle)),bottomRadius:0,slices:128,length:this._radius*Math.sin(k.Math.toRadians(this.angle))})),this._positions=new Float32Array(this._geometry.attributes.position.values.length);for(var t=0;t<this._positions.length;t++)this._positions[t]=this._geometry.attributes.position.values[t];this._drawCommands&&this._drawCommands.length&&(this._drawCommands.forEach(function(t){t.vertexArray=t.vertexArray&&t.vertexArray.destroy()}),this._drawCommands.splice(0,this._drawCommands.length))},t.prototype.update=function(e){this._show&&(this.computeMatrix(e.time),e.mode===k.SceneMode.SCENE3D?(this._geometry.boundingSphere=k.BoundingSphere.fromVertices(this._geometry.attributes.position.values),this._drawCommands&&this._drawCommands.length||(this._drawCommands.push(this.createDrawCommand(this._geometry,e)),this._outline&&this._drawCommands.push(this.createDrawCommand(this._outlineGeometry,e)),this._topShow&&(this._drawCommands.push(this.createDrawCommand(this._topGeometry,e)),this._topOutline)&&this._drawCommands.push(this.createDrawCommand(this._topOutlineGeometry,e))),this._drawCommands.forEach(function(t){e.commandList.push(t)}),this.groundAreaEntity&&(this.groundAreaEntity.ellipse.show=this._groundArea&&0===this._rotation.pitch&&0===this._rotation.roll,this.groundAreaEntity.polyline.show=!1)):(this.groundAreaEntity||this.addGroundAreaEntity(!0),this.groundAreaEntity.ellipse.show=0===this._rotation.pitch&&0===this._rotation.roll,this.groundAreaEntity.polyline.show=this._trackedEntityPosition&&(0!==this._rotation.pitch||0!==this._rotation.roll)))},t.prototype.getFragmentShaderSource=function(t){return"#version 300 es\n in vec3 v_position;\n in vec3 v_normal; \n uniform float picked; \n uniform vec4 pickedColor; \n uniform vec4 defaultColor; \n uniform float specular; \n uniform float shininess; \n uniform vec3 emission; \n in vec2 v_st; \n uniform bool isLine; \n uniform float glowPower; \n void main() { \n vec3 positionToEyeEC = -v_position; \n vec3 normalEC = normalize(v_normal); \n vec4 color = defaultColor; \n if (picked != 0.0) { \n color = pickedColor; \n } \n czm_material material; \n material.specular = specular; \n material.shininess = shininess; \n material.normal = normalEC; \n material.emission = emission;//vec3(0.2,0.2,0.2);\n material.diffuse = color.rgb ;\n if(isLine){\n material.alpha = 1.0; \n }\n else{ \n material.alpha = color.a; \n }\n if(v_st.x==0.0){ \n out_FragColor =color ;\n }else { \n out_FragColor = czm_phong(normalize(positionToEyeEC), material,czm_lightDirectionEC) ; \n } \n }"},t.prototype.getVertexShaderSource=function(t){return"#version 300 es\n #ifdef GL_ES\n precision highp float;\n #endif\n\n in vec3 position;\n in vec2 st;\n in vec3 normal;\n uniform mat4 modelViewMatrix;\n uniform mat3 normalMatrix;\n uniform mat4 projectionMatrix;\n out vec3 v_position;\n out vec3 v_normal;\n out vec2 v_st;\n\n out vec3 v_light0Direction;\n\n void main(void) \n {\n vec4 pos = modelViewMatrix * vec4( position,1.0);\n v_normal = normalMatrix * normal;\n v_st = st;\n v_position = pos.xyz;\n v_light0Direction = mat3( modelViewMatrix) * vec3(1.0,1.0,1.0);\n gl_Position = projectionMatrix * pos;\n }"},t.prototype.createDrawCommand=function(t,e,i){var n=e.context,a=new k.Cartesian3,a=(k.Matrix4.multiplyByPoint(this._matrix,t.boundingSphere.center,a),new k.BoundingSphere(a,t.boundingSphere.radius)),i=new k.DrawCommand({modelMatrix:i||this._matrix,owner:this,primitiveType:t.primitiveType,pass:k.Pass.TRANSLUCENT,boundingVolume:a}),r=this,a=k.GeometryPipeline.createAttributeLocations(t);return i.vertexArray=k.VertexArray.fromGeometry({context:n,geometry:t,attributeLocations:a,bufferUsage:k.BufferUsage.STATIC_DRAW}),i.vertexArray._attributeLocations=a,i.shaderProgram=k.ShaderProgram.replaceCache({context:n,vertexShaderSource:this.getVertexShaderSource(t),fragmentShaderSource:this.getFragmentShaderSource(t),attributeLocations:a}),i.renderState=k.RenderState.fromCache({blending:k.BlendingState.ALPHA_BLEND,depthTest:{enabled:!0,func:k.DepthFunction.LESS},cull:{enabled:!1,face:k.CullFace.BACK}}),i.uniformMap={},i.uniformMap.projectionMatrix=function(){return e.context.uniformState.projection},i.uniformMap.modelViewMatrix=function(){return e.context.uniformState.modelView},i.uniformMap.shininess=function(){return r.shininess||(r.shininess=0),r.shininess},i.uniformMap.emission=function(){return r.emission||(r.emission=new k.Cartesian3(.2,.2,.2)),r.emission},i.uniformMap.specular=function(){return r.specular||(r.specular=0),r.specular},i.uniformMap.isLine=function(){return t.primitiveType==k.PrimitiveType.LINES||t.primitiveType==k.PrimitiveType.LINE_STRIP},i.uniformMap.defaultColor=function(){return t.primitiveType==k.PrimitiveType.LINES||t.primitiveType==k.PrimitiveType.LINE_STRIP?(r.defaultLineColor||(r.defaultLineColor=new k.Color(1,1,0,1)),r.defaultLineColor):(r.defaultColor||(r.defaultColor=new k.Color(1,0,0,1)),r.defaultColor)},i.uniformMap.picked=function(){return r.picked||(r.picked=0),r.picked},i.uniformMap.pickedColor=function(){return r.pickedColor||(r.pickedColor=new k.Color(1,1,0,1)),r.pickedColor},i.uniformMap.normalMatrix=function(){return e.context.uniformState.normal},i.uniformMap.glowPower=function(){return.25},i},t.prototype.remove=function(){this.viewer.scene.primitives.remove(this),this.groundAreaEntity&&this.viewer.entities.remove(this.groundAreaEntity)},t.prototype.addToScene=function(){this.viewer.scene.primitives.add(this),this.groundAreaEntity&&this.viewer.entities.add(this.groundAreaEntity)},t.prototype.destroy=function(t){t&&(this.viewer.scene.primitives.remove(this),this.groundAreaEntity&&this.viewer.entities.remove(this.groundAreaEntity),this._drawCommands.forEach(function(t){t.vertexArray=t.vertexArray&&t.vertexArray.destroy()}),this._drawCommands=[])},k.Scene.RadarPrimitiveRight=t},_installCounputeVertex:function(){var a=new k.Cartesian3,r=(new k.Ray,new k.Cartographic);k.Scene.computeVertexNormals=function(t){var e=t.indices,i=t.attributes,n=e.length;if(i.position){var a=i.position.values;if(void 0===i.normal)i.normal=new k.GeometryAttribute({componentDatatype:k.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:new Float32Array(a.length)});else for(var r=i.normal.values,o=0;o<n;o++)r[o]=0;for(var s,l,c,h=i.normal.values,d=new k.Cartesian3,u=new k.Cartesian3,x=new k.Cartesian3,p=new k.Cartesian3,m=new k.Cartesian3,o=0;o<n;o+=3)s=3*e[o+0],l=3*e[o+1],c=3*e[o+2],k.Cartesian3.fromArray(a,s,d),k.Cartesian3.fromArray(a,l,u),k.Cartesian3.fromArray(a,c,x),k.Cartesian3.subtract(x,u,p),k.Cartesian3.subtract(d,u,m),k.Cartesian3.cross(p,m,p),h[s]+=p.x,h[1+s]+=p.y,h[2+s]+=p.z,h[l]+=p.x,h[1+l]+=p.y,h[2+l]+=p.z,h[c]+=p.x,h[1+c]+=p.y,h[2+c]+=p.z;for(var g,f,v,y,b=t.attributes.normal.values,C=0;C<b.length;C+=3)g=b[C],f=b[C+1],v=b[C+2],y=1/Math.sqrt(g*g+f*f+v*v),b[C]=g*y,b[C+1]=f*y,b[C+2]=v*y;i.normal.needsUpdate=!0}return t},k.Scene.extend2Earth=function(t,e,i,n){n=n||k.Ellipsoid.WGS84,k.Matrix4.multiplyByPoint(e,t,a),k.Cartesian3.subtract(a,i.origin,i.direction),k.Cartesian3.normalize(i.direction,i.direction);e=k.IntersectionTests.rayEllipsoid(i,n),n=null;if(n=e?k.Ray.getPoint(i,e.start):n)try{k.Cartographic.fromCartesian(n,null,r)}catch(t){return null}return n}}};class e{constructor(t){return this.init(t)}init({cesiumGlobal:t,containerId:e,viewerConfig:i={},extraConfig:n={},MapImageryList:a=[],defaultStatic:r,baseExtendsCom:o=[],extendsCom:s,extendsComName:l}){if(!t)throw"Missing cesiumGlobal parameter, please check the calling function initCesium.";if(e)return{viewer:e=new N(t).init({containerId:e,viewerConfig:i,extraConfig:n,MapImageryList:a}),[l]:this.prototypeExtends(e,t,r)(o,s)};throw"Missing containerId parameter, please check the calling function initCesium."}prototypeExtends(n,r,o){return function(t,a){var e=null;function i(t){for(var e=Object.keys(t.prototype),i=0,n=e.length;i<n;i++)a.prototype[e[i]]=t.prototype[e[i]]}return Array.isArray(t)?(t.forEach(t=>{i(t)}),e=new a(n,r,o),t.forEach(t=>{t.call(e,n,r,o)})):(i(t),e=new a(n,r,o),t.call(e,n,r,o)),e}}}class gt extends e{constructor(t){return super({...t,baseExtendsCom:[b,z,Q],extendsCom:U,extendsComName:"draw"})}}class ft extends e{constructor(t){return super({...t,baseExtendsCom:b,extendsCom:$,extendsComName:"customCesiumPlugin"})}}R.Analysis=class extends e{constructor(t){return super({...t,baseExtendsCom:[b,U,it],extendsCom:nt,extendsComName:"analysis"})}},R.CustomCesiumPlugin=class{constructor(t){var e=new ft(t);return this._initInter(e,t)}_initInter(t,e){return new mt(t.viewer,e.cesiumGlobal,e.defaultStatic),t}},R.Draw=class{constructor(t){var e=new gt(t);return this._initCurrMeasure(t,e)}_initCurrMeasure(t,e){var i=new Z(e.viewer,t.cesiumGlobal),n=new X(e.viewer,t.cesiumGlobal),t=new D(e.viewer,t.cesiumGlobal);return{...e,attackArrowObj:i,straightArrowObj:n,pincerArrowObj:t}}},R.Graphics=class extends e{constructor(t){return super({...t,baseExtendsCom:b,extendsCom:y,extendsComName:"graphics"})}},R.Material=class extends e{constructor(t){return super({...t,baseExtendsCom:[b,Y],extendsCom:E,extendsComName:"material"})}},R.PassEffect=class extends e{constructor(t){return super({...t,baseExtendsCom:[b,Y],extendsCom:J,extendsComName:"passEffect"})}},R.Plugin=class extends e{constructor(t){return super({...t,baseExtendsCom:[b,y],extendsCom:it,extendsComName:"plugin"})}},R.Primitive=class extends e{constructor(t){return super({...t,baseExtendsCom:b,extendsCom:L,extendsComName:"primitive"})}},R.initCesium=function({cesiumGlobal:t,containerId:e,viewerConfig:i={},extraConfig:n={},MapImageryList:a=[],defaultStatic:r}){if(!t)throw"Missing cesiumGlobal parameter, please check the calling function initCesium.";var o,s,l,c,h,d,u,x,p,m,g,f,v;if(e)return e=new N(t).init({containerId:e,viewerConfig:i,extraConfig:n,MapImageryList:a}),g=e,f=t,v=r,n=(i=function(t,a){var e=null;function i(t){for(var e=Object.keys(t.prototype),i=0,n=e.length;i<n;i++)a.prototype[e[i]]=t.prototype[e[i]]}return Array.isArray(t)?(t.forEach(t=>{i(t)}),e=new a(g,f,v),t.forEach(t=>{t.call(e,g,f,v)})):(i(t),e=new a(g,f,v),t.call(e,g,f,v)),e})([b,Y],E),a=i(b,y),r=i(b,z),o=i(b,L),s=i([b,z,Q],U),l=i([b,Y],J),c=i(b,$),h=i(b,et),d=i([b,y],it),u=new b(e,t),i=i([b,U,it],nt),x=new Z(e,t),p=new X(e,t),m=new D(e,t),new mt(e,t),{viewer:e,material:n,graphics:a,math3d:r,primitive:o,draw:s,passEffect:l,customCesiumPlugin:c,control:h,plugin:d,base:u,analysis:i,attackArrowObj:x,straightArrowObj:p,pincerArrowObj:m};throw"Missing containerId parameter, please check the calling function initCesium."},Object.defineProperty(R,"__esModule",{value:!0})});