@vesium/plot 1.0.1-beta.51 → 1.0.1-beta.52

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.
@@ -1,2 +1,2 @@
1
- (function(exports,t,n,r,i){var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=c(t),a=0,l=i.length,d;a<l;a++)d=i[a],!u.call(e,d)&&d!==n&&o(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=s(t,d))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:a(l(e)),d(t||!e||!e.__esModule?o(n,`default`,{value:e,enumerable:!0}):n,e));t=f(t),n=f(n),r=f(r),i=f(i);var p=class e{constructor(e){this.type=e.type,this.complete=e.complete,this.allowManualComplete=e.allowManualComplete,this.definingCursor=e.definingCursor??`crosshair`,this.skeletons=e.skeletons?.map(e=>e())??[],this.initEntites=e.initEntites,this.initPrimitives=e.initPrimitives,this.initGroundPrimitives=e.initGroundPrimitives,this.render=e.render}type;complete;allowManualComplete;definingCursor;skeletons;initEntites;initPrimitives;initGroundPrimitives;render;static _record=new Map;static getCacheTypes(){return[...this._record.keys()]}static getCache(t){return e._record.get(t)}static setCache(t){(0,n.assertError)(!t.type,"`scheme.type` is required"),e._record.set(t.type,t)}static resolve(t){if(typeof t==`string`){let n=e.getCache(t);return(0,r.assert)(!!n,`scheme ${t} not found`),n}else if(t instanceof e)return t;else return new e(t)}};let m=function(e){return e[e.NEAR=0]=`NEAR`,e[e.CYCLE=1]=`CYCLE`,e[e.STRICT=2]=`STRICT`,e}({}),h=(e,n,r,i)=>i===0?{time:e,positions:n.positions?.map(e=>e.clone()),derivative:n.derivative}:i===1?{time:e,positions:r.positions?.map(e=>e.clone()),derivative:n.derivative}:{time:e,positions:r.positions?.map((e,r)=>{let a=n.positions?.[r];return a?t.Cartesian3.lerp(a,e,i,new t.Cartesian3):e}),derivative:n.derivative};var g=class e{constructor(e){this.interpolationAlgorithm=e?.interpolationAlgorithm,this.strategy=e?.strategy??m.NEAR,e?.packables?.forEach(e=>this.setSample(e)),this._times.length||this.setSample({time:new t.JulianDate(0,0),positions:[],derivative:void 0})}static defaultInterpolationAlgorithm=h;strategy;interpolationAlgorithm;_times=[];_sampleds=[];_derivatives=[];get isConstant(){return this._times.length===0}_definitionChanged=new t.Event;get definitionChanged(){return this._definitionChanged}getTimes(){return this._times.map(e=>e.clone())}getIndexScope(e){if(!this._times.length)return;let n=this._times[0],r=this._times[this._times.length-1];if(t.JulianDate.lessThan(e,n)||t.JulianDate.greaterThan(e,r))switch(this.strategy){case m.STRICT:return;case m.NEAR:e=t.JulianDate.lessThan(e,this._times[0])?this._times[0].clone():this._times[this._times.length-1].clone();break;case m.CYCLE:{let n=t.JulianDate.toDate(this._times[0]).getTime(),r=t.JulianDate.toDate(this._times[this._times.length-1]).getTime(),i=r-n,a=t.JulianDate.toDate(e).getTime(),o=(a-n)%i,s=new Date(n+o);e=t.JulianDate.fromDate(s);break}}let i=this._times.findIndex(n=>t.JulianDate.lessThanOrEquals(e,n)),a=Math.min(i,this._times.length-1),o=t.JulianDate.toDate(this._times[i]).getTime(),s=t.JulianDate.toDate(this._times[a]).getTime(),c=t.JulianDate.toDate(e).getTime();return{prevIndex:i,nextIndex:a,proportion:(c-o)/(s-o)||0}}getValue(t,n){if(n??={time:t},Object.assign(n,{time:t?.clone(),positions:void 0,derivative:void 0}),!t)return n.time=this._times[0].clone(),n.positions=this._sampleds[0]?.map(e=>e.clone(e)),n.derivative=this._derivatives[0],n;let r=this.getIndexScope(t);if(!r)return n;n.time=t;let{prevIndex:i,nextIndex:a,proportion:o}=r,s={time:this._times[i],positions:this._sampleds[i],derivative:this._derivatives[i]},c={time:this._times[a],positions:this._sampleds[a],derivative:this._derivatives[a]},l=(this.interpolationAlgorithm||e.defaultInterpolationAlgorithm)(t,s,c,o);return Object.assign(n,l),n}setSample(e){let n=e.time?.clone()??this._times[0].clone(),r=e.positions?.map(e=>e.clone())??[],i=e.derivative,a=this._times.findIndex(e=>t.JulianDate.equals(n,e));a===-1?this._times.length===0?(this._times[0]=n,this._sampleds[0]=r,this._derivatives[0]=e.derivative):t.JulianDate.lessThan(n,this._times[0])?(this._times.splice(0,0,n),this._sampleds.splice(0,0,r),this._derivatives.splice(0,0,i)):t.JulianDate.greaterThan(n,this._times[this._times.length-1])&&(this._times.push(n),this._sampleds.push(r),this._derivatives.push(i)):(this._times[a]=n,this._sampleds[a]=r,this._derivatives[a]=e.derivative),this.definitionChanged.raiseEvent(this)}setSamples(e){e.forEach(e=>this.setSample(e))}removeSample(e){let t=this._times.findIndex(t=>t.equals(e));if(t!==-1){this._sampleds.splice(t,1),this._derivatives.splice(t,1);let e=this._times.splice(t,1);if(e.length)return this._definitionChanged.raiseEvent(this),!0}return!1}removeSamples(e){for(let n=0;n<this._times.length;n++){let r=this._times[n];t.TimeInterval.contains(e,r)&&this.removeSample(r)}}equals(e){return e===this}},_=class{constructor(e){let{id:n,disabled:r=!1,sampled:i}=e;this._id=n||(0,t.createGuid)(),this._scheme=p.resolve(e.scheme),this._definitionChanged=new t.Event,this._defining=!0,this._disabled=r,this._sampled=i instanceof g?i:new g(i),this._sampled.definitionChanged.addEventListener(e=>this._definitionChanged.raiseEvent(this,`sampled`,e,e),this),this._entities=[...this._scheme.initEntites?.()??[]],this._primitives=[...this._scheme.initPrimitives?.()??[]],this._groundPrimitives=[...this._scheme.initGroundPrimitives?.()??[]],this._skeletons=[]}_id;get id(){return this._id}_scheme;get scheme(){return this._scheme}_definitionChanged;get definitionChanged(){return this._definitionChanged}_defining;get defining(){return this._defining}static setDefining(e,t){e._defining!==t&&(e._definitionChanged.raiseEvent(e,`defining`,t,e._defining),e._defining=t)}_disabled;get disabled(){return this._disabled}set disabled(e){this.disabled=e}_sampled;get sampled(){return this._sampled}_entities;get entities(){return this._entities}set entities(e){this._definitionChanged.raiseEvent(this,`entities`,e,this._entities),this._entities=e}_primitives;get primitives(){return this._primitives}set primitives(e){this._definitionChanged.raiseEvent(this,`primitives`,e,this._primitives),this._primitives=e}_groundPrimitives;get groundPrimitives(){return this._groundPrimitives}set groundPrimitives(e){this._definitionChanged.raiseEvent(this,`groundPrimitives`,e,this._groundPrimitives),this._groundPrimitives=e}_skeletons;get skeletons(){return this._skeletons}set skeletons(e){this._definitionChanged.raiseEvent(this,`skeletons`,e,this._skeletons),this._skeletons=e}};let v=function(e){return e[e.IDLE=0]=`IDLE`,e[e.HOVER=1]=`HOVER`,e[e.ACTIVE=2]=`ACTIVE`,e}({});var y=class extends t.Entity{constructor(e){super(e)}};function b(e,a,o){let s=(0,n.useViewer)(),c=(0,n.usePrimitive)(new t.PrimitiveCollection),l=(0,n.usePrimitive)(new t.PrimitiveCollection,{collection:`ground`}),u=(0,n.useDataSource)(new t.CustomDataSource),d=(0,n.useEntityScope)({collection:()=>u.value.entities}),f=(0,n.usePrimitiveScope)({collection:()=>c.value}),p=(0,n.usePrimitiveScope)({collection:()=>l.value}),m=(0,i.shallowRef)();(0,n.useScreenSpaceEventHandler)(t.ScreenSpaceEventType.MOUSE_MOVE,e=>{m.value=(0,n.canvasCoordToCartesian)(e?.endPosition,s.value.scene)}),(0,r.watchArray)(e,(e,t,n,r=[])=>{r.forEach(e=>{d.removeWhere(t=>e.entities.includes(t)),f.removeWhere(t=>e.primitives.includes(t)),p.removeWhere(t=>e.groundPrimitives.includes(t))}),n.forEach(e=>{e.entities.forEach(e=>d.add(e)),e.primitives.forEach(e=>f.add(e)),e.groundPrimitives.forEach(e=>p.add(e))})},{immediate:!0,flush:`post`}),(0,n.useCesiumEventListener)(()=>e.value.map(e=>e.definitionChanged),(e,t,r,i)=>{if(t===`entities`){let{added:e,removed:t}=(0,n.arrayDiff)(r,i);e.forEach(e=>d.add(e)),t.forEach(e=>d.remove(e))}else if(t===`primitives`){let{added:e,removed:t}=(0,n.arrayDiff)(r,i);e.forEach(e=>f.add(e)),t.forEach(e=>f.remove(e))}else if(t===`groundPrimitives`){let{added:e,removed:t}=(0,n.arrayDiff)(r,i);e.forEach(e=>p.add(e)),t.forEach(e=>p.remove(e))}});let h=async e=>{let t=await e.scheme.render?.({packable:e.sampled.getValue(o()),mouse:e.defining?m.value:void 0,defining:e.defining,previous:{entities:e.entities,primitives:e.primitives,groundPrimitives:e.groundPrimitives}});e.entities=t?.entities??[],e.primitives=t?.primitives??[],e.groundPrimitives=t?.groundPrimitives??[]};return(0,i.watch)(a,(e,t)=>{t&&h(t)}),(0,n.useCesiumEventListener)(()=>e.value.map(e=>e.definitionChanged),(e,t)=>{[`disabled`,`defining`,`scheme`,`sampled`,`time`].includes(t)&&h(e)}),(0,i.watch)(m,()=>{e.value.forEach(e=>e.defining&&h(e))}),{primitives:(0,i.computed)(()=>Array.from(f.scope)),groundPrimitives:(0,i.computed)(()=>Array.from(f.scope)),entities:(0,i.computed)(()=>Array.from(d.scope))}}function x(e,a){let o=(0,n.useViewer)(),s=(0,i.ref)(!1),c=(0,i.computed)(()=>e.value?.sampled.getValue(a()));(0,n.useScreenSpaceEventHandler)(t.ScreenSpaceEventType.LEFT_CLICK,async t=>{if(await(0,r.promiseTimeout)(1),!e.value||!c.value||s.value)return;let{scheme:i,defining:a,sampled:l}=e.value;if(!a)return;let u=(0,n.canvasCoordToCartesian)(t.position,o.value.scene);if(!u)return;c.value.positions??=[],c.value.positions.push(u),l.setSample(c.value);let d=i.complete?.(c.value);d&&_.setDefining(e.value,!1)}),(0,n.useScreenSpaceEventHandler)(t.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,async t=>{if(!e.value||!c.value)return;s.value=!0,await(0,r.promiseTimeout)(2),s.value=!1;let{scheme:i,defining:a}=e.value;if(!a)return;let l=(0,n.canvasCoordToCartesian)(t.position,o.value.scene);if(!l)return;let u=i.allowManualComplete?.(c.value);u&&_.setDefining(e.value,!1)}),(0,n.useScreenSpaceEventHandler)(t.ScreenSpaceEventType.RIGHT_CLICK,async()=>{if(!e.value||!c.value)return;let{defining:t,sampled:n}=e.value;t&&(c.value.positions??=[],c.value.positions.length!==0&&(c.value.positions.splice(c.value.positions.length-1,1),n.setSample(c.value)))});let l=(0,i.ref)(),u=()=>{if(!e.value?.defining)l.value&&(l.value=void 0,o.value.container.parentElement.style.removeProperty(`cursor`));else{let t=e.value.scheme.definingCursor;l.value=(0,n.isFunction)(t)?t(c.value):t,l.value&&o.value?.container.parentElement.style.setProperty(`cursor`,l.value)}};(0,n.useCesiumEventListener)(()=>e.value?.definitionChanged,(e,t)=>{(t===`defining`||t===`sampled`)&&u()}),(0,i.watch)(e,()=>u())}function S(e,a,o){let s=(0,n.useViewer)(),c=(0,n.useDataSource)(new t.CustomDataSource),l=(0,n.useEntityScope)({collection:()=>c.value.entities}),u=(0,i.shallowRef)(),d=(0,i.shallowRef)(),f=e=>e?d.value?.id===e.id?v.ACTIVE:u.value?.id===e.id?v.HOVER:v.IDLE:v.IDLE,p=(e,t)=>{let r=e.skeletons,i=[];if(t||e.disabled)e.skeletons=[];else{let t=e.sampled.getValue(o()),s=e.defining,c=a.value===e,l=e.scheme.skeletons;l.forEach(a=>{let o=(0,n.isFunction)(a.disabled)?a.disabled({active:c,defining:s}):a.disabled;if(o)return;let l=a.format?.(t)??t?.positions??[];l.forEach((n,o)=>{let u=r.find(e=>e.index===o&&e.skeleton===a),d=a.render?.({defining:s,active:c,index:o,packable:t,positions:l,position:n,action:f(u)}),p=new y(d??{});u?p.propertyNames.forEach(e=>{e!==`id`&&(u[e]=p[e])}):u=p,u.plot=e,u.skeleton=a,u.index=o,i.push(u)})})}e.skeletons=i},{addGraphicEvent:m}=(0,n.useGraphicEvent)();return(0,i.watchEffect)(e=>{let t=m(`global`,`DRAG`,({event:e,pick:t,dragging:n,lockCamera:r})=>{if(t.id instanceof y&&l.scope.has(t.id)){let i=t.id,c=i.plot;if(c.defining)return;d.value=i;let l=i.skeleton,u=i.index,f=c.sampled.getValue(o());l.onDrag?.({viewer:s.value,sampled:c.sampled,packable:f,active:a.value===c,index:u,event:e,dragging:n,lockCamera:r})}else d.value=void 0},{cursor:({pick:e})=>{if(!a.value?.defining&&l.scope.has(e.id)){let t=e.id.skeleton;return(0,n.isFunction)(t?.cursor)?t.cursor(e):(0,i.toValue)(t?.cursor)}},dragCursor:({pick:e})=>{if(!a.value?.defining&&l.scope.has(e.id)){let t=e.id.skeleton;return(0,n.isFunction)(t?.dragCursor)?t.dragCursor(e):(0,i.toValue)(t?.dragCursor)}}});e(t)}),(0,r.onKeyStroke)(e=>{if(d.value){let t=d.value,n=t.plot,r=t.skeleton,i=t.index,a=n.sampled.getValue(o());r.onKeyPressed?.({viewer:s.value,sampled:n.sampled,packable:a,index:i,keyEvent:e})}}),(0,i.watchEffect)(e=>{let t=m(`global`,`HOVER`,({hovering:e,pick:t})=>{if(e&&t.id instanceof y&&l.scope.has(t.id)){let e=t.id;u.value=e}else u.value=void 0});e(t)}),(0,i.watchEffect)(e=>{let t=m(`global`,`LEFT_CLICK`,({event:e,pick:t})=>{if(t.id instanceof y&&l.scope.has(t.id)){let n=t.id;d.value=n;let r=n.plot,i=n.skeleton,c=n.index,l=r.sampled.getValue(o());i.onLeftClick?.({viewer:s.value,sampled:r.sampled,packable:l,active:a.value===r,defining:r.defining,index:c,event:e})}else d.value=void 0});e(t)}),(0,r.watchArray)(e,(e,t,n,r=[])=>{n.forEach(e=>p(e)),r.forEach(e=>p(e,!0))}),(0,n.useCesiumEventListener)(()=>e.value.map(e=>e.definitionChanged),(e,t,r,a)=>{if([`disabled`,`defining`,`scheme`,`sampled`,`time`].includes(t))(0,i.nextTick)(()=>p(e));else if(t===`skeletons`){let{added:e,removed:t}=(0,n.arrayDiff)(r,a);e.forEach(e=>l.add(e)),t.forEach(e=>l.remove(e))}}),(0,i.watch)(a,(e,t)=>{e&&p(e),t&&p(t)}),{dataSource:c}}function C(e){let r=e?.time||(0,i.shallowRef)(),a=(0,n.useViewer)(),o=()=>r.value?.clone()||new t.JulianDate(0,0),s=(0,i.shallowReactive)(new Set),c=(0,i.computed)(()=>Array.from(s)),l=(0,i.shallowRef)(),u=(0,i.shallowRef)();(0,n.useCesiumEventListener)([()=>l.value?.sampled.definitionChanged],()=>{u.value=l.value?.sampled.getValue(o())}),x(l,o),b(c,l,o),S(c,l,o),(0,n.useScreenSpaceEventHandler)(t.ScreenSpaceEventType.LEFT_CLICK,e=>{if(l.value?.defining)return;let t=a.value?.scene.pick(e.position.clone());if(!(t?.id?.plot instanceof _)){if(!t){l.value=void 0;return}l.value=c.value.find(e=>(0,n.pickHitGraphic)(t,[...e.entities,...e.primitives,...e.groundPrimitives]))}});let d,f;(0,i.watch)(l,(e,t)=>{if(t&&t.defining){let e=t.sampled.getValue(o()),n=t.scheme.allowManualComplete?.(e);n?(_.setDefining(t,!1),d?.(t)):s.delete(t)}});let p=async e=>new Promise((t,n)=>{d=t,f=n;let r=e instanceof _?e:new _(e);return s.has(r)||s.add(r),l.value=r,t(r)}),m=e=>(e===l.value&&(l.value=void 0),s.has(e)?(s.delete(e),!0):!1);return{plots:c,time:r,operate:p,remove:m,cancel:f}}function w(){return{disabled:({active:e})=>!e,cursor:`pointer`,dragCursor:`crosshair`,onDrag({viewer:e,sampled:t,packable:r,event:i,index:a,lockCamera:o}){o();let s=(0,n.canvasCoordToCartesian)(i.endPosition,e.scene);if(s){let e=[...r.positions??[]];e[a]=s,t.setSample({time:r.time,derivative:r.derivative,positions:e})}},onKeyPressed({viewer:e,keyEvent:t,sampled:r,packable:i,index:a}){let o=(0,n.toCartographic)(e.camera.position)?.height;if(!o||![`ArrowUp`,`ArrowRight`,`ArrowDown`,`ArrowLeft`].includes(t.key))return;t.preventDefault();let s=0;switch(t.key){case`ArrowRight`:s=Math.PI/2;break;case`ArrowDown`:s=Math.PI;break;case`ArrowLeft`:s=-Math.PI/2;break;case`ArrowUp`:s=0;break}let c=(e.camera.heading+s)%(2*Math.PI),l=[...i.positions??[]],u=(0,n.toCartographic)(l[a]),d=o/1e5,f=d*Math.PI/180/1e3;u.latitude+=f*Math.cos(c),u.longitude+=f*Math.sin(c),l[a]=(0,n.toCartesian3)(u),r.setSample({time:i.time,derivative:i.derivative,positions:l})},render:({position:e,action:n})=>{let r={[v.IDLE]:t.Color.BLUE.withAlpha(.4),[v.HOVER]:t.Color.BLUE.withAlpha(.6),[v.ACTIVE]:t.Color.AQUA.withAlpha(1)};return{position:e,point:{pixelSize:8,color:r[n],disableDepthTestDistance:1/0,outlineWidth:1,outlineColor:t.Color.WHITE.withAlpha(.4)}}}}}function T(){let e=-1;return{disabled:({active:e,defining:t})=>!e||t,cursor:`pointer`,dragCursor:`crosshair`,format(e){let n=e.positions??[];return n.length<2?[]:n.map((e,r)=>{let i=r===n.length-1?n[0]:n[r+1];return t.Cartesian3.midpoint(e,i,new t.Cartesian3)})},onDrag({viewer:t,sampled:r,packable:i,event:a,index:o,lockCamera:s,dragging:c}){s();let l=(0,n.canvasCoordToCartesian)(a.endPosition,t.scene);if(!l)return;let u=[...i.positions??[]];e===-1?(e=o,u.splice(o+1,0,l)):u[e+1]=l,c||(e=-1),r.setSample({time:i.time,derivative:i.derivative,positions:u})},render:({position:e,action:n,active:r})=>{if(!r)return;let i={[v.IDLE]:t.Color.GREEN.withAlpha(.4),[v.HOVER]:t.Color.GREEN.withAlpha(.6),[v.ACTIVE]:t.Color.GREEN.withAlpha(1)};return{position:e,point:{pixelSize:6,color:i[n],disableDepthTestDistance:1/0,outlineWidth:1,outlineColor:t.Color.WHITE.withAlpha(.4)}}}}}function E(){let e=-1;return{disabled:({active:e,defining:t})=>!e||t,cursor:`pointer`,dragCursor:`crosshair`,format(e){let n=e.positions??[];if(n.length<2)return[];let r=[];for(let e=0;e<n.length-1;e++)r.push(t.Cartesian3.midpoint(n[e],n[e+1],new t.Cartesian3));return r},onDrag({viewer:t,sampled:r,packable:i,event:a,index:o,lockCamera:s,dragging:c}){s();let l=(0,n.canvasCoordToCartesian)(a.endPosition,t.scene);if(!l)return;let u=[...i.positions??[]];e===-1?(e=o,u.splice(o+1,0,l)):u[e+1]=l,c||(e=-1),r.setSample({time:i.time,derivative:i.derivative,positions:u})},render:({position:e,action:n})=>{let r={[v.IDLE]:t.Color.GREEN.withAlpha(.4),[v.HOVER]:t.Color.GREEN.withAlpha(.6),[v.ACTIVE]:t.Color.GREEN.withAlpha(1)};return{position:e,point:{pixelSize:6,color:r[n],disableDepthTestDistance:1/0,outlineWidth:1,outlineColor:t.Color.WHITE.withAlpha(.4)}}}}}let D=`data:image/svg+xml;utf8,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m18 9l3 3l-3 3m-3-3h6M6 9l-3 3l3 3m-3-3h6m0 6l3 3l3-3m-3-3v6m3-15l-3-3l-3 3m3-3v6"/></svg>`)}`;function O(){return{disabled:({active:e,defining:t})=>!e||t,cursor:`pointer`,dragCursor:`crosshair`,format(e){let r=e.positions??[];if(r.length===0)return[];if(r.length===1)return[r[0]];{let e=t.Rectangle.center(t.Rectangle.fromCartesianArray(r));return[(0,n.toCartesian3)(e)]}},onDrag({viewer:e,sampled:r,packable:i,event:a,lockCamera:o,dragging:s}){s&&o();let c=(0,n.canvasCoordToCartesian)(a.startPosition,e.scene),l=(0,n.canvasCoordToCartesian)(a.endPosition,e.scene);if(!c||!l)return;let u=t.Cartesian3.subtract(l,c,new t.Cartesian3),d=[...i.positions??[]];r.setSample({time:i.time,derivative:i.derivative,positions:d.map(e=>t.Cartesian3.add(e,u,new t.Cartesian3))})},render:({position:e,action:n})=>{let r={[v.IDLE]:t.Color.WHITE,[v.HOVER]:t.Color.WHITE,[v.ACTIVE]:t.Color.AQUA.withAlpha(1)};return{position:e,billboard:{image:D,width:20,height:20,color:r[n],pixelOffset:new t.Cartesian3(0,-20),horizontalOrigin:t.HorizontalOrigin.CENTER,verticalOrigin:t.VerticalOrigin.BOTTOM,disableDepthTestDistance:1/0}}}}}function k(e){if(e.length<3)throw Error(`positions must >= 3`);if(e.length===3)return[[e[0].clone(),e[1].clone(),e[2].clone()]];let n=t.CoplanarPolygonGeometry.createGeometry(t.CoplanarPolygonGeometry.fromPositions({positions:e,vertexFormat:t.VertexFormat.POSITION_ONLY}));if(!n)throw Error(`positions无法组成有效的geometry,检查点位是否错误`);let r=n.attributes.position.values,i=n.indices,a=[];for(let e=0;e<i.length;e+=3){let n=t.Cartesian3.unpack(r,i[e]*3,new t.Cartesian3),o=t.Cartesian3.unpack(r,i[e+1]*3,new t.Cartesian3),s=t.Cartesian3.unpack(r,i[e+2]*3,new t.Cartesian3);a.push([n,o,s])}return a}async function A(e){let{positions:n,scene:r,classificationType:i=t.ClassificationType.BOTH,terrainProvider:a=r.terrainProvider}=e,o=[t.ClassificationType.BOTH,t.ClassificationType.CESIUM_3D_TILE].includes(i),s=[t.ClassificationType.BOTH,t.ClassificationType.TERRAIN].includes(i),c=new Promise(e=>{o?r.clampToHeightMostDetailed(n.map(e=>e.clone())).then(e).catch(t=>{console.warn(t),e([])}):e([])}),l=new Promise(e=>{s&&a?(0,t.sampleTerrainMostDetailed)(a,n.map(e=>t.Cartographic.fromCartesian(e))).then(t=>e(t)).catch(t=>{console.warn(t),e([])}):e([])}),[u,d]=await Promise.all([c,l]),f=[];return n.forEach((e,n)=>{let r=u[n]||d[n]?t.Ellipsoid.WGS84.cartographicToCartesian(d[n]):e.clone();f.push(r)}),f}function j(e){let n=e?.clampToGround??!1,r=e?.classificationType??t.ClassificationType.BOTH,i=Math.floor(e?.density??10);return{scene:e?.scene,clampToGround:n,classificationType:r,terrainProvider:e?.terrainProvider,density:i}}async function M(e,n){if(e.length<3)throw Error(`positions must >= 3`);let{density:r,scene:i,clampToGround:a,classificationType:o,terrainProvider:s}=j(n);if(r<=0)throw Error(`options.density must > 0`);let c=t.Rectangle.fromCartesianArray(e),l=c.north-c.south,u=c.east-c.west,d=Math.max(u,l),f=d/r,p=t.PolygonGeometry.fromPositions({positions:e,vertexFormat:t.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,granularity:f}),m=t.PolygonGeometry.createGeometry(p),h=m.attributes.position.values;if(!m||!h)throw Error(`positions无法组成有效的geometry,检查点位是否错误`);let g=m.indices,_=[];for(let e=0;e<g.length;e+=3){let n=t.Cartesian3.unpack(h,g[e]*3,new t.Cartesian3),r=t.Cartesian3.unpack(h,g[e+1]*3,new t.Cartesian3),i=t.Cartesian3.unpack(h,g[e+2]*3,new t.Cartesian3);_.push(n,r,i)}if(a){if(!i)throw Error("scene is required on `clampToGround == true`.");let e=await A({scene:i,terrainProvider:s,positions:_,classificationType:o});_=e}let v=[];for(;_?.length;){let[e,t,n]=_.splice(0,3);v.push([e,t,n])}return v}function N(e,n,r){let i=t.Cartesian3.subtract(e,n,new t.Cartesian3),a=t.Cartesian3.subtract(r,n,new t.Cartesian3),o=t.Cartesian3.cross(i,a,i);return t.Cartesian3.magnitude(o)*.5}function P(e){let n=e?.clampToGround??!1,r=e?.classificationType??t.ClassificationType.BOTH,i=Math.floor(e?.density??10);return{scene:e?.scene,clampToGround:n,classificationType:r,terrainProvider:e?.terrainProvider,density:i}}async function F(e,t){if(e.length<2)throw Error(`positions.length must >= 2`);let{density:n,scene:r,clampToGround:i,classificationType:a,terrainProvider:o}=P(t);if(n<=0)throw Error(`options.density must > 0`);if(!i){let t=k(e);return t.reduce((e,t)=>e+=N(...t),0)}let s=await M(e,{density:n,scene:r,clampToGround:i,classificationType:a,terrainProvider:o});return s.reduce((e,t)=>e+=N(...t),0)}let I=new p({type:`measureArea`,allowManualComplete:e=>e.positions.length>=3,skeletons:[w,T],initEntites:()=>[new t.Entity({label:{font:`14pt`},polyline:{material:t.Color.YELLOW.withAlpha(.5)},polygon:{material:t.Color.YELLOW.withAlpha(.5)}})],render(e){let{mouse:r,packable:i}=e,a=e.previous.entities?.[0]??new t.Entity({label:{font:`14pt`},polyline:{material:t.Color.YELLOW.withAlpha(.5)},polygon:{material:t.Color.YELLOW.withAlpha(.5)}}),o=[...i.positions??[]];return r&&o.push(r),o.length===2?(a.position=void 0,a.label.text=void 0,a.polygon.hierarchy=void 0,a.polyline.positions=new t.CallbackProperty(()=>o,!1)):o.length>=3?(o.push(o[0]),a.position=new t.ConstantPositionProperty((0,n.toCartesian3)(t.Rectangle.center(t.Rectangle.fromCartesianArray(o)))),a.label.text=new t.ConstantProperty(``),F(o).then(e=>{let n=``;n=e/1e3/1e3>10?`${(e/1e3/1e3).toFixed(2)}km²`:`${(+e).toFixed(2)}m²`,a.label.text=new t.ConstantProperty(n)}),a.polyline.positions=void 0,a.polygon.hierarchy=new t.CallbackProperty(()=>o.length>=3?new t.PolygonHierarchy([...o]):void 0,!1)):(a.position=void 0,a.polygon.hierarchy=void 0,a.polyline.positions=void 0),{entities:[a]}}}),L=new p({type:`billboard`,complete:e=>e.positions.length>=1,skeletons:[O],initEntites:()=>[new t.Entity({billboard:{image:`/favicon.svg`,width:32,height:32}})],render(e){let{mouse:n,packable:r}=e,i=e.previous.entities?.[0]??new t.Entity({billboard:{}}),a=r.positions?.[0]??n;return i.position=new t.CallbackPositionProperty(()=>a,!0),{entities:[i]}}}),R=new p({type:`label`,complete:e=>e.positions.length>=1,skeletons:[O],initEntites:()=>[new t.Entity({label:{text:`Label`}})],render(e){let{mouse:n,packable:r}=e,i=e.previous.entities?.[0]??new t.Entity({label:{}}),a=r.positions?.[0]??n;return i.position=new t.CallbackPositionProperty(()=>a,!0),{entities:[i]}}}),z=new p({type:`polygon`,allowManualComplete:e=>e.positions.length>=3,skeletons:[w,T,O],initEntites:()=>[new t.Entity({polyline:{material:t.Color.YELLOW.withAlpha(.5)},polygon:{material:t.Color.YELLOW.withAlpha(.5)}})],render(e){let{mouse:n,packable:r}=e,i=e.previous.entities?.[0]??new t.Entity({polyline:{material:t.Color.YELLOW.withAlpha(.5)},polygon:{material:t.Color.YELLOW.withAlpha(.5)}}),a=[...r.positions??[]];return n&&a.push(n),a.length===2?(i.polygon.hierarchy=void 0,i.polyline.positions=new t.CallbackProperty(()=>a,!1)):a.length>=3?(i.polyline.positions=void 0,i.polygon.hierarchy=new t.CallbackProperty(()=>(a.push(a[0]),a.length>=3?new t.PolygonHierarchy([...a]):void 0),!1)):(i.polygon.hierarchy=void 0,i.polyline.positions=void 0),{entities:[i]}}}),B=new p({type:`polyline`,allowManualComplete:e=>e.positions.length>=2,skeletons:[w,E,O],initEntites:()=>[new t.Entity({polyline:{width:1}})],render(e){let{mouse:n,packable:r}=e,i=e.previous.entities?.[0]??new t.Entity({polyline:{}});return i.polyline.positions=new t.CallbackProperty(()=>{let e=[...r.positions??[]].concat(n?[n]:[]);return e.length>=2?e:[]},!1),{entities:[i]}}}),V=new p({type:`rectangle`,complete:e=>e.positions.length>=2,skeletons:[w,T,O],initEntites:()=>[new t.Entity({rectangle:{material:t.Color.YELLOW.withAlpha(.5)}})],render(e){let{mouse:n,packable:r}=e,i=e.previous.entities?.[0]??new t.Entity({rectangle:{material:t.Color.YELLOW.withAlpha(.5)}}),a=[...r.positions??[]];return n&&a.push(n),a.length>=2?i.rectangle.coordinates=new t.CallbackProperty(()=>t.Rectangle.fromCartesianArray(a),!1):i.rectangle.coordinates=void 0,{entities:[i]}}});exports.PlotAction=v,exports.PlotFeature=_,exports.PlotScheme=p,exports.PlotSkeletonEntity=y,exports.SampledPlotProperty=g,exports.SampledPlotStrategy=m,exports.control=w,exports.interval=T,exports.intervalNonclosed=E,exports.moved=O,exports.schemeBillboard=L,exports.schemeLabel=R,exports.schemeMeasureArea=I,exports.schemePolygon=z,exports.schemePolyline=B,exports.schemeRectangle=V,exports.usePlot=C})(this.Vesium=this.Vesium||{},Cesium,Vesium,VueUse,Vue);
1
+ (function(exports,t,n,r,i,a){var o=Object.create,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,f=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=l(t),a=0,o=i.length,u;a<o;a++)u=i[a],!d.call(e,u)&&u!==n&&s(e,u,{get:(e=>t[e]).bind(null,u),enumerable:!(r=c(t,u))||r.enumerable});return e},p=(e,t,n)=>(n=e==null?{}:o(u(e)),f(t||!e||!e.__esModule?s(n,`default`,{value:e,enumerable:!0}):n,e));t=p(t),n=p(n),r=p(r),i=p(i),a=p(a);var m=class e{constructor(e){this.type=e.type,this.complete=e.complete,this.allowManualComplete=e.allowManualComplete,this.definingCursor=e.definingCursor??`crosshair`,this.skeletons=e.skeletons?.map(e=>e())??[],this.initRender=e.initRender,this.render=e.render}type;complete;allowManualComplete;definingCursor;skeletons;initRender;render;static _record=new Map;static getCacheTypes(){return[...this._record.keys()]}static getCache(t){return e._record.get(t)}static setCache(t){(0,n.assertError)(!t.type,"`scheme.type` is required"),e._record.set(t.type,t)}static resolve(t){if(typeof t==`string`){let n=e.getCache(t);return(0,r.assert)(!!n,`scheme ${t} not found`),n}else if(t instanceof e)return t;else return new e(t)}};let h=function(e){return e[e.NEAR=0]=`NEAR`,e[e.CYCLE=1]=`CYCLE`,e[e.STRICT=2]=`STRICT`,e}({}),g=(e,n,r,i)=>i===0?{time:e,positions:n.positions?.map(e=>e.clone()),derivative:n.derivative}:i===1?{time:e,positions:r.positions?.map(e=>e.clone()),derivative:n.derivative}:{time:e,positions:r.positions?.map((e,r)=>{let a=n.positions?.[r];return a?t.Cartesian3.lerp(a,e,i,new t.Cartesian3):e}),derivative:n.derivative};var _=class e{constructor(e){this.interpolationAlgorithm=e?.interpolationAlgorithm,this.strategy=e?.strategy??h.NEAR,e?.packables?.forEach(e=>this.setSample(e)),this._times.length||this.setSample({time:new t.JulianDate(0,0),positions:[],derivative:void 0})}static defaultInterpolationAlgorithm=g;strategy;interpolationAlgorithm;_times=[];_sampleds=[];_derivatives=[];get isConstant(){return this._times.length===0}_definitionChanged=new t.Event;get definitionChanged(){return this._definitionChanged}getTimes(){return this._times.map(e=>e.clone())}getIndexScope(e){if(!this._times.length)return;let n=this._times[0],r=this._times[this._times.length-1];if(t.JulianDate.lessThan(e,n)||t.JulianDate.greaterThan(e,r))switch(this.strategy){case h.STRICT:return;case h.NEAR:e=t.JulianDate.lessThan(e,this._times[0])?this._times[0].clone():this._times[this._times.length-1].clone();break;case h.CYCLE:{let n=t.JulianDate.toDate(this._times[0]).getTime(),r=t.JulianDate.toDate(this._times[this._times.length-1]).getTime(),i=r-n,a=t.JulianDate.toDate(e).getTime(),o=(a-n)%i,s=new Date(n+o);e=t.JulianDate.fromDate(s);break}}let i=this._times.findIndex(n=>t.JulianDate.lessThanOrEquals(e,n)),a=Math.min(i,this._times.length-1),o=t.JulianDate.toDate(this._times[i]).getTime(),s=t.JulianDate.toDate(this._times[a]).getTime(),c=t.JulianDate.toDate(e).getTime();return{prevIndex:i,nextIndex:a,proportion:(c-o)/(s-o)||0}}getValue(t,n){if(n??={time:t,positions:[]},Object.assign(n,{time:t?.clone(),positions:[],derivative:void 0}),!t)return n.time=this._times[0].clone(),n.positions=this._sampleds[0]?.map(e=>e.clone(e)),n.derivative=this._derivatives[0],n;let r=this.getIndexScope(t);if(!r)return n;n.time=t;let{prevIndex:i,nextIndex:a,proportion:o}=r,s={time:this._times[i],positions:this._sampleds[i],derivative:this._derivatives[i]},c={time:this._times[a],positions:this._sampleds[a],derivative:this._derivatives[a]},l=(this.interpolationAlgorithm||e.defaultInterpolationAlgorithm)(t,s,c,o);return Object.assign(n,l),n}setSample(e){let n=e.time?.clone()??this._times[0].clone(),r=e.positions?.map(e=>e.clone())??[],i=e.derivative,a=this._times.findIndex(e=>t.JulianDate.equals(n,e));a===-1?this._times.length===0?(this._times[0]=n,this._sampleds[0]=r,this._derivatives[0]=e.derivative):t.JulianDate.lessThan(n,this._times[0])?(this._times.splice(0,0,n),this._sampleds.splice(0,0,r),this._derivatives.splice(0,0,i)):t.JulianDate.greaterThan(n,this._times[this._times.length-1])&&(this._times.push(n),this._sampleds.push(r),this._derivatives.push(i)):(this._times[a]=n,this._sampleds[a]=r,this._derivatives[a]=e.derivative),this.definitionChanged.raiseEvent(this)}setSamples(e){e.forEach(e=>this.setSample(e))}removeSample(e){let t=this._times.findIndex(t=>t.equals(e));if(t!==-1){this._sampleds.splice(t,1),this._derivatives.splice(t,1);let e=this._times.splice(t,1);if(e.length)return this._definitionChanged.raiseEvent(this),!0}return!1}removeSamples(e){for(let n=0;n<this._times.length;n++){let r=this._times[n];t.TimeInterval.contains(e,r)&&this.removeSample(r)}}equals(e){return e===this}},v=class{constructor(e){let{id:n,disabled:r=!1,sampled:i}=e;this._id=n||(0,t.createGuid)(),this._scheme=m.resolve(e.scheme),this._definitionChanged=new t.Event,this._defining=!0,this._disabled=r,this._sampled=i instanceof _?i:new _(i),this._sampled.definitionChanged.addEventListener(e=>this._definitionChanged.raiseEvent(this,`sampled`,e,e),this);let a=this._scheme.initRender?.()??{};this._entities=[...a.entities??[]],this._primitives=[...a.primitives??[]],this._groundPrimitives=[...a.groundPrimitives??[]],this._skeletons=[]}_id;get id(){return this._id}_scheme;get scheme(){return this._scheme}_definitionChanged;get definitionChanged(){return this._definitionChanged}_defining;get defining(){return this._defining}static setDefining(e,t){e._defining!==t&&(e._definitionChanged.raiseEvent(e,`defining`,t,e._defining),e._defining=t)}_disabled;get disabled(){return this._disabled}set disabled(e){this.disabled=e}_sampled;get sampled(){return this._sampled}_entities;get entities(){return this._entities}set entities(e){this._definitionChanged.raiseEvent(this,`entities`,e,this._entities),this._entities=e}_primitives;get primitives(){return this._primitives}set primitives(e){this._definitionChanged.raiseEvent(this,`primitives`,e,this._primitives),this._primitives=e}_groundPrimitives;get groundPrimitives(){return this._groundPrimitives}set groundPrimitives(e){this._definitionChanged.raiseEvent(this,`groundPrimitives`,e,this._groundPrimitives),this._groundPrimitives=e}_skeletons;get skeletons(){return this._skeletons}set skeletons(e){this._definitionChanged.raiseEvent(this,`skeletons`,e,this._skeletons),this._skeletons=e}};let y=function(e){return e[e.IDLE=0]=`IDLE`,e[e.HOVER=1]=`HOVER`,e[e.ACTIVE=2]=`ACTIVE`,e}({});var b=class extends t.Entity{constructor(e){super(e)}};function x(e,a,o){let s=(0,n.useViewer)(),c=(0,n.usePrimitive)(new t.PrimitiveCollection),l=(0,n.usePrimitive)(new t.PrimitiveCollection,{collection:`ground`}),u=(0,n.useDataSource)(new t.CustomDataSource),d=(0,n.useEntityScope)({collection:()=>u.value.entities}),f=(0,n.usePrimitiveScope)({collection:()=>c.value}),p=(0,n.usePrimitiveScope)({collection:()=>l.value}),m=(0,i.shallowRef)();(0,n.useScreenSpaceEventHandler)(t.ScreenSpaceEventType.MOUSE_MOVE,e=>{m.value=(0,n.canvasCoordToCartesian)(e?.endPosition,s.value.scene)}),(0,r.watchArray)(e,(e,t,n,r=[])=>{r.forEach(e=>{d.removeWhere(t=>e.entities.includes(t)),f.removeWhere(t=>e.primitives.includes(t)),p.removeWhere(t=>e.groundPrimitives.includes(t))}),n.forEach(e=>{e.entities.forEach(e=>d.add(e)),e.primitives.forEach(e=>f.add(e)),e.groundPrimitives.forEach(e=>p.add(e))})},{immediate:!0,flush:`post`}),(0,n.useCesiumEventListener)(()=>e.value.map(e=>e.definitionChanged),(e,t,r,i)=>{if(t===`entities`){let{added:e,removed:t}=(0,n.arrayDiff)(r,i);e.forEach(e=>d.add(e)),t.forEach(e=>d.remove(e))}else if(t===`primitives`){let{added:e,removed:t}=(0,n.arrayDiff)(r,i);e.forEach(e=>f.add(e)),t.forEach(e=>f.remove(e))}else if(t===`groundPrimitives`){let{added:e,removed:t}=(0,n.arrayDiff)(r,i);e.forEach(e=>p.add(e)),t.forEach(e=>p.remove(e))}});let h=async e=>{let t=await e.scheme.render?.({packable:e.sampled.getValue(o()),mouse:e.defining?m.value:void 0,defining:e.defining,previous:{entities:e.entities,primitives:e.primitives,groundPrimitives:e.groundPrimitives}});e.entities=t?.entities??[],e.primitives=t?.primitives??[],e.groundPrimitives=t?.groundPrimitives??[]};return(0,i.watch)(a,(e,t)=>{t&&h(t)}),(0,n.useCesiumEventListener)(()=>e.value.map(e=>e.definitionChanged),(e,t)=>{[`disabled`,`defining`,`scheme`,`sampled`,`time`].includes(t)&&h(e)}),(0,i.watch)(m,()=>{e.value.forEach(e=>e.defining&&h(e))}),{primitives:(0,i.computed)(()=>Array.from(f.scope)),groundPrimitives:(0,i.computed)(()=>Array.from(f.scope)),entities:(0,i.computed)(()=>Array.from(d.scope))}}function ee(e,a){let o=(0,n.useViewer)(),s=(0,i.ref)(!1),c=(0,i.computed)(()=>e.value?.sampled.getValue(a()));(0,n.useScreenSpaceEventHandler)(t.ScreenSpaceEventType.LEFT_CLICK,async t=>{if(await(0,r.promiseTimeout)(1),!e.value||!c.value||s.value)return;let{scheme:i,defining:a,sampled:l}=e.value;if(!a)return;let u=(0,n.canvasCoordToCartesian)(t.position,o.value.scene);if(!u)return;c.value.positions??=[],c.value.positions.push(u),l.setSample(c.value);let d=i.complete?.(c.value);d&&v.setDefining(e.value,!1)}),(0,n.useScreenSpaceEventHandler)(t.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,async t=>{if(!e.value||!c.value)return;s.value=!0,await(0,r.promiseTimeout)(2),s.value=!1;let{scheme:i,defining:a}=e.value;if(!a)return;let l=(0,n.canvasCoordToCartesian)(t.position,o.value.scene);if(!l)return;let u=i.allowManualComplete?.(c.value);u&&v.setDefining(e.value,!1)}),(0,n.useScreenSpaceEventHandler)(t.ScreenSpaceEventType.RIGHT_CLICK,async()=>{if(!e.value||!c.value)return;let{defining:t,sampled:n}=e.value;t&&(c.value.positions??=[],c.value.positions.length!==0&&(c.value.positions.splice(c.value.positions.length-1,1),n.setSample(c.value)))});let l=(0,i.ref)(),u=()=>{if(!e.value?.defining)l.value&&(l.value=void 0,o.value.container.parentElement.style.removeProperty(`cursor`));else{let t=e.value.scheme.definingCursor;l.value=(0,n.isFunction)(t)?t(c.value):t,l.value&&o.value?.container.parentElement.style.setProperty(`cursor`,l.value)}};(0,n.useCesiumEventListener)(()=>e.value?.definitionChanged,(e,t)=>{(t===`defining`||t===`sampled`)&&u()}),(0,i.watch)(e,()=>u())}function te(e,a,o){let s=(0,n.useViewer)(),c=(0,n.useDataSource)(new t.CustomDataSource),l=(0,n.useEntityScope)({collection:()=>c.value.entities}),u=(0,i.shallowRef)(),d=(0,i.shallowRef)(),f=e=>e?d.value?.id===e.id?y.ACTIVE:u.value?.id===e.id?y.HOVER:y.IDLE:y.IDLE,p=(e,t)=>{let r=e.skeletons,i=[];if(t||e.disabled)e.skeletons=[];else{let t=e.sampled.getValue(o()),s=e.defining,c=a.value===e,l=e.scheme.skeletons;l.forEach(a=>{let o=(0,n.isFunction)(a.disabled)?a.disabled({active:c,defining:s}):a.disabled;if(o)return;let l=a.format?.(t)??t?.positions??[];l.forEach((n,o)=>{let u=r.find(e=>e.index===o&&e.skeleton===a),d=a.render?.({defining:s,active:c,index:o,packable:t,positions:l,position:n,action:f(u)}),p=new b(d??{});u?p.propertyNames.forEach(e=>{e!==`id`&&(u[e]=p[e])}):u=p,u.plot=e,u.skeleton=a,u.index=o,i.push(u)})})}e.skeletons=i},{addGraphicEvent:m}=(0,n.useGraphicEvent)();return(0,i.watchEffect)(e=>{let t=m(`global`,`DRAG`,({event:e,pick:t,dragging:n,lockCamera:r})=>{if(t.id instanceof b&&l.scope.has(t.id)){let i=t.id,c=i.plot;if(c.defining)return;d.value=i;let l=i.skeleton,u=i.index,f=c.sampled.getValue(o());l.onDrag?.({viewer:s.value,sampled:c.sampled,packable:f,active:a.value===c,index:u,event:e,dragging:n,lockCamera:r})}else d.value=void 0},{cursor:({pick:e})=>{if(!a.value?.defining&&l.scope.has(e.id)){let t=e.id.skeleton;return(0,n.isFunction)(t?.cursor)?t.cursor(e):(0,i.toValue)(t?.cursor)}},dragCursor:({pick:e})=>{if(!a.value?.defining&&l.scope.has(e.id)){let t=e.id.skeleton;return(0,n.isFunction)(t?.dragCursor)?t.dragCursor(e):(0,i.toValue)(t?.dragCursor)}}});e(t)}),(0,r.onKeyStroke)(e=>{if(d.value){let t=d.value,n=t.plot,r=t.skeleton,i=t.index,a=n.sampled.getValue(o());r.onKeyPressed?.({viewer:s.value,sampled:n.sampled,packable:a,index:i,keyEvent:e})}}),(0,i.watchEffect)(e=>{let t=m(`global`,`HOVER`,({hovering:e,pick:t})=>{if(e&&t.id instanceof b&&l.scope.has(t.id)){let e=t.id;u.value=e}else u.value=void 0});e(t)}),(0,i.watchEffect)(e=>{let t=m(`global`,`LEFT_CLICK`,({event:e,pick:t})=>{if(t.id instanceof b&&l.scope.has(t.id)){let n=t.id;d.value=n;let r=n.plot,i=n.skeleton,c=n.index,l=r.sampled.getValue(o());i.onLeftClick?.({viewer:s.value,sampled:r.sampled,packable:l,active:a.value===r,defining:r.defining,index:c,event:e})}else d.value=void 0});e(t)}),(0,r.watchArray)(e,(e,t,n,r=[])=>{n.forEach(e=>p(e)),r.forEach(e=>p(e,!0))}),(0,n.useCesiumEventListener)(()=>e.value.map(e=>e.definitionChanged),(e,t,r,a)=>{if([`disabled`,`defining`,`scheme`,`sampled`,`time`].includes(t))(0,i.nextTick)(()=>p(e));else if(t===`skeletons`){let{added:e,removed:t}=(0,n.arrayDiff)(r,a);e.forEach(e=>l.add(e)),t.forEach(e=>l.remove(e))}}),(0,i.watch)(a,(e,t)=>{e&&p(e),t&&p(t)}),{dataSource:c}}function S(e){let r=e?.time||(0,i.shallowRef)(),a=(0,n.useViewer)(),o=()=>r.value?.clone()||new t.JulianDate(0,0),s=(0,i.shallowReactive)(new Set),c=(0,i.computed)(()=>Array.from(s)),l=(0,i.shallowRef)(),u=(0,i.shallowRef)();(0,n.useCesiumEventListener)([()=>l.value?.sampled.definitionChanged],()=>{u.value=l.value?.sampled.getValue(o())}),ee(l,o),x(c,l,o),te(c,l,o),(0,n.useScreenSpaceEventHandler)(t.ScreenSpaceEventType.LEFT_CLICK,e=>{if(l.value?.defining)return;let t=a.value?.scene.pick(e.position.clone());if(!(t?.id?.plot instanceof v)){if(!t){l.value=void 0;return}l.value=c.value.find(e=>(0,n.pickHitGraphic)(t,[...e.entities,...e.primitives,...e.groundPrimitives]))}});let d,f;(0,i.watch)(l,(e,t)=>{if(t&&t.defining){let e=t.sampled.getValue(o()),n=t.scheme.allowManualComplete?.(e);n?(v.setDefining(t,!1),d?.(t)):s.delete(t)}});let p=async e=>new Promise((t,n)=>{d=t,f=n;let r=e instanceof v?e:new v(e);return s.has(r)||s.add(r),l.value=r,t(r)}),m=e=>(e===l.value&&(l.value=void 0),s.has(e)?(s.delete(e),!0):!1);return{plots:c,time:r,operate:p,remove:m,cancel:f}}function C(){return{disabled:({active:e})=>!e,cursor:`pointer`,dragCursor:`crosshair`,onDrag({viewer:e,sampled:t,packable:r,event:i,index:a,lockCamera:o}){o();let s=(0,n.canvasCoordToCartesian)(i.endPosition,e.scene);if(s){let e=[...r.positions??[]];e[a]=s,t.setSample({time:r.time,derivative:r.derivative,positions:e})}},onKeyPressed({viewer:e,keyEvent:t,sampled:r,packable:i,index:a}){let o=(0,n.toCartographic)(e.camera.position)?.height;if(!o||![`ArrowUp`,`ArrowRight`,`ArrowDown`,`ArrowLeft`].includes(t.key))return;t.preventDefault();let s=0;switch(t.key){case`ArrowRight`:s=Math.PI/2;break;case`ArrowDown`:s=Math.PI;break;case`ArrowLeft`:s=-Math.PI/2;break;case`ArrowUp`:s=0;break}let c=(e.camera.heading+s)%(2*Math.PI),l=[...i.positions??[]],u=(0,n.toCartographic)(l[a]),d=o/1e5,f=d*Math.PI/180/1e3;u.latitude+=f*Math.cos(c),u.longitude+=f*Math.sin(c),l[a]=(0,n.toCartesian3)(u),r.setSample({time:i.time,derivative:i.derivative,positions:l})},render:({position:e,action:n})=>{let r={[y.IDLE]:t.Color.BLUE.withAlpha(.4),[y.HOVER]:t.Color.BLUE.withAlpha(.6),[y.ACTIVE]:t.Color.AQUA.withAlpha(1)};return{position:e,point:{pixelSize:8,color:r[n],disableDepthTestDistance:1/0,outlineWidth:1,outlineColor:t.Color.WHITE.withAlpha(.4)}}}}}function w(){let e=-1;return{disabled:({active:e,defining:t})=>!e||t,cursor:`pointer`,dragCursor:`crosshair`,format(e){let n=e.positions??[];return n.length<2?[]:n.map((e,r)=>{let i=r===n.length-1?n[0]:n[r+1];return t.Cartesian3.midpoint(e,i,new t.Cartesian3)})},onDrag({viewer:t,sampled:r,packable:i,event:a,index:o,lockCamera:s,dragging:c}){s();let l=(0,n.canvasCoordToCartesian)(a.endPosition,t.scene);if(!l)return;let u=[...i.positions??[]];e===-1?(e=o,u.splice(o+1,0,l)):u[e+1]=l,c||(e=-1),r.setSample({time:i.time,derivative:i.derivative,positions:u})},render:({position:e,action:n,active:r})=>{if(!r)return;let i={[y.IDLE]:t.Color.GREEN.withAlpha(.4),[y.HOVER]:t.Color.GREEN.withAlpha(.6),[y.ACTIVE]:t.Color.GREEN.withAlpha(1)};return{position:e,point:{pixelSize:6,color:i[n],disableDepthTestDistance:1/0,outlineWidth:1,outlineColor:t.Color.WHITE.withAlpha(.4)}}}}}function T(){let e=-1;return{disabled:({active:e,defining:t})=>!e||t,cursor:`pointer`,dragCursor:`crosshair`,format(e){let n=e.positions??[];if(n.length<2)return[];let r=[];for(let e=0;e<n.length-1;e++)r.push(t.Cartesian3.midpoint(n[e],n[e+1],new t.Cartesian3));return r},onDrag({viewer:t,sampled:r,packable:i,event:a,index:o,lockCamera:s,dragging:c}){s();let l=(0,n.canvasCoordToCartesian)(a.endPosition,t.scene);if(!l)return;let u=[...i.positions??[]];e===-1?(e=o,u.splice(o+1,0,l)):u[e+1]=l,c||(e=-1),r.setSample({time:i.time,derivative:i.derivative,positions:u})},render:({position:e,action:n})=>{let r={[y.IDLE]:t.Color.GREEN.withAlpha(.4),[y.HOVER]:t.Color.GREEN.withAlpha(.6),[y.ACTIVE]:t.Color.GREEN.withAlpha(1)};return{position:e,point:{pixelSize:6,color:r[n],disableDepthTestDistance:1/0,outlineWidth:1,outlineColor:t.Color.WHITE.withAlpha(.4)}}}}}let ne=`data:image/svg+xml;utf8,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m18 9l3 3l-3 3m-3-3h6M6 9l-3 3l3 3m-3-3h6m0 6l3 3l3-3m-3-3v6m3-15l-3-3l-3 3m3-3v6"/></svg>`)}`;function E(){return{disabled:({active:e,defining:t})=>!e||t,cursor:`pointer`,dragCursor:`crosshair`,format(e){let r=e.positions??[];if(r.length===0)return[];if(r.length===1)return[r[0]];{let e=t.Rectangle.center(t.Rectangle.fromCartesianArray(r));return[(0,n.toCartesian3)(e)]}},onDrag({viewer:e,sampled:r,packable:i,event:a,lockCamera:o,dragging:s}){s&&o();let c=(0,n.canvasCoordToCartesian)(a.startPosition,e.scene),l=(0,n.canvasCoordToCartesian)(a.endPosition,e.scene);if(!c||!l)return;let u=t.Cartesian3.subtract(l,c,new t.Cartesian3),d=[...i.positions??[]];r.setSample({time:i.time,derivative:i.derivative,positions:d.map(e=>t.Cartesian3.add(e,u,new t.Cartesian3))})},render:({position:e,action:n})=>{let r={[y.IDLE]:t.Color.WHITE,[y.HOVER]:t.Color.WHITE,[y.ACTIVE]:t.Color.AQUA.withAlpha(1)};return{position:e,billboard:{image:ne,width:20,height:20,color:r[n],pixelOffset:new t.Cartesian3(0,-20),horizontalOrigin:t.HorizontalOrigin.CENTER,verticalOrigin:t.VerticalOrigin.BOTTOM,disableDepthTestDistance:1/0}}}}}function re(e){if(e.length<3)throw Error(`positions must >= 3`);if(e.length===3)return[[e[0].clone(),e[1].clone(),e[2].clone()]];let n=t.CoplanarPolygonGeometry.createGeometry(t.CoplanarPolygonGeometry.fromPositions({positions:e,vertexFormat:t.VertexFormat.POSITION_ONLY}));if(!n)throw Error(`positions无法组成有效的geometry,检查点位是否错误`);let r=n.attributes.position.values,i=n.indices,a=[];for(let e=0;e<i.length;e+=3){let n=t.Cartesian3.unpack(r,i[e]*3,new t.Cartesian3),o=t.Cartesian3.unpack(r,i[e+1]*3,new t.Cartesian3),s=t.Cartesian3.unpack(r,i[e+2]*3,new t.Cartesian3);a.push([n,o,s])}return a}async function D(e){let{positions:n,scene:r,classificationType:i=t.ClassificationType.BOTH,terrainProvider:a=r.terrainProvider}=e,o=[t.ClassificationType.BOTH,t.ClassificationType.CESIUM_3D_TILE].includes(i),s=[t.ClassificationType.BOTH,t.ClassificationType.TERRAIN].includes(i),c=new Promise(e=>{o?r.clampToHeightMostDetailed(n.map(e=>e.clone())).then(e).catch(t=>{console.warn(t),e([])}):e([])}),l=new Promise(e=>{s&&a?(0,t.sampleTerrainMostDetailed)(a,n.map(e=>t.Cartographic.fromCartesian(e))).then(t=>e(t)).catch(t=>{console.warn(t),e([])}):e([])}),[u,d]=await Promise.all([c,l]),f=[];return n.forEach((e,n)=>{let r=u[n]||d[n]?t.Ellipsoid.WGS84.cartographicToCartesian(d[n]):e.clone();f.push(r)}),f}function ie(e){let n=e?.clampToGround??!1,r=e?.classificationType??t.ClassificationType.BOTH,i=Math.floor(e?.density??10);return{scene:e?.scene,clampToGround:n,classificationType:r,terrainProvider:e?.terrainProvider,density:i}}async function ae(e,n){if(e.length<3)throw Error(`positions must >= 3`);let{density:r,scene:i,clampToGround:a,classificationType:o,terrainProvider:s}=ie(n);if(r<=0)throw Error(`options.density must > 0`);let c=t.Rectangle.fromCartesianArray(e),l=c.north-c.south,u=c.east-c.west,d=Math.max(u,l),f=d/r,p=t.PolygonGeometry.fromPositions({positions:e,vertexFormat:t.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,granularity:f}),m=t.PolygonGeometry.createGeometry(p),h=m.attributes.position.values;if(!m||!h)throw Error(`positions无法组成有效的geometry,检查点位是否错误`);let g=m.indices,_=[];for(let e=0;e<g.length;e+=3){let n=t.Cartesian3.unpack(h,g[e]*3,new t.Cartesian3),r=t.Cartesian3.unpack(h,g[e+1]*3,new t.Cartesian3),i=t.Cartesian3.unpack(h,g[e+2]*3,new t.Cartesian3);_.push(n,r,i)}if(a){if(!i)throw Error("scene is required on `clampToGround == true`.");let e=await D({scene:i,terrainProvider:s,positions:_,classificationType:o});_=e}let v=[];for(;_?.length;){let[e,t,n]=_.splice(0,3);v.push([e,t,n])}return v}function O(e,n,r){let i=t.Cartesian3.subtract(e,n,new t.Cartesian3),a=t.Cartesian3.subtract(r,n,new t.Cartesian3),o=t.Cartesian3.cross(i,a,i);return t.Cartesian3.magnitude(o)*.5}function k(e){let n=e?.clampToGround??!1,r=e?.classificationType??t.ClassificationType.BOTH,i=Math.floor(e?.density??10);return{scene:e?.scene,clampToGround:n,classificationType:r,terrainProvider:e?.terrainProvider,density:i}}async function A(e,t){if(e.length<2)throw Error(`positions.length must >= 2`);let{density:n,scene:r,clampToGround:i,classificationType:a,terrainProvider:o}=k(t);if(n<=0)throw Error(`options.density must > 0`);if(!i){let t=re(e);return t.reduce((e,t)=>e+=O(...t),0)}let s=await ae(e,{density:n,scene:r,clampToGround:i,classificationType:a,terrainProvider:o});return s.reduce((e,t)=>e+=O(...t),0)}async function j(e){let{start:n,end:r,count:i,scene:a,clampToGround:o,classificationType:s,terrainProvider:c}=e,l=[];for(let e=0;e<i;e++){let e=t.Cartesian3.lerp(n,r,1/i,new t.Cartesian3);l.push(e)}if(l.push(r.clone()),!o)return l;if(!a)throw Error("scene is required on `clampToGround == true`.");let u=await D({scene:a,terrainProvider:c,positions:l,classificationType:s});return u}function M(e){let n=e?.clampToGround??!1,r=e?.classificationType??t.ClassificationType.BOTH,i=Math.floor(e?.density??50);return{scene:e?.scene,clampToGround:n,classificationType:r,terrainProvider:e?.terrainProvider,density:i}}async function N(e,n){if(e.length<2)throw Error(`positions.length must >= 2`);let r=M(n),i=[],a=0;if(e.forEach((n,r)=>{if(r!==e.length-1){let o=e[r+1],s=t.Cartesian3.distance(n,o);i.push(s),a+=s}}),!r.clampToGround)return{stages:i,count:a};let o=r.density;if(o<=0)throw Error(`options.density must > 0`);let s=i.map(e=>Math.floor(e/a*o)),c=o-s.reduce((e,t)=>e+=t,0);c&&(s[s.length-1]+=c);let l=s.map((t,n)=>j({scene:r.scene,start:e[n],end:e[n+1],count:t,clampToGround:!0,classificationType:r.classificationType,terrainProvider:r.terrainProvider})),u=await Promise.all(l),d=u.map(async e=>{let{count:t}=await N(e);return t}),f=await Promise.all(d);return{stages:f,count:f.reduce((e,t)=>e+=t,0)}}let oe=new m({type:`MeasureArea`,allowManualComplete:e=>e.positions.length>=3,skeletons:[C,w],initRender(){return{entities:[new t.Entity({label:{font:`14pt`},polyline:{material:t.Color.YELLOW.withAlpha(.5)},polygon:{material:t.Color.YELLOW.withAlpha(.5)}})]}},render(e){let r=e.previous.entities[0],{mouse:i,packable:a}=e,o=[...a.positions??[]];return i&&o.push(i),o.length===2?(r.position=void 0,r.label.text=void 0,r.polygon.hierarchy=void 0,r.polyline.positions=new t.CallbackProperty(()=>o,!1)):o.length>=3?(o.push(o[0]),r.position=new t.ConstantPositionProperty((0,n.toCartesian3)(t.Rectangle.center(t.Rectangle.fromCartesianArray(o)))),r.label.text=new t.ConstantProperty(``),A(o).then(e=>{let n=``;n=e/1e3/1e3>10?`${(e/1e3/1e3).toFixed(2)}km²`:`${(+e).toFixed(2)}m²`,r.label.text=new t.ConstantProperty(n)}),r.polyline.positions=void 0,r.polygon.hierarchy=new t.CallbackProperty(()=>o.length>=3?new t.PolygonHierarchy([...o]):void 0,!1)):(r.position=void 0,r.polygon.hierarchy=void 0,r.polyline.positions=void 0),{entities:[r]}}}),se=new m({type:`MeasureDistance`,allowManualComplete:e=>e.positions.length>=2,skeletons:[C],initRender(){return{entities:[new t.Entity({polyline:{width:2,material:t.Color.YELLOW.withAlpha(.5)}})]}},render(e){let n=e.previous.entities[0],{mouse:r,packable:i,previous:a}=e,o=a.entities,s=[...i.positions??[]];if(r&&s.push(r),s.length<2)return{entities:o};let c=o[0];return c.polyline??=new t.PolylineGraphics,c.polyline.positions=new t.CallbackProperty(()=>s,!1),s.forEach((e,n)=>{o[n+1]||(o[n+1]=new t.Entity({position:e,label:new t.LabelGraphics({backgroundColor:t.Color.fromCssColorString(`#fff`),font:`12pt sans-serif`})}))}),o.splice(s.length,o.length-s.length-1),N(s).then(({count:e,stages:n})=>{n.forEach((e,n)=>{o[n+1].position=new t.CallbackPositionProperty(()=>t.Cartesian3.midpoint(s[n],s[n+1],new t.Cartesian3),!1),o[n+1].label.text=new t.CallbackProperty(()=>`${e.toFixed(2)} m`,!1)}),n.length>1?(o[o.length-1].position=new t.CallbackPositionProperty(()=>s[s.length-1],!1),o[o.length-1].label.text=new t.CallbackProperty(()=>`${e.toFixed(2)} m`,!1)):(o[o.length-1].position=void 0,o[o.length-1].label.text=void 0)}),{entities:o}}}),ce=new m({type:`Billboard`,complete:e=>e.positions.length>=1,skeletons:[E],initRender:()=>({entities:[new t.Entity({billboard:{image:`/favicon.svg`,width:32,height:32}})]}),render(e){let{mouse:n,packable:r}=e,i=e.previous.entities?.[0]??new t.Entity({billboard:{}}),a=r.positions?.[0]??n;return i.position=new t.CallbackPositionProperty(()=>a,!0),{entities:[i]}}}),le=new m({type:`BillboardPinBuilder`,complete:e=>e.positions.length>=1,skeletons:[E],initRender(){return{entities:[new t.Entity({billboard:{}})]}},render(e){let n=e.previous.entities[0],r=e.packable.positions[0]??e.mouse;return n.position=new t.CallbackPositionProperty(()=>r,!0),{entities:[n]}}}),ue=new m({type:`Cylinder`,complete:e=>e.positions.length>=2,skeletons:[E,C],initRender(){return{entities:[new t.Entity({cylinder:{}})]}},render(e){let r=e.previous.entities[0],i=[...e.packable.positions];if(i.length===0)return e.previous;if(i.length===1){let t=e.mouse;t&&i.push(t)}if(i.length<2)return e.previous;r.position=new t.ConstantPositionProperty(i[0]);let a=t.Cartesian3.distance(i[0],i[1]);return r.cylinder.bottomRadius=new t.CallbackProperty(()=>a,!1),(e.defining||!(0,n.toPropertyValue)(r.cylinder.length))&&(r.cylinder.length=(0,n.toProperty)(a*2)),{entities:[r]}}}),de=new m({type:`Ellipse`,complete:e=>e.positions.length>=2,skeletons:[E,C],initRender(){return{entities:[new t.Entity({ellipse:{}})]}},render(e){let n=e.previous.entities[0],r=[...e.packable.positions];if(r.length===0)return e.previous;if(r.length===1){let t=e.mouse;t&&r.push(t)}if(r.length<2)return e.previous;n.position=new t.ConstantPositionProperty(r[0]);let i=t.Cartesian3.distance(r[0],r[1]);return n.ellipse.semiMinorAxis=new t.CallbackProperty(()=>i||1,!1),n.ellipse.semiMajorAxis=n.ellipse.semiMinorAxis,{entities:[n]}}}),fe=new m({type:`Label`,complete:e=>e.positions.length>=1,skeletons:[E],initRender(){return{entities:[new t.Entity({label:{text:`Label`}})]}},render(e){let n=e.previous.entities[0],r=e.packable.positions[0]??e.mouse;return n.position=new t.CallbackPositionProperty(()=>r,!0),{entities:[n]}}}),pe=new m({type:`Point`,complete:e=>e.positions.length>=1,skeletons:[E],initRender(){return{entities:[new t.Entity({point:{pixelSize:10,color:t.Color.RED}})]}},render(e){let n=e.previous.entities[0],r=e.packable.positions[0]??e.mouse;return n.position=new t.CallbackPositionProperty(()=>r,!0),{entities:[n]}}}),P=new m({type:`Polygon`,allowManualComplete:e=>e.positions.length>=2,skeletons:[E,C,w],initRender:()=>({entities:[new t.Entity({polyline:{},polygon:{}})]}),render(e){let{mouse:n,packable:r}=e,i=e.previous.entities[0],a=[...r.positions??[]];return n&&a.push(n),a.length===2?(i.polygon.hierarchy=void 0,i.polyline.positions=new t.CallbackProperty(()=>a,!1)):a.length>=3?(i.polyline.positions=void 0,i.polygon.hierarchy=new t.CallbackProperty(()=>(a.push(a[0]),a.length>=3?new t.PolygonHierarchy([...a]):void 0),!1)):(i.polygon.hierarchy=void 0,i.polyline.positions=void 0),{entities:[i]}}}),F=100,I=Math.PI/2,L=1e-4,me=Math.PI*2;function R(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function z(e){let t=0;return e&&Array.isArray(e)&&e.length>0&&e.forEach((n,r)=>{r<e.length-1&&(t+=R(n,e[r+1]))}),t}let B=e=>z(e)**.99;function V(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}function he(e,t,n){let r=[(e[0]+t[0])/2,(e[1]+t[1])/2],i=[r[0]-e[1]+t[1],r[1]+e[0]-t[0]],a=[(e[0]+n[0])/2,(e[1]+n[1])/2],o=[a[0]-e[1]+n[1],a[1]+e[0]-n[0]];return ge(r,i,a,o)}function ge(e,t,n,r){if(e[1]===t[1]){let t=(r[0]-n[0])/(r[1]-n[1]),i=t*(e[1]-n[1])+n[0],a=e[1];return[i,a]}if(n[1]===r[1]){let r=(t[0]-e[0])/(t[1]-e[1]),i=r*(n[1]-e[1])+e[0],a=n[1];return[i,a]}let i=(t[0]-e[0])/(t[1]-e[1]),a=(r[0]-n[0])/(r[1]-n[1]),o=(i*e[1]-e[0]-a*n[1]+n[0])/(i-a),s=i*o-i*e[1]+e[0];return[s,o]}function H(e,t){let n=0,r=Math.asin(Math.abs(t[1]-e[1])/R(e,t));return t[1]>=e[1]&&t[0]>=e[0]?n=r+Math.PI:t[1]>=e[1]&&t[0]<e[0]?n=Math.PI*2-r:t[1]<e[1]&&t[0]<e[0]?n=r:t[1]<e[1]&&t[0]>=e[0]&&(n=Math.PI-r),n}function U(e,t,n){let r=H(t,e)-H(t,n);return r<0?r+Math.PI*2:r}function W(e,t,n){return(n[1]-e[1])*(t[0]-e[0])>(t[1]-e[1])*(n[0]-e[0])}function _e(e,t,n,r,i){e=Math.max(Math.min(e,1),0);let[a,o]=[1-e,e*e],s=o*e,c=a*a,l=c*a,u=l*t[0]+3*c*e*n[0]+3*a*o*r[0]+s*i[0],d=l*t[1]+3*c*e*n[1]+3*a*o*r[1]+s*i[1];return[u,d]}function G(e,t,n,r,i){let a=H(e,t),o=i?a+n:a-n,s=r*Math.cos(o),c=r*Math.sin(o);return[t[0]+s,t[1]+c]}function ve(e,t,n,r){let[i,a,o,s]=[0,0,[],r-n];s=s<0?s+Math.PI*2:s;for(let r=0;r<=100;r++){let c=n+s*r/100;i=e[0]+t*Math.cos(c),a=e[1]+t*Math.sin(c),o.push([i,a])}return o}function ye(e,t,n,r){let i=be(t,n,r),[a,o,s,c,l]=[[0,0],[0,0],0,0,0],u=Math.hypot(i[0],i[1]),d=i[0]/u,f=i[1]/u,p=R(t,n),m=R(n,r);return u>L?W(t,n,r)?(s=e*p,c=n[0]-s*f,l=n[1]+s*d,a=[c,l],s=e*m,c=n[0]+s*f,l=n[1]-s*d,o=[c,l]):(s=e*p,c=n[0]+s*f,l=n[1]-s*d,a=[c,l],s=e*m,c=n[0]-s*f,l=n[1]+s*d,o=[c,l]):(c=n[0]+e*(t[0]-n[0]),l=n[1]+e*(t[1]-n[1]),a=[c,l],c=n[0]+e*(r[0]-n[0]),l=n[1]+e*(r[1]-n[1]),o=[c,l]),[a,o]}function be(e,t,n){let r=e[0]-t[0],i=e[1]-t[1],a=Math.hypot(r,i);r/=a,i/=a;let o=n[0]-t[0],s=n[1]-t[1],c=Math.hypot(o,s);o/=c,s/=c;let l=r+o,u=i+s;return[l,u]}function K(e){if(e.length<=2)return e;let t=[],n=e.length-1;for(let r=0;r<=1;r+=.01){let[i,a]=[0,0];for(let t=0;t<=n;t++){let o=xe(n,t),s=r**t,c=(1-r)**(n-t);i+=o*s*c*e[t][0],a+=o*s*c*e[t][1]}t.push([i,a])}return t.push(e[n]),t}function q(e){let t=1;switch(!0){case e<=1:t=1;break;case e===2:t=2;break;case e===3:t=6;break;case e===24:t=24;break;case e===5:t=120;break;default:for(let n=1;n<=e;n++)t*=n;break}return t}function xe(e,t){return q(e)/(q(t)*q(e-t))}function J(e){if(e.length<=2)return e;let[t,n]=[2,[]],r=e.length-t-1;n.push(e[0]);for(let i=0;i<=r;i++)for(let r=0;r<=1;r+=.05){let[a,o]=[0,0];for(let n=0;n<=t;n++){let t=Se(n,r);a+=t*e[i+n][0],o+=t*e[i+n][1]}n.push([a,o])}return n.push(e.at(-1)),n}function Se(e,t){let n=0;return e===0?n=(t-1)**2/2:e===1?n=(-2*t**2+2*t+1)/2:e===2&&(n=t**2/2),n}function Ce(e){let t=e.length;if(t<=2)throw Error(`coords.length must >= 3`);{let[t,n,r,i,a]=[e[0],e[1],e[2],0,0],o=he(t,n,r),s=R(t,o),c=H(t,o),l=H(n,o);return W(t,n,r)?(i=l,a=c):(i=c,a=l),ve(o,s,i,a)}}function we(e,t={}){let n=e.length;if(n<3)throw Error(`coords.length must >= 3`);{let[n,r]=[e[0],e[1]];W(e[0],e[1],e[2])&&(n=e[1],r=e[0]);let i=V(n,r),a=[i].concat(e.slice(2)),o=Y(a,{tailLeft:n,tailRight:r,...t});if(o&&o.length>4){let[e,t]=[o[0],o[4]],i=R(n,r)/B(a),s=X(a,e,t,i),c=s.length,l=[n].concat(s.slice(0,c/2));l.push(e);let u=[r].concat(s.slice(c/2,c));return u.push(t),l=J(l),u=J(u),l.concat(o,u.reverse())}else return[]}}function Y(e,t){let{tailLeft:n,tailRight:r,headHeightFactor:i=.18,headWidthFactor:a=.3,neckHeightFactor:o=.85,neckWidthFactor:s=.15,headTailFactor:c=.8}=t,l=B(e),u=l*i,d=e.at(-1);l=R(d,e.at(-2));let f=0;n&&r&&(f=R(n,r)),u>f*c&&(u=f*c);let p=u*a,m=u*s;u=Math.min(u,l);let h=u*o,g=G(e.at(-2),d,0,u,!0),_=G(e.at(-2),d,0,h,!0),v=G(d,g,I,p,!1),y=G(d,g,I,p,!0),b=G(d,_,I,m,!1),x=G(d,_,I,m,!0);return[b,v,d,y,x]}function X(e,t,n,r){let i=z(e),a=B(e),o=a*r,s=R(t,n),c=(o-s)/2,l=0,u=[],d=[];for(let t=1;t<e.length-1;t++){let n=U(e[t-1],e[t],e[t+1])/2;l+=R(e[t-1],e[t]);let r=(o/2-l/i*c)/Math.sin(n),a=G(e[t-1],e[t],Math.PI-n,r,!0),s=G(e[t-1],e[t],n,r,!1);u.push(a),d.push(s)}return u.concat(d)}function Te(e,t={}){let{headHeightFactor:n=.18,headWidthFactor:r=.3,neckHeightFactor:i=.85,neckWidthFactor:a=.15,tailWidthFactor:o=.1,swallowTailFactor:s=1}=t,c=e.length;if(c<3)throw Error(`coords.length must >= 3`);let[l,u]=[e[0],e[1]];W(e[0],e[1],e[2])&&(l=e[1],u=e[0]);let d=V(l,u),f=[d].concat(e.slice(2)),p=Y(f,{tailLeft:l,tailRight:u,headHeightFactor:n,headWidthFactor:r,neckWidthFactor:a,neckHeightFactor:i});if(p&&p.length>4){let[e,t]=[p[0],p[4]],n=R(l,u),r=B(f),i=r*o*s,a=G(f[1],f[0],0,i,!0),c=n/r,d=X(f,e,t,c),m=d.length,h=[l].concat(d.slice(0,m/2));h.push(e);let g=[u].concat(d.slice(m/2,m));return g.push(t),h=J(h),g=J(g),h.concat(p,g.reverse(),[a,h[0]])}else return[]}function Ee(e){let t={headHeightFactor:.25,headWidthFactor:.3,neckHeightFactor:.85,neckWidthFactor:.15};if(e.length<3)throw Error(`coords.length must >= 3`);let[n,r,i]=e,a,o;e.length===3?(a=ke(n,r,i),o=V(n,r)):e.length===4?(a=e[3],o=V(n,r)):(a=e[3],o=e[4]);let s,c;W(n,r,i)?(s=Z(n,o,a,!1,t),c=Z(o,r,i,!0,t)):(s=Z(r,o,i,!1,t),c=Z(o,n,a,!0,t));let l=s.length,u=(l-5)/2,d=s.slice(0,u),f=s.slice(u,u+5),p=s.slice(u+5,l),m=c.slice(0,u),h=c.slice(u,u+5),g=c.slice(u+5,l);m=K(m);let _=K(g.concat(d.slice(1)));return p=K(p),m.concat(h,_,f,p)}function Z(e,t,n,r,i){let a=V(e,t),o=R(a,n),s=G(n,a,0,o*.3,!0),c=G(n,a,0,o*.5,!0);s=G(a,s,I,o/5,r),c=G(a,c,I,o/4,r);let l=[a,s,c,n],u=De(l,i);if(u&&Array.isArray(u)&&u.length>0){let[n,r]=[u[0],u[4]],i=R(e,t)/B(l)/2,a=Oe(l,n,r,i),o=a.length,s=a.slice(0,o/2),c=a.slice(o/2,o);return s.push(n),c.push(r),s=s.reverse(),s.push(t),c=c.reverse(),c.push(e),s.reverse().concat(u,c)}else throw Error(`插值出错`)}function De(e,t){let{headHeightFactor:n,headWidthFactor:r,neckWidthFactor:i,neckHeightFactor:a}=t,o=B(e),s=o*n,c=e.at(-1),l=s*r,u=s*i,d=s*a,f=G(e.at(-2),c,0,s,!0),p=G(e.at(-2),c,0,d,!0),m=G(c,f,I,l,!1),h=G(c,f,I,l,!0),g=G(c,p,I,u,!1),_=G(c,p,I,u,!0);return[g,m,c,h,_]}function Oe(e,t,n,r){let i=z(e),a=B(e),o=a*r,s=R(t,n),c=(o-s)/2,l=0,u=[],d=[];for(let t=1;t<e.length-1;t++){let n=U(e[t-1],e[t],e[t+1])/2;l+=R(e[t-1],e[t]);let r=(o/2-l/i*c)/Math.sin(n),a=G(e[t-1],e[t],Math.PI-n,r,!0),s=G(e[t-1],e[t],n,r,!1);u.push(a),d.push(s)}return u.concat(d)}function ke(e,t,n){let r=V(e,t),i=R(r,n),a=U(e,r,n);if(a<I){let t=i*Math.sin(a),n=i*Math.cos(a),o=G(e,r,I,t,!1);return G(r,o,I,n,!0)}else if(a>=I&&a<Math.PI){let t=i*Math.sin(Math.PI-a),n=i*Math.cos(Math.PI-a),o=G(e,r,I,t,!1);return G(r,o,I,n,!1)}else if(a>=Math.PI&&a<Math.PI*1.5){let t=i*Math.sin(a-Math.PI),n=i*Math.cos(a-Math.PI),o=G(e,r,I,t,!0);return G(r,o,I,n,!0)}else{let t=i*Math.sin(Math.PI*2-a),n=i*Math.cos(Math.PI*2-a),o=G(e,r,I,t,!0);return G(r,o,I,n,!1)}}function Q(e,t={}){let{tailWidthFactor:n=.1,neckWidthFactor:r=.2,headWidthFactor:i=.25,headAngle:a=Math.PI/8.5,neckAngle:o=Math.PI/13}=t,s=e.length;if(s<2)throw Error(`coords.length must >= 2`);let[c,l]=[e[0],e[1]],u=B(e),d=u*n,f=u*r,p=u*i,m=G(l,c,I,d,!0),h=G(l,c,I,d,!1),g=G(c,l,a,p,!1),_=G(c,l,a,p,!0),v=G(c,l,o,f,!1),y=G(c,l,o,f,!0),b=[m,v,g,l,_,y,h];return b}function Ae(e){let t=.05,n=.1,r=.15,i=Math.PI/4,a=Math.PI*.17741;return Q(e,{tailWidthFactor:t,neckWidthFactor:n,headWidthFactor:r,headAngle:i,neckAngle:a})}function je(e,t={}){let{headHeightFactor:n=.18,headWidthFactor:r=.3,neckHeightFactor:i=.85,neckWidthFactor:a=.15,tailWidthFactor:o=.1}=t,s=e.length;if(s<2)throw Error(`coords.length must >= 2`);{let t=B(e),s=t*o,c=G(e[1],e[0],I,s,!1),l=G(e[1],e[0],I,s,!0),u=Y(e,{tailLeft:c,tailRight:l,headHeightFactor:n,headWidthFactor:r,neckWidthFactor:a,neckHeightFactor:i});if(u&&u.length>4){let t=u[0],n=u[4],r=X(e,t,n,o),i=r.length,a=[c].concat(r.slice(0,i/2));a.push(t);let s=[l].concat(r.slice(i/2,i));return s.push(n),a=J(a),s=J(s),a.concat(u,s.reverse())}else return[]}}function Me(e,t={}){let{headHeightFactor:n=.18,headWidthFactor:r=.3,neckHeightFactor:i=.85,neckWidthFactor:a=.15,tailWidthFactor:o=.1,swallowTailFactor:s=1}=t,c=e.length;if(c<2)throw Error(`coords.length must >= 2`);let l=B(e),u=l*o,d=G(e[1],e[0],I,u,!1),f=G(e[1],e[0],I,u,!0),p=u*s,m=G(e[1],e[0],0,p,!0),h=[d,m,f],g=Y(e,{tailLeft:h[0],tailRight:h[2],headHeightFactor:n,headWidthFactor:r,neckWidthFactor:a,neckHeightFactor:i});if(g&&g.length>4){let t=g[0],n=g[4],r=X(e,t,n,o),i=r.length,a=[h[0]].concat(r.slice(0,i/2));a.push(t);let s=[h[2]].concat(r.slice(i/2,i));return s.push(n),a=J(a),s=J(s),a.concat(g,s.reverse(),[h[1],a[0]])}return[]}function Ne(e){if(e.length<3)throw Error(`coords.length must >= 3`);let t=.4,n=V(e[0],e[2]);e.push(n,e[0],e[1]);let r=[],i=[];for(let n=0;n<e.length-2;n++){let i=e[n],a=e[n+1],o=e[n+2],s=ye(t,i,a,o);r=r.concat(s)}let a=r.length;r=[r[a-1]].concat(r.slice(0,a-1));for(let t=0;t<e.length-2;t++){let n=e[t],a=e[t+1];i.push(n);for(let e=0;e<=F;e++){let o=_e(e/F,n,r[t*2],r[t*2+1],a);i.push(o)}i.push(a)}return i}function Pe(e){let t=e.length;if(t<2)throw Error(`coords.length must >= 2`);return Fe(e)}function Fe(e){let t=[];if(e.length>1){let n=e[0],r=e.at(-1),i=n,a=[(r[0]-n[0])/4+n[0],(r[1]-n[1])/8+n[1]],o=[(n[0]+r[0])/2,n[1]],s=[(r[0]-n[0])*3/4+n[0],-(r[1]-n[1])/8+n[1]],c=[r[0],n[1]],l=[r[0],(n[1]+r[1])/2],u=[(r[0]-n[0])*3/4+n[0],(r[1]-n[1])*3/8+n[1]],d=[(n[0]+r[0])/2,(n[1]+r[1])/2],f=[(r[0]-n[0])/4+n[0],(r[1]-n[1])*5/8+n[1]],p=[n[0],(n[1]+r[1])/2],m=[n[0],r[1]],h=K([i,a,o,s,c]),g=K([l,u,d,f,p]);t=h.concat(g),t.push(m)}return t}function Ie(e){if(e.length<2)throw Error(`coords.length must >= 2`);let[t,n]=e,r=[n[0],t[1]],i=[n[0],(t[1]+n[1])/2],a=[t[0],(t[1]+n[1])/2],o=[t[0],n[1]];return[t,r,i,a,o]}function Le(e){let t=e.length;if(t<2)throw Error(`coords.length must >= 2`);let[n,r]=e,i=[r[0],(n[1]+r[1])/2],a=[n[0],(n[1]+r[1])/2],o=[n[0],r[1]];return[n,i,a,o]}let Re=new m({type:`PolygonArc`,complete:e=>e.positions.length>=3,skeletons:[E,C],initRender(){return{entities:[new t.Entity({polygon:{}})]}},render(e){let r=e.previous.entities[0],i=e.packable.positions;i.length<3&&e.mouse&&i.push(e.mouse.clone());let a=i.map(e=>(0,n.toCoord)(e));if(a.length<3)return r.polygon.hierarchy=void 0,e.previous;let o=Ce(a).map(e=>(0,n.toCartesian3)(e)),s=new t.PolygonHierarchy(o);return r.polygon.hierarchy=new t.CallbackProperty(()=>s,!1),{entities:[r]}}}),ze=new m({type:`PolygonArrowAttackDirection`,allowManualComplete:e=>e.positions.length>=3,skeletons:[E,C,T],initRender(){return{entities:[new t.Entity({polygon:{}})]}},render(e){let r=e.previous.entities[0],i=e.packable.positions;e.mouse&&i.push(e.mouse.clone());let a=i.map(e=>(0,n.toCoord)(e));if(a.length<3)return r.polygon.hierarchy=void 0,e.previous;let o=we(a).map(e=>(0,n.toCartesian3)(e)),s=new t.PolygonHierarchy(o);return r.polygon.hierarchy=new t.CallbackProperty(()=>s,!1),{entities:[r]}}}),Be=new m({type:`PolygonArrowAttackDirectionTailed`,allowManualComplete:e=>e.positions.length>=3,skeletons:[E,C,T],initRender(){return{entities:[new t.Entity({polygon:{}})]}},render(e){let r=e.previous.entities[0],i=e.packable.positions;e.mouse&&i.push(e.mouse.clone());let a=i.map(e=>(0,n.toCoord)(e));if(a.length<3)return r.polygon.hierarchy=void 0,e.previous;let o=Te(a).map(e=>(0,n.toCartesian3)(e)),s=new t.PolygonHierarchy(o);return r.polygon.hierarchy=new t.CallbackProperty(()=>s,!1),{entities:[r]}}}),Ve=new m({type:`PolygonArrowClamped`,complete:e=>e.positions.length>=5,skeletons:[E,C],initRender(){return{entities:[new t.Entity({polygon:{}})]}},render(e){let r=e.previous.entities[0],i=e.packable.positions;if(i.length<5){let t=e.mouse;t&&i.push(t.clone())}let a=i.map(e=>(0,n.toCoord)(e));if(a.length>=3){let e=Ee(a),i=new t.PolygonHierarchy(e.map(e=>(0,n.toCartesian3)(e)));r.polygon.hierarchy=new t.CallbackProperty(()=>i,!1)}else r.polygon.hierarchy=void 0;return{entities:[r]}}}),He=new m({type:`PolygonArrowStraight`,complete:e=>e.positions.length>=2,skeletons:[E,C],initRender(){return{entities:[new t.Entity({polygon:{}})]}},render(e){let r=e.previous.entities[0],i=e.packable.positions;if(i.length<2){let t=e.mouse;t&&i.push(t.clone())}let a=i.map(e=>(0,n.toCoord)(e));if(a.length>=2){let e=Ae(a),i=new t.PolygonHierarchy(e.map(e=>(0,n.toCartesian3)(e)));r.polygon.hierarchy=new t.CallbackProperty(()=>i,!1)}else r.polygon.hierarchy=void 0;return{entities:[r]}}}),Ue=new m({type:`PolygonArrowStraightSharp`,complete:e=>e.positions.length>=2,skeletons:[E,C],initRender(){return{entities:[new t.Entity({polygon:{}})]}},render(e){let r=e.previous.entities[0],i=e.packable.positions;if(i.length<2){let t=e.mouse;t&&i.push(t.clone())}let a=i.map(e=>(0,n.toCoord)(e));if(a.length>=2){let e=Q(a),i=new t.PolygonHierarchy(e.map(e=>(0,n.toCartesian3)(e)));r.polygon.hierarchy=new t.CallbackProperty(()=>i,!1)}else r.polygon.hierarchy=void 0;return{entities:[r]}}}),We=new m({type:`PolygonArrowUnitCombatOperation`,allowManualComplete:e=>e.positions.length>=2,skeletons:[E,C,T],initRender(){return{entities:[new t.Entity({polygon:{}})]}},render(e){let r=e.previous.entities[0],i=e.packable.positions;e.mouse&&i.push(e.mouse.clone());let a=i.map(e=>(0,n.toCoord)(e));if(a.length<2)return r.polygon.hierarchy=void 0,e.previous;let o=je(a).map(e=>(0,n.toCartesian3)(e)),s=new t.PolygonHierarchy(o);return r.polygon.hierarchy=new t.CallbackProperty(()=>s,!1),{entities:[r]}}}),$=new m({type:`PolygonArrowUnitCombatOperationTailed`,allowManualComplete:e=>e.positions.length>=2,skeletons:[E,C,w],initRender(){return{entities:[new t.Entity({polygon:{}})]}},render(e){let r=e.previous.entities[0],i=e.packable.positions;e.mouse&&i.push(e.mouse.clone());let a=i.map(e=>(0,n.toCoord)(e));if(a.length<2)return r.polygon.hierarchy=void 0,e.previous;let o=Me(a).map(e=>(0,n.toCartesian3)(e)),s=new t.PolygonHierarchy(o);return r.polygon.hierarchy=new t.CallbackProperty(()=>s,!1),{entities:[r]}}}),Ge=new m({type:`PolygonAssemblingPlace`,complete:e=>e.positions.length>=3,skeletons:[E,C,w],initRender(){return{entities:[new t.Entity({polygon:{}})]}},render(e){let r=e.previous.entities[0],i=e.packable.positions;e.mouse&&i.push(e.mouse.clone());let a=i.map(e=>(0,n.toCoord)(e));if(a.length<2)return r.polygon.hierarchy=void 0,e.previous;let o=Ne(a).map(e=>(0,n.toCartesian3)(e)),s=new t.PolygonHierarchy(o);return r.polygon.hierarchy=new t.CallbackProperty(()=>s,!1),{entities:[r]}}}),Ke=new m({type:`PolygonFlagCurve`,complete:e=>e.positions.length>=2,skeletons:[E,C],initRender(){return{entities:[new t.Entity({polygon:{}})]}},render(e){let r=e.previous.entities[0],i=e.packable.positions;e.mouse&&i.push(e.mouse.clone());let a=i.map(e=>(0,n.toCoord)(e));if(a.length<2)return r.polygon.hierarchy=void 0,e.previous;let o=Pe(a).map(e=>(0,n.toCartesian3)(e)),s=new t.PolygonHierarchy(o);return r.polygon.hierarchy=new t.CallbackProperty(()=>s,!1),{entities:[r]}}}),qe=new m({type:`PolygonFlagRect`,complete:e=>e.positions.length>=2,skeletons:[E,C],initRender(){return{entities:[new t.Entity({polygon:{}})]}},render(e){let r=e.previous.entities[0],i=e.packable.positions;e.mouse&&i.push(e.mouse.clone());let a=i.map(e=>(0,n.toCoord)(e));if(a.length<2)return r.polygon.hierarchy=void 0,e.previous;let o=Ie(a).map(e=>(0,n.toCartesian3)(e)),s=new t.PolygonHierarchy(o);return r.polygon.hierarchy=new t.CallbackProperty(()=>s,!1),{entities:[r]}}}),Je=new m({type:`PolygonFlagTriangle`,complete:e=>e.positions.length>=2,skeletons:[E,C],initRender(){return{entities:[new t.Entity({polygon:{}})]}},render(e){let r=e.previous.entities[0],i=e.packable.positions;e.mouse&&i.push(e.mouse.clone());let a=i.map(e=>(0,n.toCoord)(e));if(a.length<2)return r.polygon.hierarchy=void 0,e.previous;let o=Le(a).map(e=>(0,n.toCartesian3)(e)),s=new t.PolygonHierarchy(o);return r.polygon.hierarchy=new t.CallbackProperty(()=>s,!1),{entities:[r]}}}),Ye=new m({type:`PolygonSmooth`,allowManualComplete:e=>e.positions.length>=3,skeletons:[E,C,T],initRender(){return{entities:[new t.Entity({polygon:{}})]}},render(e){let r=e.previous.entities[0],i=e.packable.positions,o=e.mouse;if(o&&i.push(o.clone()),i.length<=2)return r.polygon.hierarchy=void 0,e.previous;let s=i.map(e=>(0,n.toCoord)(e));s.push(s[0]);let{features:c}=a.polygonSmooth(a.polygon([s]),{iterations:3}),l=c[0].geometry.coordinates[0].map(e=>(0,n.toCartesian3)(e)).filter(e=>!!e),u=new t.PolygonHierarchy(l);return r.polygon.hierarchy=new t.CallbackProperty(()=>u,!1),{entities:[r]}}}),Xe=new m({type:`Polyline`,allowManualComplete:e=>e.positions.length>1,skeletons:[E,C,T],initRender(){return{entities:[new t.Entity({polyline:{material:t.Color.RED,width:2}})]}},render(e){let n=e.previous.entities[0],r=[...e.packable.positions],i=e.mouse;i&&r.push(i.clone());let a=r.length>=2?r:[];return n.polyline.positions=new t.CallbackProperty(()=>a,!1),{entities:[n]}}}),Ze=new m({type:`PolylineCurve`,allowManualComplete:e=>e.positions.length>1,skeletons:[E,C,T],initRender(){return{entities:[new t.Entity({polyline:{material:t.Color.RED,width:2}})]}},render(e){let r=e.previous.entities[0],i=[...e.packable.positions],o=e.mouse;if(o&&i.push(o.clone()),i.length<2)return r.polyline.positions=void 0,e.previous;let s=i.map(e=>(0,n.toCoord)(e)),{geometry:{coordinates:c}}=a.bezierSpline(a.lineString(s));return r.polyline.positions=new t.CallbackProperty(()=>c.map(n.toCartesian3),!1),{entities:[r]}}}),Qe=new m({type:`Rectangle`,complete:e=>e.positions.length>=2,skeletons:[E,C],initRender(){return{entities:[new t.Entity({rectangle:{}})]}},render(e){let n=e.previous.entities[0],r=[...e.packable.positions],i=e.mouse;if(i&&r.push(i.clone()),r.length<2)return n.rectangle.coordinates=void 0,e.previous;let a=t.Rectangle.fromCartesianArray(r??[]);return n.rectangle.coordinates=new t.CallbackProperty(()=>a,!1),{entities:[n]}}});exports.PlotAction=y,exports.PlotFeature=v,exports.PlotScheme=m,exports.PlotSchemeBillboard=ce,exports.PlotSchemeBillboardPinBuilder=le,exports.PlotSchemeCylinder=ue,exports.PlotSchemeEllipse=de,exports.PlotSchemeLabel=fe,exports.PlotSchemePoint=pe,exports.PlotSchemePolygon=P,exports.PlotSchemePolygonArc=Re,exports.PlotSchemePolygonArrowAttackDirection=ze,exports.PlotSchemePolygonArrowAttackDirectionTailed=Be,exports.PlotSchemePolygonArrowClamped=Ve,exports.PlotSchemePolygonArrowStraight=He,exports.PlotSchemePolygonArrowStraightSharp=Ue,exports.PlotSchemePolygonArrowUnitCombatOperation=We,exports.PlotSchemePolygonArrowUnitCombatOperationTailed=$,exports.PlotSchemePolygonAssemblingPlace=Ge,exports.PlotSchemePolygonFlagCurve=Ke,exports.PlotSchemePolygonFlagRect=qe,exports.PlotSchemePolygonFlagTriangle=Je,exports.PlotSchemePolygonSmooth=Ye,exports.PlotSchemePolyline=Xe,exports.PlotSchemePolylineCurve=Ze,exports.PlotSchemeRectangle=Qe,exports.PlotSkeletonEntity=b,exports.SampledPlotProperty=_,exports.SampledPlotStrategy=h,exports.control=C,exports.interval=w,exports.intervalNonclosed=T,exports.moved=E,exports.schemeMeasureArea=oe,exports.schemeMeasureDistance=se,exports.usePlot=S})(this.Vesium=this.Vesium||{},Cesium,Vesium,VueUse,Vue,turf);
2
2
  //# sourceMappingURL=index.iife.min.js.map