@dspacev-bundle/vue-cesium
Version:
Vue 3.x components for CesiumJS.
887 lines • 754 kB
JavaScript
/*! VueCesium v3.1.5 */import{ref as ee,getCurrentInstance as oe,inject as ya,computed as ae,provide as en,unref as zs,isRef as qc,onBeforeUnmount as un,onUnmounted as nt,watch as de,markRaw as Gb,reactive as Ee,onMounted as Eo,nextTick as Be,h as S,withDirectives as Qc,defineComponent as K,Transition as Zc,Teleport as tn,createCommentVNode as ie,createApp as Ub,toRaw as Mo,renderSlot as Hb}from"vue";import{isUndefined as ui,isNull as Wb,findIndex as qb,camelCase as Jc,get as Qb,isEqual as ba,cloneDeep as Ve,differenceBy as lt,debounce as Zb,remove as Xc,find as Yc,uniqWith as Jb}from"lodash-es";import Kc from"mitt";import*as Ca from"echarts";const Xb="3.1.5",eu=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Vi=eu?Symbol("VueCesium"):"VueCesium",tu=eu?Symbol("_vc_f_"):"_vc_f_",Gs=Symbol(),Yb=Object.prototype.hasOwnProperty,ze=(e,t)=>Yb.call(e,t),et=Array.isArray,bt=e=>typeof e=="function",yi=e=>typeof e=="string",Ii=e=>e!==null&&typeof e=="object",Kb=Object.prototype.toString,e1=e=>Kb.call(e),ot=e=>e1(e)==="[object Object]",Us=e=>{const t=Object.create(null);return i=>t[i]||(t[i]=e(i))},t1=/-(\w)/g,Rt=Us(e=>e.replace(t1,(t,i)=>i?i.toUpperCase():"")),i1=/\B([A-Z])/g,n1=Us(e=>e.replace(i1,"-$1").toLowerCase()),wa=Us(e=>e.charAt(0).toUpperCase()+e.slice(1));function o1(e){if(typeof e!="string"&&(e=e+""),e.length===0)return".";let t=e.charCodeAt(0);const i=t===47;let n=-1,o=!0;for(let s=e.length-1;s>=1;--s)if(t=e.charCodeAt(s),t===47){if(!o){n=s;break}}else o=!1;return n===-1?i?"/":".":i&&n===1?"/":e.slice(0,n)}function Oo(e){return ui(e)||Wb(e)?!0:e instanceof Element?!1:Object.keys(e).length===0}const se=n1;function a1(e,t){if(typeof e!="object"||e===null)return!1;let i=Object.getPrototypeOf(e);for(;;){if(i===null)return!1;if(i===(t==null?void 0:t.prototype))return!0;i=Object.getPrototypeOf(i)}}function s1(e){let t;const i=Object.keys(Cesium);for(let n=0;n<i.length;n++){const o=i[n];if(a1(e,Cesium[o])){t=o;break}}return t}function Hs(e,t=!1){if(e&&e.constructor){if(t){const i=s1(e);if(i)return i}return e.constructor.name}return typeof e}function ti(e,t){return e!=null?e:t}function bi(e,t=[]){const i={};return Object.keys(e).forEach(n=>{if(t.indexOf(n)===-1){const o=e[n];i[n]=bt(o)?void 0:ot(o)?bt(o.default)?o.default():o.default:o}}),i}const Ai=(e,t,i=[])=>{for(const n in t)!e[n]&&i.indexOf(n)===-1&&(e[n]=t[n])};function r1(e){if(Array.isArray(e))return!0;if(typeof e!="object"||!e)return!1;const t=e.length;return typeof t=="number"&&t>=0}function at(e={},t={}){let i;for(i in t)e[i]=Ii(e[i])?at(e[i],t[i]):e[i]=t[i];return e}function l1(e){return typeof e=="number"&&isFinite(e)}function Ws(e,t,i){const{JulianDate:n,Color:o}=Cesium,s=n.now();return e?(typeof e.getValue=="function"&&(e=e.getValue(i||s)),typeof e=="string"?o.fromCssColorString(e):typeof e=="function"?Ws(e(i),t):e):t}function iu(e,t,i){const{JulianDate:n,Property:o}=Cesium,s=n.now();if(!e)return e;if(t){if(e instanceof t)return e;if(e instanceof o&&e._value instanceof t)return e._value}return bt(e.getValue)?e.getValue(i||s):e}const nu=e=>Object.keys(e),_a=ee();function xa(e,t=void 0){const i=oe()?ya(Gs,_a):_a;return e?ae(()=>{var n,o;return(o=(n=i.value)==null?void 0:n[e])!=null?o:t}):i}const ou=(e,t,i=!1)=>{var n;const o=!!oe(),s=o?xa():void 0;if(!((n=t==null?void 0:t.provide)!=null?n:o&&en)){console.warn("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const a=ae(()=>{const r=zs(e);return s!=null&&s.value?c1(s.value,r):r});return t!=null&&t.provide?t.provide(Gs,a):en(Gs,a),(i||!_a.value)&&(_a.value=a.value),a},c1=(e,t)=>{var i;const n=[...new Set([...nu(e),...nu(t)])],o={};for(const s of n)o[s]=(i=t[s])!=null?i:e[s];return o};function Po(e){var t,i,n,o;const s=(y="")=>function(...x){y&&(yi(x[0])?x[0]=y.trim()+" "+x[0]:x=[y.trim(),...x]),console.log(...x)},a=(y="")=>function(...x){y&&(yi(x[0])?x[0]=y.trim()+" "+x[0]:x=[y.trim(),...x]),console.warn(...x)},r=(y="")=>function(...x){y&&(yi(x[0])?x[0]=y.trim()+" "+x[0]:x=[y.trim(),...x]),console.error(...x)},l=(y="")=>function(...x){y&&(yi(x[0])?x[0]=y.trim()+" "+x[0]:x=[y.trim(),...x])},c=(y="default")=>{let x="";switch(y){case"default":x="#35495E";break;case"primary":x="#3488ff";break;case"success":x="#43B883";break;case"warning":x="#e6a23c";break;case"danger":x="#f56c6c";break}return x},u=(y,x,M="primary")=>{console.log(`%c ${y} %c ${x} %c`,"background:#35495E; padding: 1px; border-radius: 3px 0 0 3px; color: #fff;",`background:${c(M)}; padding: 1px; border-radius: 0 3px 3px 0; color: #fff;`,"background:transparent")},d=y=>{console.log(`%c${y.map(x=>x.text||"").join("%c")}`,...y.map(x=>`color: ${c(x.type)};`))},h=y=>{d([{text:y,type:"success"}])},p=y=>{d([{text:y,type:"warning"}])},v=y=>{d([{text:y,type:"danger"}])},b=y=>{d([{text:y,type:"primary"}])};return{log:s(`[VueCesium] ${(t=e==null?void 0:e.proxy)==null?void 0:t.$options.name}`),warn:a(`[VueCesium] WARN ${(i=e==null?void 0:e.proxy)==null?void 0:i.$options.name}`),error:r(`[VueCesium] ERR ${(n=e==null?void 0:e.proxy)==null?void 0:n.$options.name}`),debug:l(`[VueCesium] Debug ${(o=e==null?void 0:e.proxy)==null?void 0:o.$options.name}`),capsule:u,success:h,warning:p,danger:v,primary:b}}Po(void 0);const au=Symbol("INSTALLED_KEY"),su=(e=[])=>({version:Xb,install:(t,i)=>{if(t[au])return;const n={cesiumPath:"https://unpkg.com/cesium@latest/Build/Cesium/Cesium.js",accessToken:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2OGE2MjZlOC1mMzhiLTRkZjQtOWEwZi1jZTE0MWY0YzhlMTAiLCJpZCI6MjU5LCJpYXQiOjE2NDM3MjU1NzZ9.ptZ5tVXvMmuWRC0WhjtYTg-17nQh14fgxBsx0HJiVXQ"};t[au]=!0;const o=Object.assign(n,i);e.forEach(s=>{t.use(s,o)}),ou(o,t,!0)}});/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/const u1=Object.prototype.hasOwnProperty;function d1(e,t,i){if(!e)throw new TypeError("argument dest is required");if(!t)throw new TypeError("argument src is required");return i===void 0&&(i=!0),Object.getOwnPropertyNames(t).forEach(function(n){if(!i&&u1.call(e,n))return;const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o)}),e}function On(...e){let t;return typeof e[e.length-1]!="object"&&(t=e.pop()),e.slice(1).reduce((i,n,o)=>d1(i,n,t),e[0])}function h1(e){return e.appContext.config.globalProperties.$router!==void 0}function qs(e,t){return e.vnode.props!==null&&e.vnode.props[t]!==void 0}function Pe(e,t){const i=e.vnode.props;if(i===null)return;const n=Object.keys(i),o=qb(n,s=>s.includes(`on${wa(t)}`)||s.includes(`on${wa(Jc(t))}`));return i[n[o]]}function fe(e){return e.value}function Pt(e){var t,i;const n=e.parent;return!n.cesiumClass&&((t=n.proxy)==null?void 0:t.$options.name)!=="VcViewer"?Pt(n):(i=n.proxy)!=null&&i.getVcViewer?n.proxy.getVcViewer().getInstance():n}const m1=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,ru=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(m1);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},lu=e=>e==="*"||e==="x"||e==="X",cu=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},p1=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],v1=(e,t)=>{if(lu(e)||lu(t))return 0;const[i,n]=p1(cu(e),cu(t));return i>n?1:i<n?-1:0},uu=(e,t)=>{for(let i=0;i<Math.max(e.length,t.length);i++){const n=v1(e[i]||"0",t[i]||"0");if(n!==0)return n}return 0},f1=(e,t)=>{const i=ru(e),n=ru(t),o=i.pop(),s=n.pop(),a=uu(i,n);return a!==0?a:o&&s?uu(o.split("."),s.split(".")):o||s?o?-1:1:0},g1=(e,t,i)=>{y1(i);const n=f1(e,t);return du[i].includes(n)},du={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},hu=Object.keys(du),y1=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(hu.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${hu.join("|")}`)};var b1=`
czm_material czm_getMaterial(czm_materialInput materialInput) {
czm_material material = czm_getDefaultMaterial(materialInput);
material.diffuse = 1.5 * color.rgb;
vec2 st = materialInput.st;
vec3 str = materialInput.str;
float dis = distance(st, vec2(0.5, 0.5));
float per = fract(time);
if (abs(str.z) > 0.001) {
discard;
}
if (dis > 0.5) {
discard;
} else {
float perDis = 0.5 / count;
float disNum;
float bl = .0;
for (int i = 0; i <= 9; i++) {
if (float(i) <= count) {
disNum = perDis *float(i) - dis + per / count;
if (disNum > 0.0) {
if (disNum < perDis) {
bl = 1.0 - disNum / perDis;
} else if(disNum - perDis < perDis) {
bl = 1.0 - abs(1.0 - disNum / perDis);
}
material.alpha = pow(bl, gradient);
}
}
}
}
return material;
}`,C1=`
uniform float globalAlpha;
uniform bool axisY;
uniform bool mixt;
czm_material czm_getMaterial(czm_materialInput materialInput) {
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = repeat * materialInput.st;
vec4 colorImage;
if (speed != 0.0) {
float currTime;
if (time < 0.0) {
currTime = speed * czm_frameNumber / 1000.0;
} else {
currTime = time;
}
colorImage = texture(image, vec2(fract((axisY ? st.t : st.s) - currTime), st.t));
} else {
colorImage = texture(image, st);
}
if (color.a == 0.0) {
if (colorImage.rgb == vec3(1.0)) {
discard;
}
}
if (color.rgb == vec3(1.0)) {
material.alpha = colorImage.a * globalAlpha;
material.diffuse = colorImage.rgb;
} else {
material.alpha = colorImage.a * color.a * globalAlpha;
if (mixt)
material.diffuse = max(colorImage.rgb * color.rgb * material.alpha * 3.0, colorImage.rgb * color.rgb);
else
material.diffuse = max(color.rgb * material.alpha * 3.0, color.rgb);
}
if (hasImage2) {
vec4 colorBG = texture(image2, materialInput.st);
if (colorBG.a > 0.5) {
material.diffuse = color2.rgb;
}
}
return material;
}
`;let Ea=!1;class mu{static extend(t){var i;if(Ea)return;const{Material:n,Color:o,Cartesian2:s}=Cesium,a=(i=t.scene.context)==null?void 0:i.webgl2;let r=C1,l=b1;a||(r=r.replace(/texture\(/g,"texture2D("),l=l.replace(/texture\(/g,"texture2D(")),n.VcCircleWave="VcCircleWave",Cesium.Material._materialCache.addMaterial(n.VcCircleWave,{fabric:{type:n.VcCircleWave,uniforms:{color:new o(1,0,0,1),time:1,count:1,gradient:.1},source:l},translucent(){return!0}}),n.VcLineFlow="VcLineFlow",Cesium.Material._materialCache.addMaterial(n.VcLineFlow,{fabric:{type:n.VcLineFlow,uniforms:{image:n.DefaultImageId,color:new o(1,1,1,1),repeat:new s(1,1),axisY:!1,mixt:!1,speed:10,time:-1,hasImage2:!1,image2:n.DefaultImageId,color2:new o(1,1,1),globalAlpha:1},source:r},translucent(){return!0}}),Ea=!0}static revoke(t){Ea&&(Ea=!1)}}class pu{constructor(t={}){this.options=t,this._definitionChanged=new Cesium.Event}get isConstant(){return!0}get definitionChanged(){return this._definitionChanged}getType(t){return null}getValue(t,i={}){return i}equals(t){return this===t}}class qn extends pu{constructor(t){super(t);const{Event:i,defaultValue:n}=Cesium;Object.getOwnPropertyDescriptor(qn.prototype,"color")||Object.defineProperties(qn.prototype,{color:Cesium.createPropertyDescriptor("color")}),this._definitionChanged=new i,this._color=new Cesium.ConstantProperty(t.color),this._duration=n(t.duration,1e3),this.count=n(t.count,2),this.count<=0&&(this.count=1),this._gradient=n(t.gradient,.1),this._gradient===0&&(this._gradient=0),this._gradient>1&&(this._gradient=1),this._time=new Date().getTime()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}get color(){return this._color}set color(t){const i=this._color;i!==t&&(this._color=new Cesium.ConstantProperty(t),this._definitionChanged.raiseEvent(this,"color",t,i))}get duration(){return this._duration}set duration(t){const i=this._duration;i!==t&&(this._duration=t,this._definitionChanged.raiseEvent(this,"duration",t,i))}get count(){return this._count}set count(t){const i=this._count;i!==t&&(this._count=t,this._definitionChanged.raiseEvent(this,"count",t,i))}getType(){return"VcCircleWave"}getValue(t,i){return Cesium.defined(i)||(i={}),i.color=Cesium.Property.getValueOrClonedDefault(this._color,t,Cesium.Color.YELLOW,i.color),i.time=(new Date().getTime()-this._time)%this.duration/this.duration,i.count=this.count,i.gradient=1+10*(1-this._gradient),i}equals(t){return this===t||t instanceof qn&&Cesium.Property.equals(this._color,t._color)}}class ga extends pu{constructor(t={}){var i,n,o,s,a,r,l,c,u,d;super(t);const{Color:h,Cartesian2:p,defined:v}=Cesium;this.image=(i=t.image)!=null?i:t.url,this.color=(n=t.color)!=null?n:new h(1,1,1,0),this.axisY=(o=t.axisY)!=null?o:!1,this.mixt=(s=t.mixt)!=null?s:!1,this.speed=(a=t.speed)!=null?a:10,this.duration=t.duration,this.repeat=(r=t.repeat)!=null?r:new p(1,1),this.image2=(l=t.image2)!=null?l:t.bgUrl,this.color2=(u=(c=t.color2)!=null?c:t.bgColor)!=null?u:new h(1,1,1,0),this.hasImage2=v(this.image2),this.globalAlpha=(d=t.globalAlpha)!=null?d:!0}getType(t){return"VcLineFlow"}getValue(t,i){const{Color:n,Cartesian2:o,defined:s}=Cesium;return!s(i)&&(i={}),i.image=this.image,i.color=Ws(this.color,new n(1,1,1,0),t),i.repeat=iu(this.repeat,o,t),i.axisY=this.axisY,i.mixt=this.mixt,i.speed=iu(this.speed,Number,t),this.duration?this._time===void 0&&(this._time=new Date().getTime(),i.time=(new Date().getTime()-this._time)/(this.duration*1e3)):i.time=-1,i.hasImage2=this.hasImage2,i.image2=this.image2,i.color2=Ws(this.color2,new n(1,1,1,0),t),i.globalAlpha=this.globalAlpha,i}equals(t){return this===t||t instanceof ga&&Cesium.Property.equals(this.color,t.color)&&Cesium.Property.equals(this.repeat,t.repeat)&&this.image===t.image&&this.axisY===t.axisY&&this.speed===t.speed&&this.hasImage2===t.hasImage2&&this.image2===t.image2&&this.image2===t.image2&&Cesium.Property.equals(this.color2,t.color2)}}function ht(e,t=!1){const{Cartesian2:i,CallbackProperty:n}=Cesium;if(e instanceof Cesium.Cartesian2||e instanceof n)return e;if(ot(e)&&ze(e,"x")&&ze(e,"y")){const o=e;return new i(o.x,o.y)}if(et(e))return new i(e[0],e[1]);if(bt(e))return new n(e,t)}function tt(e,t,i=!1){const{CallbackProperty:n,Cartesian3:o,Ellipsoid:s,SampledPositionProperty:a,CompositePositionProperty:r,ConstantPositionProperty:l,TimeIntervalCollectionPositionProperty:c}=Cesium;if(e instanceof o||e instanceof n||e instanceof a||e instanceof r||e instanceof l||e instanceof c)return e;if(t=t||s.WGS84,ot(e)){if(ze(e,"x")&&ze(e,"y")&&ze(e,"z")){const u=e;return new o(u.x,u.y,u.z)}else if(ze(e,"lng")&&ze(e,"lat")){const u=e;return o.fromDegrees(u.lng,u.lat,u.height||0,t)}}if(et(e))return o.fromDegrees(e[0],e[1],e[2]||0,t);if(bt(e))return new n(e,i)}function Ci(e,t,i=!1){const{CallbackProperty:n,Cartesian3:o,Ellipsoid:s}=Cesium;if(e instanceof n)return e;if(bt(e))return new n(e,i);if(t=t||s.WGS84,et(e)){if(et(e[0])||ot(e[0])){const a=[];return e.forEach(r=>{a.push(tt(r,t))}),a}return o.fromDegreesArrayHeights(e,t)}}function vu(e,t){const{CallbackProperty:i}=Cesium;if(e instanceof i)return e;if(bt(e))return new i(e,t);if(et(e)){const n=[];return e.forEach(o=>{n.push(ht(o))}),n}}function Qs(e,t=!1){const{CallbackProperty:i,Quaternion:n,VelocityOrientationProperty:o}=Cesium;if(e instanceof n||e instanceof i||e instanceof o)return e;if(ot(e)&&ze(e,"x")&&ze(e,"y")){const s=e;return new n(s.x,s.y,s.z,s.w)}if(et(e))return new n(e[0],e[1],e[2],e[3]);if(bt(e))return new i(e,t)}function fu(e,t){e.forEach(i=>{i.positions=Ci(i.positions,t),i.holes&&fu(i.holes,t)})}function Zs(e,t,i=!1){var n;const{PolygonHierarchy:o,CallbackProperty:s}=Cesium;if(e instanceof o||e instanceof s)return e;if(bt(e))return new s(e,i);if(et(e)&&e.length>=3){const a=Ci(e,t);return new o(a)}if(ot(e)&&ze(e,"positions")){const a=e;return a.positions=Ci(a.positions,t),(n=a.holes)!=null&&n.length&&fu(a.holes,t),a}}function Js(e,t=!1){const{NearFarScalar:i,CallbackProperty:n}=Cesium;if(e instanceof i||e instanceof n)return e;if(ot(e)&&ze(e,"near")&&ze(e,"far")){const o=e;return new i(o.near,o.nearValue||0,o.far,o.farValue||1)}if(et(e))return new i(e[0],e[1],e[2],e[3]);if(bt(e))return new n(e,t)}function w1(e,t=!1){const{DistanceDisplayCondition:i,CallbackProperty:n}=Cesium;if(e instanceof i||e instanceof n)return e;if(ot(e)&&ze(e,"near")&&ze(e,"far")){const o=e;return new i(o.near,o.far)}if(et(e))return new i(e[0],e[1]);if(bt(e))return new n(e,t)}function Te(e,t=!1){const{Color:i,CallbackProperty:n,defaultValue:o}=Cesium;if(e instanceof i||e instanceof n)return e;if(yi(e))return i.fromCssColorString(e);if(ot(e)){if(ze(e,"red")){const s=e;return i.fromBytes(o(s.red,255),o(s.green,255),o(s.blue,255),o(s.alpha,255))}else if(ze(e,"x")){const s=e;return new i(o(s.x,1),o(s.y,1),o(s.z,1),o(s.w,1))}}if(et(e))return i.fromBytes(e[0],e[1],e[2],o(e[3],255));if(bt(e))return new n(e,t)}function _1(e){if(et(e)){const t=[];return e.forEach(i=>{t.push(Te(i))}),t}else return e}function x1(e,t=!1){const{CallbackProperty:i,Color:n,CheckerboardMaterialProperty:o,ColorMaterialProperty:s,CompositeMaterialProperty:a,GridMaterialProperty:r,ImageMaterialProperty:l,MaterialProperty:c,PolylineArrowMaterialProperty:u,PolylineDashMaterialProperty:d,PolylineGlowMaterialProperty:h,PolylineOutlineMaterialProperty:p,StripeMaterialProperty:v,StripeOrientation:b,defaultValue:y,Cartesian2:x,Material:M}=Cesium;if(e instanceof i||e instanceof n||e instanceof o||e instanceof s||e instanceof a||e instanceof r||e instanceof l||e instanceof c||e instanceof u||e instanceof d||e instanceof h||e instanceof p||e instanceof v||e instanceof qn||e instanceof ga)return e;if(yi(e)&&/(.*)\.(jpg|bmp|gif|ico|pcx|jpeg|tif|png|raw|tga)$/.test(e)||e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement)return new l({image:e,repeat:ht({x:1,y:1}),color:n.WHITE,transparent:!0});if(et(e)||yi(e))return new s(Te(e));if(ot(e)&&ze(e,"fabric")){const g=e;switch(g.fabric.type){case"Image":return new l({image:g.fabric.uniforms.image,repeat:ht(y(g.fabric.uniforms.repeat,{x:1,y:1})),color:y(Te(g.fabric.uniforms.color),n.WHITE),transparent:y(g.fabric.uniforms.transparent,!1)});case"Color":return new s(Te(y(g.fabric.uniforms.color,n.WHITE)));case"PolylineArrow":return new u(Te(y(g.fabric.uniforms.color,n.WHITE)));case"PolylineDash":return new d({color:Te(y(g.fabric.uniforms.color,"white")),gapColor:Te(y(g.fabric.uniforms.gapColor,n.TRANSPARENT)),dashLength:y(g.fabric.uniforms.taperPower,16),dashPattern:y(g.fabric.uniforms.taperPower,255)});case"PolylineGlow":return new h({color:Te(y(g.fabric.uniforms.color,n.WHITE)),glowPower:y(g.fabric.uniforms.glowPower,.25),taperPower:y(g.fabric.uniforms.taperPower,1)});case"PolylineOutline":return new p({color:Te(y(g.fabric.uniforms.color,n.WHITE)),outlineColor:Te(y(g.fabric.uniforms.outlineColor,n.BLACK)),outlineWidth:y(g.fabric.uniforms.outlineWidth,1)});case"Checkerboard":return new o({evenColor:Te(y(g.fabric.uniforms.evenColor,n.WHITE)),oddColor:Te(y(g.fabric.uniforms.oddColor,n.BLACK)),repeat:y(ht(g.fabric.uniforms.repeat),{x:2,y:2})});case"Grid":return new r({color:Te(y(g.fabric.uniforms.color,n.WHITE)),cellAlpha:y(g.fabric.uniforms.cellAlpha,.1),lineCount:y(ht(g.fabric.uniforms.lineCount),{x:8,y:8}),lineThickness:y(ht(g.fabric.uniforms.lineThickness),{x:1,y:1}),lineOffset:y(ht(g.fabric.uniforms.lineOffset),{x:0,y:0})});case"Stripe":return new v({orientation:y(g.fabric.uniforms.orientation,b.HORIZONTAL),evenColor:Te(y(g.fabric.uniforms.evenColor,"white")),oddColor:Te(y(g.fabric.uniforms.oddColor,"black")),offset:y(g.fabric.uniforms.offset,0),repeat:y(g.fabric.uniforms.repeat,1)});case"VcCircleWave":return new qn({duration:y(g.fabric.uniforms.duration,3e3),gradient:y(g.fabric.uniforms.gradient,.5),color:Te(y(g.fabric.uniforms.color,n.RED)),count:y(g.fabric.uniforms.count,3)});case"VcLineFlow":return new ga({image:y(g.fabric.uniforms.image,M.DefaultImageId),color:Te(y(g.fabric.uniforms.color,new n(1,1,1,1))),repeat:ht(y(g.fabric.uniforms.repeat,new x(1,1))),axisY:y(g.fabric.uniforms.axisY,!1),mixt:y(g.fabric.uniforms.mixt,!1),speed:y(g.fabric.uniforms.speed,10),time:y(g.fabric.uniforms.time,-1)})}}return bt(e)?new i(e,t):e}function Xs(e){var t;const i=this,n=(t=i==null?void 0:i.proxy)==null?void 0:t.$options.name;if(n&&(n.indexOf("Graphics")!==-1||n.indexOf("Datasource")!==-1||n==="VcOverlayDynamic"||n==="VcEntity"))return x1(e);const{Material:o,combine:s}=Cesium;if(e instanceof o)return e;if(ot(e)&&ze(e,"fabric")){const a=r=>{for(const l in r)if(!et(r[l])&&ot(r[l]))a(r[l]);else if(l.toLocaleLowerCase().indexOf("color")!==-1&&!Oo(r[l])){const c=Te(r[l]);r[l]=s(c,c,!0)}};return a(e),new o(e)}if(et(e)||yi(e)){const a=o.fromType("Color");return a.uniforms.color=Te(e),a}}function Ma(e){var t;const{Appearance:i,DebugAppearance:n,MaterialAppearance:o,PolylineColorAppearance:s,EllipsoidSurfaceAppearance:a,PerInstanceColorAppearance:r,PolylineMaterialAppearance:l}=Cesium;if(e instanceof i||e instanceof n||e instanceof o||e instanceof s||e instanceof a||e instanceof r||e instanceof l)return e;if(ot(e)&&ze(e,"type")){const c={...e.options};return(t=e.options)!=null&&t.material&&(c.material=Xs.call(this,e.options.material)),new Cesium[e.type]({...c})}}function Pn(e,t=!1){const{Rectangle:i,RectangleGraphics:n,CallbackProperty:o}=Cesium;if(e instanceof n||e instanceof i||e instanceof o)return e;if(et(e))return i.fromDegrees(e[0],e[1],e[2],e[3]);if(ot(e)){if(ze(e,"west")){const s=e;return i.fromDegrees(s.west,s.south,s.east,s.north)}else if(ze(e,"x")){const s=e;return new i(s.x,s.y,s.z,s.w)}}if(bt(e))return new o(e,t)}function gu(e,t=!1){const{BoundingRectangle:i,CallbackProperty:n}=Cesium;if(e instanceof i||e instanceof n)return e;if(ot(e)&&ze(e,"x")){const o=e;return new i(o.x,o.y,o.width,o.height)}if(et(e))return new i(e[0],e[1],e[2],e[3]);if(bt(e))return new n(e,t)}function E1(e,t=!1){const{Cartesian3:i,Plane:n,PlaneGraphics:o,CallbackProperty:s}=Cesium;if(e instanceof o||e instanceof n||e instanceof s)return e;if(ot(e)&&ze(e,"normal")){const a=e;return i.normalize(tt(a.normal),a.normal),new n(a.normal,a.distance)}if(et(e)){const a=tt(e[0]),r=i.normalize(a,new i);return new n(r,e[1])}if(bt(e))return new s(e,t)}function M1(e,t=!1){const{TranslationRotationScale:i,CallbackProperty:n}=Cesium;if(e instanceof n||e instanceof i)return e;if(ot(e)&&ze(e,"translation")){const o=e;return new i(tt(o.translation),Qs(o.rotation),tt(o.scale))}return et(e)?new i(tt(e[0]),Qs(e[1]),tt(e[2])):bt(e)?new n(e,t):e}function O1(e){var t;const i=(t=this.proxy)==null?void 0:t.$options.name,n={};switch(i){case"VcDatasourceGeojson":return Object.assign(n,e),n&&n.markerColor&&(n.markerColor=Te(n.markerColor)),n&&n.stroke&&(n.stroke=Te(n.stroke)),n&&n.fill&&(n.fill=Te(n.fill)),n}return e}function P1(e){const t=e.scene,i=new Promise((n,o)=>{const s=e.scene.postRender.addEventListener(()=>{s();try{const a=e.scene.canvas;n(a.toDataURL("image/png"))}catch(a){o(a)}})});return t.render(e.clock.currentTime),i}function yu(e,t){const{Math:i,Rectangle:n,defaultValue:o}=Cesium;let s,a={};if(ze(e,"position")){const r=e.position;s=tt(r,t),ze(r,"lng")&&ze(r,"lat")||et(r)?a={heading:i.toRadians(o(e.heading,360)),pitch:i.toRadians(o(e.pitch,-90)),roll:i.toRadians(o(e.roll,0))}:a={heading:o(e.heading,2*Math.PI),pitch:o(e.pitch,-Math.PI/2),roll:o(e.roll,0)}}else if(ze(e,"rectangle")){const r=e.rectangle;s=Pn(r),n.validate(s),ze(r,"west")&&ze(r,"south")&&ze(r,"east")&&ze(r,"north")||et(r)?a={heading:i.toRadians(o(e.heading,360)),pitch:i.toRadians(o(e.pitch,-90)),roll:i.toRadians(o(e.roll,0))}:a={heading:o(e.heading,2*Math.PI),pitch:o(e.pitch,-Math.PI/2),roll:o(e.roll,0)}}return{destination:s,orientation:a}}function Ys(e,t){const{destination:i,orientation:n}=yu(t,e.scene.globe.ellipsoid);e.camera.setView({destination:i,orientation:n})}function S1(e,t,i){const{destination:n,orientation:o}=yu(t,e.scene.globe.ellipsoid);e.camera.flyTo({...i,destination:(i==null?void 0:i.destination)||n,orientation:(i==null?void 0:i.orientation)||o})}function Ks(e,t,i){const{EllipsoidGeodesic:n,Ellipsoid:o}=Cesium;i=i||o.WGS84;const s=i.cartesianToCartographic(e),a=i.cartesianToCartographic(t);return new n(s,a).surfaceDistance}function T1(e,t,i,n){const{Cartesian3:o}=Cesium;if(o.equals(e,t))return;const s=Cesium.Cartesian3.subtract(t,e,new Cesium.Cartesian3),a=Cesium.Cartesian3.normalize(s,new Cesium.Cartesian3),r=Cesium.Transforms.rotationMatrixFromPositionVelocity(e,a,i.globe.ellipsoid),l=Cesium.Matrix4.fromRotationTranslation(r,e),c=Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Matrix4.getTranslation(l,new Cesium.Cartesian3),Cesium.Ellipsoid.WGS84,new Cesium.Matrix4),u=Cesium.Matrix4.multiply(Cesium.Matrix4.inverse(c,new Cesium.Matrix4),l,new Cesium.Matrix4),d=Cesium.Matrix4.getMatrix3(u,new Cesium.Matrix3),h=Cesium.Quaternion.fromRotationMatrix(d);return Cesium.HeadingPitchRoll.fromQuaternion(h)}function I1(e,t,i,n){const{HeadingPitchRoll:o,Transforms:s,Matrix4:a,Cartesian3:r,Cartesian4:l,Quaternion:c,Cartographic:u,Ellipsoid:d}=Cesium;n=n||d.WGS84;const h=new o(t,0,0),p=new r(1,1,1),v=s.headingPitchRollToFixedFrame(e,h),b=a.getColumn(v,1,new l),y=new r(b.x,b.y,b.z),x=c.fromAxisAngle(y,i*n.oneOverRadii.x),M=a.fromTranslationQuaternionRotationScale(r.ZERO,x,p),g=a.multiplyByPoint(M,e,new r),w=u.fromCartesian(e,n),O=u.fromCartesian(g,n);return O.height=w.height,u.toCartesian(O,n)}function bu(e){let t=0;const{CoplanarPolygonGeometry:i,VertexFormat:n,defined:o,Cartesian3:s}=Cesium,a=i.createGeometry(i.fromPositions({positions:e,vertexFormat:n.POSITION_ONLY}));if(!ui(a)&&o(a)){const r=a.indices,l=a.attributes.position.values;for(let c=0;c<r.length;c+=3){const u=r[c],d=r[c+1],h=r[c+2];t+=A1(s.unpack(l,3*u,{}),s.unpack(l,3*d,{}),s.unpack(l,3*h,{}))}}return t}const A1=(e,t,i)=>{const{Cartesian3:n}=Cesium,o=n.subtract(e,t,{}),s=n.subtract(i,t,{}),a=n.cross(o,s,o);return .5*n.magnitude(a)};function Di(e){const{JulianDate:t}=Cesium;return e instanceof t?e:yi(e)?Cesium.JulianDate.fromDate(new Date(e)):e instanceof Date?Cesium.JulianDate.fromDate(e):Cesium.JulianDate.now()}function er(e){const{HeadingPitchRange:t,Math:i}=Cesium;return e instanceof Cesium.HeadingPitchRange?e:Array.isArray(e)?new t(i.toRadians(e[0])||0,i.toRadians(e[1])||0,e[2]||0):ot(e)?new t(e.heading||0,e.pitch||0,e.range||0):new t}function Cu(e,t){const{Cartesian3:i,Matrix4:n,Transforms:o,Math:s}=Cesium,a=new i,r=o.eastNorthUpToFixedFrame(e);return n.inverse(r,r),n.multiplyByPoint(r,t,a),i.normalize(a,a),s.toDegrees(Math.atan2(a.x,a.y))}function wu(e,t){const{Cartesian3:i,Matrix4:n,Transforms:o,Math:s}=Cesium,a=new i,r=o.eastNorthUpToFixedFrame(e);return n.inverse(r,r),n.multiplyByPoint(r,t,a),i.normalize(a,a),s.toDegrees(Math.asin(a.z))}function _u(e,t,i,n=[]){const{Cartesian3:o,Ray:s,defined:a}=Cesium,r=o.normalize(o.subtract(t,e,new o),new o),l=new s(e,r),c=i.scene.pickFromRay(l,n);if(a(c)&&a(c.position))return c.position}function tr(e){const t=7096758e-11,i=91610.74,n=-40467.74;return Math.round(n+(40487.57-n)/(1+Math.pow(e/i,t)))}function nn(e,t,i=">="){return g1(e,t,i)}function D1(e){const{ImageBasedLighting:t,defined:i}=Cesium;if(e instanceof Cesium.ImageBasedLighting)return e;const n=new t;return n.imageBasedLightingFactor&&(n.imageBasedLightingFactor=ht(e.imageBasedLightingFactor)),n.sphericalHarmonicCoefficients&&(n.sphericalHarmonicCoefficients=Ci(e.sphericalHarmonicCoefficients)),n.luminanceAtZenith&&(n.luminanceAtZenith=Number(e.luminanceAtZenith)),i(n.specularEnvironmentMaps)&&(n.specularEnvironmentMaps=e.specularEnvironmentMaps),n}const Sn={position:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:tt,deep:!0}}},xu={viewFrom:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:tt,deep:!0}}},ir={orientation:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Qs}}},nr={alignedAxis:{type:[Object,Array,Function],default:()=>({x:0,y:0,z:0}),watcherOptions:{cesiumObjectBuilder:tt}}},on={color:{type:[Object,String,Array,Function],default:"white",watcherOptions:{cesiumObjectBuilder:Te}}},B1={depthFailColor:{type:[Object,String,Array,Function],default:"white",watcherOptions:{cesiumObjectBuilder:Te}}},Tn={disableDepthTestDistance:[Number,Object,Function]},ft={distanceDisplayCondition:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:w1}}},So={eyeOffset:{type:[Object,Array,Function],default:()=>({x:0,y:0,z:0}),watcherOptions:{cesiumObjectBuilder:tt}}},$t={height:[Number,Object,Function]},Zt={heightReference:{type:[Number,Object,Function]}},To={horizontalOrigin:{type:[Number,Object,Function],default:0}},Oa={image:[String,Object,HTMLCanvasElement,Function]},Eu={imageSubRegion:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:gu}}},Zn={pixelOffset:{type:[Object,Array,Function],default:()=>({x:0,y:0}),validator:e=>et(e)?e.length===2:Ii(e)?ze(e,"x")&&ze(e,"y"):!!bt(e),watcherOptions:{cesiumObjectBuilder:ht}}},Io={pixelOffsetScaleByDistance:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Js}}},an={rotation:{type:[Number,Object,Function],default:0}},In={scale:{type:[Number,Object,Function],default:1}},An={scaleByDistance:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Js}}},Ie={show:{type:[Boolean,Object,Function],default:!0}},Pa={sizeInMeters:{type:[Boolean,Object,Function],default:!1}},Dn={translucencyByDistance:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Js}}},Ao={verticalOrigin:{type:[Number,Object,Function],default:0}},Bi={width:[Number,Object,Function]},Sa={dimensions:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:tt}}},Li={fill:{type:[Boolean,Object,Function],default:!0}},ii={material:{type:[Object,String,Array,Function],default:"white",watcherOptions:{cesiumObjectBuilder:Xs}}},ji={outline:{type:[Boolean,Object,Function],default:!1}},qt={outlineColor:{type:[Object,String,Array,Function],default:"black",watcherOptions:{cesiumObjectBuilder:Te}}},Jt={outlineWidth:{type:[Number,Object,Function],default:1}},Nt={shadows:[Number,Object,Function]},ni={positions:{type:[Array,Object,Function],watcherOptions:{cesiumObjectBuilder:Ci,exclude:"_callback",deep:!0}}},Xt={extrudedHeight:[Number,Object,Function]},Do={extrudedHeightReference:[Number,Object,Function]},Bn={cornerType:{type:[Number,Object,Function],default:0}},st={granularity:[Number,Object,Function]},Fi={classificationType:{type:[Number,Object,Function]}},Jn={zIndex:[Number,Object,Function]},Ta={length:[Number,Object,Function]},Ia={topRadius:[Number,Object,Function]},Aa={bottomRadius:[Number,Object,Function]},Xn={numberOfVerticalLines:{type:[Number,Object,Function],default:16}},Da={slices:{type:[Number,Object,Function],default:128}},Ba={semiMajorAxis:[Number,Object,Function]},La={semiMinorAxis:[Number,Object,Function]},zi={stRotation:{type:[Number,Object,Function],default:0}},ja={radii:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:tt}}},Fa={innerRadii:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:tt}}},ka={minimumClock:{type:[Number,Object,Function],default:0}},Ra={maximumClock:{type:[Number,Object,Function],default:2*Math.PI}},$a={minimumCone:{type:[Number,Object,Function],default:0}},Na={maximumCone:{type:[Number,Object,Function],default:Math.PI}},Yn={stackPartitions:{type:[Number,Object,Function],default:64}},Kn={slicePartitions:{type:[Number,Object,Function],default:64}},Va={subdivisions:{type:[Number,Object,Function],default:128}},or={text:[String,Object,Function]},ar={font:{type:[String,Object,Function],default:"30px sans-serif"}},sr={labelStyle:{type:[Number,Object,Function],default:0}},rr={showBackground:{type:[Boolean,Object,Function],default:!1}},lr={backgroundColor:{type:[Object,String,Array,Function],default:()=>({x:.165,y:.165,z:.165,w:.8}),watcherOptions:{cesiumObjectBuilder:Te}}},cr={backgroundPadding:{type:[Object,Array,Function],default:()=>({x:7,y:5}),watcherOptions:{cesiumObjectBuilder:ht}}},ur={fillColor:{type:[Object,String,Array,Function],default:"white",watcherOptions:{cesiumObjectBuilder:Te}}},dr={uri:[String,Object,Function]},hr={minimumPixelSize:{type:[Number,Object,Function],default:0}},mr={maximumScale:[Number,Object,Function]},pr={incrementallyLoadTextures:{type:[Boolean,Object,Function],default:!0}},Mu={clampAnimations:{type:[Boolean,Object,Function],default:!0}},vr={clampAnimations:{type:[Boolean,Object,Function],default:!0}},fr={silhouetteColor:{type:[Object,String,Array,Function],watcherOptions:{cesiumObjectBuilder:Te}}},gr={silhouetteSize:{type:[Number,Object,Function],default:0}},yr={colorBlendMode:{type:[Number,Object,Function],default:0}},br={colorBlendAmount:{type:[Number,Object,Function],default:.5}},za={imageBasedLightingFactor:{type:[Object,Array,Function],default:()=>[1,1],watcherOptions:{cesiumObjectBuilder:ht}}},Cr={lightColor:{type:[Object,String,Array,Function],watcherOptions:{cesiumObjectBuilder:Te}}},Ou={nodeTransformations:{type:[Object,Function],watcherOptions:{cesiumObjectBuilder:M1}}},Pu={articulations:[Object,Function]},Bo={clippingPlanes:[Object,Function]},Su={plane:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:E1}}},wr={pixelSize:{type:[Number,Object,Function],default:1}},Tu={hierarchy:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Zs,deep:!0,exclude:"_callback"}}},Ga={perPositionHeight:{type:[Boolean,Object,Function],default:!1}},_r={closeTop:{type:[Boolean,Object,Function],default:!0}},xr={closeBottom:{type:[Boolean,Object,Function],default:!0}},sn={arcType:{type:[Number,Object,Function],default:1}},Iu={depthFailMaterial:{type:[Object,String,Array,Function],watcherOptions:{cesiumObjectBuilder:Xs}}},Lo={clampToGround:{type:[Boolean,Object,Function],default:!1}},Au={shape:{type:[Array,Object,Function],watcherOptions:{cesiumObjectBuilder:vu}}},Du={coordinates:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:Pn}}},Er={maximumScreenSpaceError:{type:[Number,Object,Function],default:16}},Ua={minimumHeights:[Array,Object,Function]},Ha={maximumHeights:[Array,Object,Function]},Bu={cutoutRectangle:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:Pn}}},Lu={colorToAlpha:{type:[Object,String,Array],watcherOptions:{cesiumObjectBuilder:Te}}},wi={url:[String,Object]},Mr={token:String},jo={tileDiscardPolicy:Object},Or={layers:String},Wa={enablePickFeatures:{type:Boolean,default:!0}},Dt={rectangle:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:Pn}}},ki={tilingScheme:Object},$e={ellipsoid:Object},St={credit:{type:[String,Object],default:""}},Gi={tileWidth:{type:Number,default:256}},Ui={tileHeight:{type:Number,default:256}},oi={maximumLevel:Number},di={minimumLevel:{type:Number,default:0}},Pr={fileExtension:{type:String,default:"png"}},Sr={accessToken:String},Tr={format:{type:String,default:"png"}},qa={subdomains:[String,Array]},Ir={getFeatureInfoFormats:Array},Fo={clock:Object},Ar={times:Object},Ln={projectionTransforms:{type:[Boolean,Object],default:!1}},Dr={customShader:{type:Object}},ju={maximumMemoryUsage:{type:Number,default:256}},Fu={defaultColor:{type:[Object,String,Array],watcherOptions:{cesiumObjectBuilder:Te}}},Br={tileStyle:{type:Object}},jn={allowPicking:{type:Boolean,default:!0}},Fn={asynchronous:{type:Boolean,default:!0}},Qa={debugShowShadowVolume:{type:Boolean,default:!1}},ko={releaseGeometryInstances:{type:Boolean,default:!0}},Ro={interleave:{type:Boolean,default:!1}},eo={appearance:{type:Object,watcherOptions:{cesiumObjectBuilder:Ma,deep:!0}}},Lr={depthFailAppearance:{type:Object,watcherOptions:{cesiumObjectBuilder:Ma,deep:!0}}},$o={geometryInstances:[Array,Object]},Za={vertexCacheOptimize:{type:Boolean,default:!1}},No={compressVertices:{type:Boolean,default:!0}},_i={modelMatrix:Object},Ri={debugShowBoundingVolume:{tyep:Boolean,default:!1}},Vo={scene:Object},Ja={blendOption:{type:Number,default:2}},dn={id:null},jr={loop:{type:Boolean,default:!1}},Fr={debugWireframe:{type:Boolean,default:!1}},Vt={vertexFormat:Object},zo={center:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:tt}}},Go={radius:Number},kr={frustum:Object},Rr={origin:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:tt}}},kn={polygonHierarchy:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:Zs,deep:!0}}},ku={startColor:{type:[Object,String,Array],watcherOptions:{cesiumObjectBuilder:Te}}},Ru={endColor:{type:[Object,String,Array],watcherOptions:{cesiumObjectBuilder:Te}}},$u={minimumImageSize:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:ht}}},Nu={maximumImageSize:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:ht}}},Vu={imageSize:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:ht}}},$r={shapePositions:{type:Array,watcherOptions:{cesiumObjectBuilder:vu,deep:!0}}},Nr={polylinePositions:{type:Array,watcherOptions:{cesiumObjectBuilder:Ci,deep:!0}}},zu={lightColor:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:tt}}},Vr={luminanceAtZenith:{type:Number,default:.2}},zr={sphericalHarmonicCoefficients:{type:[Array,Object],watcherOptions:{cesiumObjectBuilder:Ci}}},Gr={specularEnvironmentMaps:String},Gu={imageBasedLighting:{type:Object,watcherOptions:{cesiumObjectBuilder:D1}}},Ur={backFaceCulling:{type:Boolean,default:!0}},Hr={colors:{type:Array,watcherOptions:{cesiumObjectBuilder:_1,deep:!0}}},Wr={data:{type:[String,Object],required:!0}},Xa={sourceUri:{type:[String,Object]}},L1={options:{type:Object,watcherOptions:{cesiumObjectBuilder:O1,deep:!0}}},Uu={glowColor:{type:[String,Array,Object],default:()=>[0,1,0,.05],watcherOptions:{cesiumObjectBuilder:Te}}},Hu={clearColor:{type:[String,Array,Object],watcherOptions:{cesiumObjectBuilder:Te}}},Wu={scissorRectangle:{type:[Object,Array],watcherOptions:{cesiumObjectBuilder:gu}}},Qe={enableMouseEvent:{type:Boolean,default:!0}};var qu=Object.freeze({__proto__:null,customShader:Dr,maximumMemoryUsage:ju,tileStyle:Br,defaultColor:Fu,viewFrom:xu,projectionTransforms:Ln,sourceUri:Xa,colors:Hr,enableMouseEvent:Qe,backFaceCulling:Ur,imageBasedLighting:Gu,specularEnvironmentMaps:Gr,sphericalHarmonicCoefficients:zr,luminanceAtZenith:Vr,maximumScreenSpaceError:Er,runAnimations:Mu,articulations:Pu,scissorRectangle:Wu,clearColor:Hu,glowColor:Uu,options:L1,data:Wr,imageSubRegion:Eu,coordinates:Du,nodeTransformations:Ou,hierarchy:Tu,plane:Su,colorToAlpha:Lu,cutoutRectangle:Bu,polylinePositions:Nr,shapePositions:$r,imageSize:Vu,maximumImageSize:Nu,minimumImageSize:$u,endColor:Ru,startColor:ku,shape:Au,lightColor:Cr,lightColor2:zu,imageBasedLightingFactor:za,polygonHierarchy:kn,orientation:ir,origin:Rr,frustum:kr,maximumCone:Na,minimumCone:$a,maximumClock:Ra,minimumClock:ka,innerRadii:Fa,radius:Go,center:zo,debugWireframe:Fr,vertexFormat:Vt,position:Sn,loop:jr,geometryInstances:$o,depthFailAppearance:Lr,appearance:eo,interleave:Ro,releaseGeometryInstances:ko,debugShowShadowVolume:Qa,id:dn,allowPicking:jn,asynchronous:Fn,vertexCacheOptimize:Za,compressVertices:No,modelMatrix:_i,debugShowBoundingVolume:Ri,scene:Vo,blendOption:Ja,maximumHeights:Ha,minimumHeights:Ua,arcType:sn,clampToGround:Lo,closeBottom:xr,closeTop:_r,perPositionHeight:Ga,pixelSize:wr,clippingPlanes:Bo,colorBlendAmount:br,colorBlendMode:yr,silhouetteSize:gr,silhouetteColor:fr,clampAnimations:vr,incrementallyLoadTextures:pr,maximumScale:mr,minimumPixelSize:hr,uri:dr,fillColor:ur,backgroundPadding:cr,backgroundColor:lr,showBackground:rr,labelStyle:sr,font:ar,text:or,subdivisions:Va,slicePartitions:Kn,stackPartitions:Yn,radii:ja,stRotation:zi,semiMinorAxis:La,semiMajorAxis:Ba,slices:Da,numberOfVerticalLines:Xn,bottomRadius:Aa,topRadius:Ia,length:Ta,zIndex:Jn,classificationType:Fi,granularity:st,cornerType:Bn,extrudedHeightReference:Do,extrudedHeight:Xt,positions:ni,image:Oa,scale:In,pixelOffset:Zn,eyeOffset:So,horizontalOrigin:To,verticalOrigin:Ao,heightReference:Zt,depthFailColor:B1,color:on,rotation:an,alignedAxis:nr,sizeInMeters:Pa,width:Bi,height:$t,scaleByDistance:An,translucencyByDistance:Dn,pixelOffsetScaleByDistance:Io,disableDepthTestDistance:Tn,dimensions:Sa,fill:Li,depthFailMaterial:Iu,material:ii,outline:ji,outlineColor:qt,outlineWidth:Jt,shadows:Nt,distanceDisplayCondition:ft,show:Ie,times:Ar,clock:Fo,getFeatureInfoFormats:Ir,subdomains:qa,format:Tr,accessToken:Sr,fileExtension:Pr,minimumLevel:di,maximumLevel:oi,tileHeight:Ui,url:wi,token:Mr,tileDiscardPolicy:jo,layers:Or,enablePickFeatures:Wa,rectangle:Dt,tilingScheme:ki,ellipsoid:$e,credit:St,tileWidth:Gi}),Qu={name:"zh-hans",nativeName:"\u4E2D\u6587(\u7B80\u4F53)",vc:{loadError:"\u52A0\u8F7D\u5931\u8D25\uFF0C\u5FC5\u987B\u4F5C\u4E3A VcViewer \u7684\u5B50\u7EC4\u4EF6\u52A0\u8F7D\u3002",navigation:{compass:{outerTip:`\u65CB\u8F6C\u89C6\u56FE\uFF1A\u987A/\u9006\u65F6\u9488\u65B9\u5411\u62D6\u62FD\u7F57\u76D8\u5916\u73AF\u3002
\u91CD\u7F6E\u89C6\u56FE\uFF1A\u53CC\u51FB\u7F57\u76D8\u5916\u73AF\u3002`,innerTip:`\u7FFB\u8F6C\u89C6\u56FE\uFF1A\u7531\u5185\u73AF\u5411\u5916\u73AF\u62D6\u62FD\u7F57\u76D8\u3002
\u6216\u8005\u6309\u4F4F Ctrl \u952E\u7684\u540C\u65F6\u62D6\u62FD\u5730\u56FE\u3002`,title:"\u6309\u4F4F\u9F20\u6807\u62D6\u62FD\u65CB\u8F6C\u76F8\u673A\u3002"},zoomCotrol:{zoomInTip:"\u653E\u5927",zoomResetTip:"\u91CD\u7F6E\u89C6\u56FE",zoomOutTip:"\u7F29\u5C0F"},print:{printTip:"\u573A\u666F\u622A\u56FE/\u6253\u5370",printViewTitle:"\u6253\u5370\u9884\u89C8",credit:"\u5730\u56FE\u7248\u6743",screenshot:"\u573A\u666F\u622A\u56FE"},myLocation:{myLocationTip:"\u5B9A\u4F4D\u60A8\u7684\u4F4D\u7F6E",positioning:"\u5B9A\u4F4D\u4E2D...",fail:"\u5B9A\u4F4D\u5931\u8D25",centreMap:"\u6211\u7684\u4F4D\u7F6E",lat:"\u7EAC\u5EA6",lng:"\u7ECF\u5EA6",address:"\u5730\u5740"},statusBar:{lat:"\u7EAC\u5EA6",lng:"\u7ECF\u5EA6",zone:"\u5E26\u53F7",e:"X",n:"Y",elev:"\u9AD8\u7A0B",level:"\u5C42\u7EA7",heading:"\u65B9\u4F4D",pitch:"\u4FEF\u4EF0",roll:"\u4FA7\u7FFB",cameraHeight:"\u89C6\u9AD8",tip:"\u70B9\u51FB\u5207\u6362\u9F20\u6807\u663E\u793A\u5750\u6807\u4E3A UTM \u6295\u5F71\u5750\u6807"}},navigationSm:{compass:{outerTip:"\u65CB\u8F6C\u89C6\u56FE\uFF1A\u987A/\u9006\u65F6\u9488\u65B9\u5411\u62D6\u62FD\u7F57\u76D8\u5916\u73AF\uFF1B\u91CD\u7F6E\u89C6\u56FE\uFF1A\u53CC\u51FB\u7F57\u76D8\u5916\u73AF\u3002"},zoomCotrol:{zoomInTip:"\u653E\u5927",zoomBarTip:"\u6309\u4F4F\u6ED1\u5757\u5411\u4E0A\u653E\u5927\uFF0C\u5411\u4E0B\u7F29\u5C0F\u3002",zoomOutTip:"\u7F29\u5C0F"}},measurement:{expand:"\u5C55\u5F00",collapse:"\u6536\u62E2",editor:{move:"\u79FB\u52A8\u8282\u70B9",insert:"\u63D2\u5165\u8282\u70B9",remove:"\u79FB\u9664\u8282\u70B9",removeAll:"\u79FB\u9664\u6240\u6709\u8282\u70B9"},distance:{tip:"\u8DDD\u79BB\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u8DDD\u79BB\u91CF\u7B97\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u8DDD\u79BB\u91CF\u7B97\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},"component-distance":{tip:"\u4E09\u89D2\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E09\u89D2\u91CF\u7B97\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E09\u89D2\u91CF\u7B97\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},polyline:{tip:"\u6298\u7EBF\u8DDD\u79BB\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u91CF\u7B97\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},horizontal:{tip:"\u6C34\u5E73\u8DDD\u79BB\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u91CF\u7B97\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},vertical:{tip:"\u5782\u76F4\u8DDD\u79BB\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5782\u76F4\u8DDD\u79BB\u91CF\u7B97\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5782\u76F4\u8DDD\u79BB\u91CF\u7B97\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},height:{tip:"\u5730\u8868\u9AD8\u5EA6\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u9AD8\u5EA6\u91CF\u7B97\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u9AD8\u5EA6\u91CF\u7B97\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},area:{tip:"\u9762\u79EF\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002",drawingTipEnd:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u91CF\u7B97\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},point:{tip:"\u5750\u6807\u91CF\u7B97",drawingTipStart:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u5750\u6807\u91CF\u7B97\u70B9\u3002",drawingTipEnd:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u5750\u6807\u91CF\u7B97\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002",lng:"\u7ECF\u5EA6\uFF1A",lat:"\u7EAC\u5EA6\uFF1A",height:"\u9AD8\u5EA6\uFF1A",slope:"\u5761\u5EA6\uFF1A"},rectangle:{tip:"\u77E9\u5F62\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u77E9\u5F62\u91CF\u7B97\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u77E9\u5F62\u91CF\u7B97\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},regular:{tip:"\u6B63\u591A\u8FB9\u5F62\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62\u91CF\u7B97\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62\u91CF\u7B97\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},circle:{tip:"\u5706\u5F62\u91CF\u7B97",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5706\u5F62\u91CF\u7B97\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5706\u5F62\u91CF\u7B97\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},clear:{tip:"\u6E05\u9664\u91CF\u7B97\u7ED3\u679C"}},drawing:{expand:"\u5C55\u5F00",collapse:"\u6536\u62E2",editor:{move:"\u79FB\u52A8\u8282\u70B9",insert:"\u63D2\u5165\u8282\u70B9",remove:"\u79FB\u9664\u8282\u70B9",removeAll:"\u79FB\u9664\u6240\u6709\u8282\u70B9"},pin:{tip:"\u7ED8\u5236\u56FE\u6807\u70B9",drawingTipStart:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u56FE\u6807\u70B9\u3002",drawingTipEnd:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u56FE\u6807\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},point:{tip:"\u7ED8\u5236\u70B9",drawingTipStart:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u70B9\u3002",drawingTipEnd:"\u70B9\u51FB\u5DE6\u952E\u7ED8\u5236\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},polyline:{tip:"\u7ED8\u5236\u7EBF",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u7ED8\u5236\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},polygon:{tip:"\u7ED8\u5236\u9762",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u4E0B\u4E00\u4E2A\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u7ED8\u5236\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},rectangle:{tip:"\u7ED8\u5236\u77E9\u5F62",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u77E9\u5F62\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u77E9\u5F62\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},circle:{tip:"\u7ED8\u5236\u5706",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5706\u5F62\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u5706\u5F62\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},regular:{tip:"\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u6B63\u591A\u8FB9\u5F62\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},clear:{tip:"\u6E05\u9664\u7ED8\u5236\u7ED3\u679C"}},analysis:{expand:"\u5C55\u5F00",collapse:"\u6536\u62E2",editor:{move:"\u79FB\u52A8\u8282\u70B9",insert:"\u63D2\u5165\u8282\u70B9",remove:"\u79FB\u9664\u8282\u70B9",removeAll:"\u79FB\u9664\u6240\u6709\u8282\u70B9"},sightline:{tip:"\u901A\u89C6\u5206\u6790",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u89C2\u6D4B\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u76EE\u6807\u70B9\uFF0C\u53CC\u51FB\u5DE6\u952E\u7ED3\u675F\u7ED8\u5236\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},viewshed:{tip:"\u53EF\u89C6\u57DF\u5206\u6790",drawingTipStart:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u53EF\u89C6\u57DF\u5206\u6790\u8D77\u70B9\u3002",drawingTipEnd:"\u5355\u51FB\u5DE6\u952E\u7ED8\u5236\u53EF\u89C6\u57DF\u5206\u6790\u7EC8\u70B9\u3002",drawingTipEditing:"\u79FB\u52A8\u9F20\u6807\u4FEE\u6539\u8282\u70B9\uFF0C\u5355\u51FB\u5DE6\u952E\u786E\u5B9A\u4FEE\u6539\uFF0C\u5355\u51FB\u53F3\u952E\u653E\u5F03\u4FEE\u6539\u3002"},clear:{tip:"\u6E05\u9664\u5206\u6790\u7ED3\u679C"}},overview:{show:"\u663E\u793A\u9E70\u773C",hidden:"\u9690\u85CF\u9E70\u773C"},typhoon:{warn:"\u64AD\u653E\u53F0\u98CE\u5931\u8D25\uFF0C\u539F\u56E0\uFF1A\u672A\u627E\u5230\u5BF9\u5E94\u7F16\u53F7\u7684\u53F0\u98CE\u6570\u636E\u3002"}}};const Zu=e=>(t,i)=>Ju(t,i,zs(e)),Ju=(e,t,i)=>Qb(i,e,e).replace(/\{(\w+)\}/g,(n,o)=>{var s;return`${(s=t==null?void 0:t[o])!=null?s:`{${o}}`}`}),Xu=e=>{const t=ae(()=>zs(e).name),i=qc(e)?e:ee(e);return{lang:t,locale:i,t:Zu(e)}},Ct=()=>{const e=xa("locale");return Xu(ae(()=>e.value||Qu))};function qr(e,t,i){const n=(a,r,l=!0)=>{const c=r||t.cesiumEvents||[];c&&c.forEach(u=>{if(a[u]){const d=Pe(t,u),h=l?"addEventListener":"removeEventListener";d&&a[u][h](d)}})},o=a=>{var r;const{viewer:l,cesiumObject:c}=t;if(c===void 0||l===void 0)return;const{ScreenSpaceEventHandler:u,ScreenSpaceEventType:d}=Cesium;(!l._vcPickScreenSpaceEventHandler||!l._vcViewerScreenSpaceEventHandler)&&(l._vcPickScreenSpaceEventHandler=new u(l.canvas),l._vcViewerScreenSpaceEventHandler=new u(l.canvas),Qr.forEach(h=>{const p=Pe(t,h);p&&l._vcViewerScreenSpaceEventHandler.setInputAction(p,d[h]),l._vcPickScreenSpaceEventHandler.setInputAction(s.bind({eventName:h,viewer:l}),d[h])})),n(c,t.cesiumEvents||[],a),(r=t.cesiumMembersEvents)==null||r.forEach(h=>{const p=et(h.name)&&h.name.length>0&&c[h.name[0]]?c[h.name[0]][h.name[1]]:c[h.name];p&&n(p,h.events,a)}),e.enableMouseEvent&&Yu.forEach(h=>{const p=Pe(t,h);a?p&&(c[`vc${h}`]=p):p&&delete c[`vc${h}`]})};function s(a){if(!e.enableMouseEvent||!a)return;const r=this.viewer,{eventName:l}=this,c=a.position||a.endPosition;if(!c)return;const u=[];let d;l.indexOf("LEFT_DOUBLE_CLICK")!==-1?d="dblclick":l.indexOf("CLICK")!==-1?d="click":l.indexOf("DOWN")!==-1?d="mousedown":l.indexOf("UP")!==-1?d="mouseup":l.indexOf("MOUSE_MOVE")!==-1&&(d="mousemove");let h;d==="mousemove"?h="mouseout":d==="click"&&(h="clickout");const p=r.scene.pick(c);if(Cesium.defined(p)?(this.pickedFeature&&this.pickedFeature.id!==p.id&&u.push({callbackName:h,pickedFeature:this.pickedFeature}),d==="mousemove"&&(!this.pickedFeature||this.pickedFeature.id!==p.id)&&u.push({callbackName:"mouseover",pickedFeature:p}),u.push({callbackName:d,pickedFeature:p})):(this.pickedFeature&&u.push({callbackName:h,pickedFeature:this.pickedFeature}),this.pickedFeature=void 0),u.length===0)return;let v;const b=r.scene;if(b.mode===Cesium.SceneMode.SCENE3D){const M=b.camera.getPickRay(c);v=b.globe.pick(M,b)}else v=b.camera.pickEllipsoid(c,b.globe.ellipsoid);let y=-1;l.indexOf("LEFT")!==-1?y=0:l.indexOf("MIDDLE")!==-1?y=1:l.indexOf("RIGHT")!==-1&&(y=2);const x=[];u.forEach(M=>{const g=M.callbackName,w=M.pickedFeature;w.id&&(et(w.id)?w.id[0]instanceof Cesium.Entity?x.push({callbackName:g,cesiumObject:w.id[0].entityCollection.owner,pickedFeature:w}):x.push({callbackName:g,cesiumObject:w.primitive.owner,pickedFeature:w}):w.id instanceof Cesium.Entity&&(x.push({callbackName:g,cesiumObject:w.id,pickedFeature:w}),x.push({callbackName:g,cesiumObject:w.id.entityCollection.owner,pickedFeature:w})));const O=I=>{x.push({callbackName:g,cesiumObject:I,pickedFeature:w}),I._vcParent&&O(I._vcParent)};w.primitive&&(w.primitive._vcParent&&O(w.primitive._vcParent),x.push({callbackName:g,cesiumObject:w.primitive,pickedFeature:w})),w.collection&&(w.collection._vcParent&&O(w.collection._vcParent),x.push({callbackName:g,cesiumObject:w.collection,pickedFeature:w}))}),x.forEach(M=>{if(M.callbackName){const g=M.cesiumObject[`vc${M.callbackName}`]||M.cesiumObject[`on${wa(M.callbackName)}`]||M.cesiumObject[se(`on${wa(M.callbackName)}`)];if(Cesium.defined(g)){const w={type:`on${M.callbackName}`,windowPosition:c,surfacePosition:v,pickedFeature:M.pickedFeature,button:y,cesiumObject:M.cesiumObject};g instanceof Cesium.CallbackProperty?g._callback(w):g(w)}}}),this.pickedFeature=p}return{bindEvents:n,registerEvents:o}}const Qr=["LEFT_CLICK","LEFT_DOUBLE_CLICK","LEFT_DOWN","LEFT_UP","MIDDLE_CLICK","MIDDLE_DOWN","MIDDLE_UP","MOUSE_MOVE","PINCH_END","PINCH_MOVE","PINCH_START","RIGHT_CLICK","RIGHT_DOWN","RIGHT_UP","WHEEL"],Yu=["mousedown","mouseup","click","clickout","dblclick","mousemove","mouseover","mouseout"];function Zr(){let e;return un(()=>{clearTimeout(e)}),{registerTimeout(t,i){clearTimeout(e),e=setTimeout(t,i)},removeTimeout(){clearTimeout(e)}}}const j1=["Graphics","VcEntity","Datasource","VcOverlayDynamic"];function Ne(e,{emit:t,attrs:i},n){const o=Po(n),{registerTimeout:s,removeTimeout:a}=Zr();n.alreadyListening=[],n.removeCallbacks=[];let r=[];n.mounted=!1;const l=Kc();n.vcMitt=l;const c=ya(Vi),{t:u}=Ct();if(c===void 0){console.error(`${n.cesiumClass} ${u("vc.loadError")}`);return}const d=Pt(n),h=qr(e,n);n.children=[];const p={billboard:!0,box:!0,corridor:!0,cylinder:!0,ellipse:!0,ellipsoid:!0,label:!0,model:!0,tileset:!0,path:!0,plane:!0,point:!0,polygon:!0,polyline:!0,polylineVolume:!0,rectangle:!0,wall:!0},v=xa(),b=async()=>{if(t("beforeLoad",n),d.nowaiting)return!0;await d.proxy.creatingPromise},y=async()=>{var f;if(n.mounted)return!1;o.debug(`${n.cesiumClass}---loading`),await b();const{Cesium:C,viewer:T}=c;return n.viewer=T,n.Cesium=C,!d.cesiumObject&&!d.nowaiting?await((f=d.proxy)==null?void 0:f.load()):(P(!0),R().then(async _=>(n.cesiumObject=_,O().then(()=>{n.mounted=!0,d.children.push(n),Object.assign(n.proxy,{cesiumObject:n.cesiumObject});const E={Cesium:C,viewer:T,cesiumObject:_,vm:n};return t("ready",E),l.emit("ready",E),o.debug(`${n.cesiumClass}---loaded`),E}))))},x=async()=>{await n.unloadingPromise},M=async()=>{await x();for(let f=0;f<n.children.length;f++)await n.children[f].proxy.unload();return n.children.length=0,n.isUnmounted=!1,n.mounted?I().then(async()=>(P(!1),n.cesiumObject=void 0,n.mounted=!1,n.removeCallbacks.forEach(f=>{f()}),t("destroyed",n),l.emit("destroyed",n),o.debug(`${n.cesiumClass}---unmounted`),n.renderByParent&&!n.unloadingPromise?d.proxy.unload():!0)):!1},g=async()=>{await n.reloadingPromise},w=async()=>(await g(),M().then(()=>y())),O=async()=>{var f;return h.registerEvents(!0),((f=n.mount)==null?void 0:f.call(n))||!0},I=async()=>{var f;return h.registerEvents(!1),((f=n.unmount)==null?void 0:f.call(n))||!0},R=async()=>{if(o.debug("do createCesiumObject"),bt(n.createCesiumObject))return n.createCesiumObject();{const f=k(e);return new Cesium[n.cesiumClass](f)}},D=(f,C)=>{let T=C==null?void 0:C.deep;const{SampledPositionProperty:_,Appearance:E,DebugAppearance:A,MaterialAppearance:L,PolylineColorAppearance:B,EllipsoidSurfaceAppearance:F,PerInstanceColorAppearance:q,PolylineMaterialAppearance:Z}=Cesium;if(f==="position")T=!(n.proxy[f]instanceof _);else if(f==="appearance"||f==="depthFailAppearance"){const H=n.proxy[f];T=!(H instanceof E||H instanceof A||H instanceof L||H instanceof B||H instanceof F||H instanceof q||H instanceof Z||Hs(H).indexOf("Appearance")!==-1)}return T},P=f=>{if(f){if(!n.cesiumClass||!Cesium[n.cesiumClass])return;e&&Object.keys(e).forEach(C=>{var T,_,E,A,L;let B=C;if(C==="labelStyle"||C==="wmtsStyle"?B="style":C==="bmKey"&&(B="key"),(_=(T=n.proxy)==null?void 0:T.$options.watch)!=null&&_[C]||n.alreadyListening.indexOf(C)!==-1)return;const F=(A=(E=n.proxy)==null?void 0:E.$options.props[C])==null?void 0:A.watcherOptions,q=(L=n.proxy)==null?void 0:L.$watch(C,async(Z,H)=>{await n.proxy.creatingPromise;const{cesiumObject:V}=n,j=V&&Object.getOwnPropertyDescriptor(V,B),G=V&&Object.getOwnPropertyDescriptor(Object.getPrototypeOf(V),B);if(j&&(j.writable||j.set)||G&&(G.writable||G.set)){if(F&&F.cesiumObjectBuilder){const J=F.cesiumObjectBuilder.call(n,Z,n.viewer.scene.globe.ellipsoid);Cesium.defined(V[B])&&Cesium.defined(V[B]._callback)||(V[B]=J)}else V[B]=N(B,Z);return!0}else(!ba(Z,H)||Array.isArray(Z))&&(i["reload-mode"]==="once"||i.reloadMode==="once"||v.value.reloadMode==="once"?(a(),s(()=>{n.proxy.reload()},0)):n.reloadingPromise=new Promise((J,U)=>{n.proxy.reload().then(()=>{J(!0)}).catch(z=>{U(z)})}))},{deep:D(C,F)});r.push(q)})}else r.forEach(C=>C()),r=[]},k=(f,C)=>{const T={};return f&&Object.keys(f).forEach(_=>{let E=_;_==="labelStyle"||_==="wmtsStyle"?E="style":_==="bmKey"&&(E="key"),!(f[_]===void 0||f[_]===null)&&(Hs(f[_])&&p[E]&&(n.cesiumClass==="Entity"||n.cesiumClass.indexOf("DataSource")>0||n.cesiumClass==="VcOverlayDynamic")?T[E]=k(f[_],C):T[E]=N(_,f[_],C))}),T},N=(f,C,T)=>{var _,E;if(Hs(C)&&p[f]&&(n.cesiumClass==="Entity"||n.cesiumClass.indexOf("DataSource")>0||n.cesiumClass==="VcOverlayDynamic"))return k(C,T);{const A=(_=n.proxy)==null?void 0:_.$options.name;let L=!1;bt(C)&&A&&j1.forEach(F=>{A.indexOf(F)!==-1&&(L=!0)});const B=((E=n.proxy)==null?void 0:E.$options.props[f])||(T==null?void 0:T[f])||qu[f]&&qu[f][f];return B!=null&&B.watcherOptions&&!Oo(C)?B.watcherOptions.cesiumObjectBuilder.call(n,C,n.viewer.scene.globe.ellipsoid):L?new Cesium.CallbackProperty(C,!1):C}},$=()=>On({},c||{}),m=new Promise((f,C)=>{try{let T=!1;c.viewer&&(T=!0,y().then(_=>{f(_),T=!1}).catch(_=>{t("unready",_),C(_)})),d.vcMitt.on("ready",()=>{!T&&!n.isUnmounted&&y().then(_=>{f(_)}).catch(_=>{t("unready",_),C(_)})})}catch(T){t("unready",T),C(T)}});return o.debug(`${n.cesiumClass}---onCreated`),nt(()=>{o.debug(`${n.cesiumClass}---onUnmounted`),n.unloadingPromise=new Promise((f,C)=>{M().then(()=>{o.debug(`${n.cesiumClass}---unloaded`),f(!0),n.isUnmounted=!0,n.unloadingPromise=void 0,l.all.clear()})}),n.alreadyListening=[]}),Object.assign(n.proxy,{creatingPromise:m,load:y,unload:M,reload:w,getCreatingPromise:()=>m,getCesiumObject:()=>n.cesiumObject}),{$services:c,load:y,unload:M,reload:w,creatingPromise:m,transformProp:N,transformProps:k,unwatchFns:r,setPropsWatcher:P,logger:o,getServices:$}}function Uo(e,t,i){i.cesiumEvents=["changedEvent","errorEvent","loadingEvent"],i.cesiumClass==="KmlDataSource"&&(i.cesiumEvents.push("refreshEvent"),i.cesiumEvents.push("unsupportedNodeEvent")),i.cesiumMembersEvents=[{name:"clock",events:["definitionChanged"]},{name:"clustering",events:["clusterEvent"]},{name:"entities",events:["collectionChanged"]}];const n=Ne(e,t,i);if(n===void 0)return;i.alreadyListening.push("entities");let o=[];o.push(de(()=>Ve(e.entities),(r,l)=>{if(!i.mounted)return;const c=i.cesiumObject;if(r.length===l.length){const u=[];for(let d=0;d<r.length;d++){const h=r[d],p=l[d];JSON.stringify(h)!==JSON.stringify(p)&&u.push({newOptions:h,oldOptions:p})}u.forEach(d=>{const h=c.entities.getById(d.oldOptions.id);if(d.oldOptions.id===d.newOptions.id)h&&Object.keys(d.newOptions).forEach(p=>{d.oldOptions[p]!==d.newOptions[p]&&(h[p]=n.transformProp(p,d.newOptions[p]))});else{c.entities.remove(h);const p=d.newOptions;s(c,[p])}})}else{const u=lt(r,l,"id"),d=lt(l,r,"id"),h=[];for(let p=0;p<d.length;p++){const v=c.entities.getById(d[p].id);h.push(v)}h.forEach(p=>{c.entities.remove(p)}),s(c,u)}},{deep:!0}));const s=(r,l)=>{for(let c=0;c<l.length;c++){const u=l[c],d=n.transformProps(u),h=r.entities.add(d);u.id!==h.id&&(u.id=h.id),Ai(h,d)}};i.mount=async()=>{const r=n.$services.dataSources,l=i.cesiumObject;return l.show=e.show,s(l,e.entities),r.add(l).then(()=>!0)},i.unmount=async()=>{const r=n.$services.dataSources,l=i.cesiumObject;return r&&r.remove(l,e.destroy)};const a=()=>On(n.getServices(),{get datasource(){return i.cesiumObject},get entities(){var r;return(r=i.cesiumObject)==null?void 0:r.entities}});return nt(()=>{o.forEach(r=>r()),o=[]}),en(Vi,a()),{transformProps:n.transformProps,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher}}function He(e,t,i){i.cesiumEvents=[],i.renderByParent=!0;const n=Ne(e,t,i);if(n!==void 0)return i.mount=async()=>{var o;const s=i.cesiumObject,a=Pt(i).proxy;return(o=a.__updateGeometry)==null?void 0:o.call(a,s)},{transformProps:n.transformProps,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher}}function Bt(e,t,i){i.cesiumEvents=["definitionChanged"],Ne(e,t,i)!==void 0&&(i.mount=async()=>{var n,o;const s=i.cesiumObject;if(s===void 0)return!1;const a=se(((n=i.proxy)==null?void 0:n.$options.name)||"").split("-"),r=a.length===3?`update:${a[2]}`:"update:polylineVolume",l=Pt(i).proxy;return l&&((o=l.__updateGraphics)==null?void 0:o.call(l,s,r))},i.unmount=async()=>{var n,o;const s=se(((n=i.proxy)==null?void 0:n.$options.name)||"").split("-"),a=s.length===3?`update:${s[2]}`:"update:polylineVolume",r=Pt(i).proxy;return r&&((o=r.__updateGraphics)==null?void 0:o.call(r,void 0,a))})}const Ya=e=>Gb(e);function Jr(e,t){const i=e.style;Object.keys(t).forEach(n=>{i[n]=t[n]})}function Ku(e){if(e==null)return;if(typeof e=="string")try{return document.querySelector(e)||void 0}catch(i){return}const t=qc(e)===!0?e.value:e;if(t)return t.$el||t}const hn={hasPassive:!1,passiveCapture:!0,notPassiveCapture:!0,passive:void 0};try{const e=Object.defineProperty({},"passive",{get(){Object.assign(hn,{hasPassive:!0,passive:{passive:!0},notPassive:{passive:!1},passiveCapture:{passive:!0,capture:!0},notPassiveCapture:{passive:!1,capture:!0}})}});window.addEventListener("qtest",null,e),window.removeEventListener("qtest",null,e)}catch(e){}function Xr(){}function Yr(e){return e.button===0}function Hi(e){return e.touches&&e.touches[0]?e=e.touches[0]:e.changedTouches&&e.changedTouches[0]?e=e.changedTouches[0]:e.targetTouches&&e.targetTouches[0]&&(e=e.targetTouches[0]),{top:e.clientY,left:e.clientX}}function Ho(e){e.stopPropagation()}function Rn(e){e.cancelable!==!1&&e.preventDefault()}function Wi(e){e.cancelable!==!1&&e.preventDefault(),e.stopPropagation()}function Kr(e,t){if(e===void 0||t===!0&&e.__dragPrevented===!0)return;const i=t===!0?n=>{n.__dragPrevented=!0,n.addEventListener("dragstart",Rn,hn.notPassiveCapture)}:n=>{delete n.__dragPrevented,n.removeEventListener("dragstart",Rn,hn.notPassiveCapture)};e.querySelectorAll("a, img").forEach(i)}function Tt(e,t,i){const n=`__vc_${t}_evt`;e[n]=e[n]!==void 0?e[n].concat(i):i,i.forEach(o=>{o[0].addEventListener(o[1],e[o[2]],hn[o[3]])})}function hi(e,t){const i=`__vc_${t}_evt`;e[i]!==void 0&&(e[i].forEach(n=>{n[0].removeEventListener(n[1],e[n[2]],hn[n[3]])}),e[i]=void 0)}function F1(e){return e!==Object(e)||e.isComposing===!0||e.qKeyEvent===!0}function Wo(e,t){return F1(e)===!0?!1:[].concat(t).includes(e.keyCode)}function el(e,t=250){let i=!1,n;return function(){return i===!1&&(i=!0,setTimeout(()=>{i=!1},t),n=e.apply(this,arguments)),n}}function ed(e,t,i,n){i.modifiers.stop===!0&&Ho(e);const o=i.modifiers.color;let s=i.modifiers.center;s=s===!0||n===!0;const a=document.createElement("span"),r=document.createElement("span"),l=Hi(e),{left:c,top:u,width:d,height:h}=t.getBoundingClientRect(),p=Math.sqrt(d*d+h*h),v=p/2,b=`${(d-p)/2}px`,y=s?b:`${l.left-c-v}px`,x=`${(h-p)/2}px`,M=s?x:`${l.top-u-v}px`;r.className="vc-ripple__inner",Jr(r,{height:`${p}px`,width:`${p}px`,transform:`translate3d(${y},${M},0) scale3d(.2,.2,1)`,opacity:0}),a.className=`vc-ripple${o?" text-"+o:""}`,a.setAttribute("dir","ltr"),a.appendChild(r),t.appendChild(a);const g=()=>{a.remove(),clearTimeout(w)};i.abort.push(g);let w=setTimeout(()=>{r.classList.add("vc-ripple__inner--enter"),r.style.transform=`translate3d(${b},${x},0) scale3d(1,1,1)`,r.style.opacity="0.2",w=setTimeout(()=>{r.classList.remove("vc-ripple__inner--enter"),r.classList.add("vc-ripple__inner--leave"),r.style.opacity="0",w=setTimeout(()=>{a.remove(),i.abort.splice(i.abort.indexOf(g),1)},275)},250)},50)}function td(e,{modifiers:t,value:i,arg:n,instance:o}){const s=Object.assign({},t,i);e.modifiers={early:s.early===!0,stop:s.stop===!0,center:s.center===!0,color:s.color||n,keyCodes:[].concat(s.keyCodes||13)}}var id=Ya({name:"ripple",beforeMount(e,t){const i={enabled:t.value!==!1,modifiers:{},abort:[],start(n){i.enabled===!0&&n.qSkipRipple!==!0&&(i.modifiers.early===!0?["mousedown","touchstart"].includes(n.type)===!0:n.type==="click")&&ed(n,e,i,n.qKeyEvent===!0)},keystart:el(n=>{i.enabled===!0&&n.qSkipRipple!==!0&&Wo(n,i.modifiers.keyCodes)===!0&&n.type===`key${i.modifiers.early===!0?"down":"up"}`&&ed(n,e,i,!0)},300)};td(i,t),e.__vcripple=i,Tt(i,"main",[[e,"mousedown","start","passive"],[e,"touchstart","start","passive"],[e,"click","start","passive"],[e,"keydown","keystart","passive"],[e,"keyup","keystart","passive"]])},updated(e,t){if(t.oldValue!==t.value){const i=e.__vcripple;i.enabled=t.value!==!1,i.enabled===!0&&Object(t.value)===t.value&&td(i,t)}},beforeUnmount(e){const t=e.__vcripple;t.abort.forEach(i=>{i()}),hi(t,"main"),delete e._vcripple}});function ct(){const e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),i=/(?:SymbianOS)/.test(e)||t,n=/(?:Android)/.test(e),o=/(?:Firefox)/.test(e),s=/(?:Chrome|CriOS)/.test(e),a=/(?:iPad|PlayBook)/.test(e)||n&&!/(?:Mobile)/.test(e)||o&&/(?:Tablet)/.test(e),r=/(?:iPhone)/.test(e)&&!a,l=!r&&!n&&!i,c=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return{isTablet:a,isPhone:r,isAndroid:n,isPc:l,isFireFox:o,isChrome:s,isIOS:c,hasTouch:"ontouchstart"in window||window.navigator.maxTouchPoints>0}}function qi(){if(window.getSelection!==void 0){const e=window.getSelection();(e==null?void 0:e.empty)!==void 0?e.empty():(e==null?void 0:e.removeAllRanges)!==void 0&&(e.removeAllRanges(),ct().isPhone!==!0&&e.addRange(document.createRange()))}else document.selection!==void 0&&document.selection.empty()}var Ka=Ya({name:"touch-hold",beforeMount(e,t){const{modifiers:i}=t;if(i.mouse!==!0&&ct().hasTouch!==!0)return;const n={handler:t.value,noop:Xr,mouseStart(s){typeof n.handler=="function"&&Yr(s)===!0&&(Tt(n,"temp",[[document,"mousemove","move","passiveCapture"],[document,"click","end","notPassiveCapture"]]),n.start(s,!0))},touchStart(s){var a;if(s.target!==void 0&&typeof n.handler=="function"){const r=s.target;Tt(n,"temp",[[r,"touchmove","move","passiveCapture"],[r,"touchcancel","end","notPassiveCapture"],[r,"touchend","end","notPassiveCapture"]]),n.start(s),(a=t==null?void 0:t.touchStart)==null||a.call(t,s)}},start(s,a){n.origin=Hi(s);const r=Date.now();ct().isPhone===!0&&(document.body.classList.add("non-selectable"),qi(),n.styleCleanup=l=>{n.styleCleanup=void 0;const c=()=>{document.body.classList.remove("non-selectable")};l===!0?(qi(),setTimeout(c,10)):c()}),n.triggered=!1,n.sensitivity=a===!0?n.mouseSensitivity:n.touchSensitivity,n.timer=setTimeout(()=>{qi(),n.triggered=!0,n.handler({evt:s,touch:a!==!0,mouse:a===!0,position:n.origin,duration:Date.now()-r})},n.duration)},move(s){const{top:a,left:r}=Hi(s);(Math.abs(r-n.origin.left)>=n.sensitivity||Math.abs(a-n.origin.top)>=n.sensitivity)&&clearTimeout(n.timer)},end(s){var a;hi(n,"temp"),n.styleCleanup!==void 0&&n.styleCleanup(n.triggered),n.triggered===!0?s!==void 0&&Wi(s):clearTimeout(n.timer),(a=t==null?void 0:t.touchEnd)==null||a.call(t,s)}},o=[600,5,7];typeof t.arg=="string"&&t.arg.length>0&&t.arg.split(":").forEach((s,a)=>{const r=parseInt(s,10);r&&(o[a]=r)}),[n.duration,n.touchSensitivity,n.mouseSensitivity]=o,e.__vctouchhold=n,i.mouse===!0&&Tt(n,"main",[[e,"mousedown","mouseStart",`passive${i.mouseCapture===!0?"Capture":""}`]]),ct().hasTouch===!0&&Tt(n,"main",[[e,"touchstart","touchStart",`passive${i.capture===!0?"Capture":""}`],[e,"touchend","noop","notPassiveCapture"]])},updated(e,t){const i=e.__vctouchhold;i!==void 0&&t.oldValue!==t.value&&(typeof t.value!="function"&&i.end(),i.handler=t.value)},beforeUnmount(e){const t=e.__vctouchhold;t!==void 0&&(hi(t,"main"),hi(t,"temp"),clearTimeout(t.timer),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__vctouchhold)}});const nd={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},k1=new RegExp(`^([\\d+]+|${Object.keys(nd).join("|")})$`,"i");function R1(e,t){const{top:i,left:n}=Hi(e);return Math.abs(n-t.left)>=7||Math.abs(i-t.top)>=7}var $1=Ya({name:"touch-repeat",beforeMount(e,{modifiers:t,value:i,arg:n,touchStart:o}){const s=Object.keys(t).reduce((c,u)=>{if(k1.test(u)===!0){const d=isNaN(parseInt(u,10))?nd[u.toLowerCase()]:parseInt(u,10);d>=0&&c.push(d)}return c},[]);if(t.mouse!==!0&&ct().hasTouch!==!0&&s.length===0)return;const a=typeof n=="string"&&n.length>0?n.split(":").map(c=>parseInt(c,10)):[0,600,300],r=a.length-1,l={keyboard:s,handler:i,noop:Xr,mouseStart(c){l.event===void 0&&typeof l.handler=="function"&&Yr(c)===!0&&(Tt(l,"temp",[[document,"mousemove","move","passiveCapture"],[document,"click","end","notPassiveCapture"]]),l.start(c,!0))},keyboardStart(c){if(typeof l.handler=="function"&&Wo(c,s)===!0){if((a[0]===0||l.event!==void 0)&&(Wi(c),e.focus(),l.event!==void 0))return;Tt(l,"temp",[[document,"keyup","end","notPassiveCapture"],[document,"click","end","notPassiveCapture"]]),l.start(c,!1,!0)}},touchStart(c){if(c.target!==void 0&&typeof l.handler=="function"){const u=c.target;Tt(l,"temp",[[u,"touchmove","move","passiveCapture"],[u,"touchcancel","end","notPassiveCapture"],[u,"touchend","end","notPassiveCapture"]]),l.start(c),o==null||o(c)}},start(c,u,d){d!==!0&&(l.origin=Hi(c));function h(v){l.styleCleanup=void 0,document.documentElement.style.cursor="";const b=()=>{document.body.classList.remove("non-selectable")};v===!0?(qi(),setTimeout(b,10)):b()}ct().isPhone===!0&&(document.body.classList.add("non-selectable"),qi(),l.styleCleanup=h),l.event={touch:u!==!0&&d!==!0,mouse:u===!0,keyboard:d===!0,startTime:Date.now(),repeatCount:0};const p=()=>{if(l.event===void 0)return;l.event.repeatCount===0&&(l.event.evt=c,d===!0?l.event.keyCode=c.keyCode:l.event.position=Hi(c),ct().isPhone!==!0&&(document.documentElement.style.cursor="pointer",document.body.classList.add("non-selectable"),qi(),l.styleCleanup=h)),l.event.duration=Date.now()-l.event.startTime,l.event.repeatCount+=1,l.handler(l.event);const v=r<l.event.repeatCount?r:l.event.repeatCount;l.timer=setTimeout(p,a[v])};a[0]===0?p():l.timer=setTimeout(p,a[0])},move(c){l.event!==void 0&&R1(c,l.origin)===!0&&clearTimeout(l.timer)},end(c){l.event!==void 0&&(l.styleCleanup!==void 0&&l.styleCleanup(!0),c!==void 0&&l.event.repeatCount>0&&Wi(c),hi(l,"temp"),clearTimeout(l.timer),l.event=void 0)}};e.__vctouchrepeat=l,t.mouse===!0&&Tt(l,"main",[[e,"mousedown","mouseStart",`passive${t.mouseCapture===!0?"Capture":""}`]]),ct().hasTouch===!0&&Tt(l,"main",[[e,"touchstart","touchStart",`passive${t.capture===!0?"Capture":""}`],[e,"touchend","noop","notPassiveCapture"]]),s.length>0&&Tt(l,"main",[[e,"keydown","keyboardStart",`notPassive${t.keyCapture===!0?"Capture":""}`]])},updated(e,{oldValue:t,value:i}){const n=e.__vctouchrepeat;n!==void 0&&t!==i&&(typeof i!="function"&&n.end(),n.handler=i)},beforeUnmount(e){const t=e.__vctouchrepeat;t!==void 0&&(clearTimeout(t.timer),hi(t,"main"),hi(t,"temp"),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__vctouchrepeat)}});const N1=["left","right","up","down","horizontal","vertical"],V1={left:!0,right:!0,up:!0,down:!0,horizontal:!0,vertical:!0,all:!0};function od(e){const t={};return N1.forEach(i=>{e[i]&&(t[i]=!0)}),Object.keys(t).length===0?V1:(t.horizontal===!0&&(t.left=t.right=!0),t.vertical===!0&&(t.up=t.down=!0),t.left===!0&&t.right===!0&&(t.horizontal=!0),t.up===!0&&t.down===!0&&(t.vertical=!0),t.horizontal===!0&&t.vertical===!0&&(t.all=!0),t)}const tl=ct().isIOS||navigator.vendor.toLowerCase().indexOf("apple")>-1?()=>document:e=>e;function ad(e,t){return t.event===void 0&&e.target!==void 0&&e.target.draggable!==!0&&typeof t.handler=="function"&&e.target.nodeName.toUpperCase()!=="INPUT"&&(e.qClonedBy===void 0||e.qClonedBy.indexOf(t.uid)===-1)}function il(e,t,i){const n=Hi(e);let o,s=n.left-t.event.x,a=n.top-t.event.y,r=Math.abs(s),l=Math.abs(a);const c=t.direction;c.horizontal===!0&&c.vertical!==!0?o=s<0?"left":"right":c.horizontal!==!0&&c.vertical===!0?o=a<0?"up":"down":c.up===!0&&a<0?(o="up",r>l&&(c.left===!0&&s<0?o="left":c.right===!0&&s>0&&(o="right"))):c.down===!0&&a>0?(o="down",r>l&&(c.left===!0&&s<0?o="left":c.right===!0&&s>0&&(o="right"))):c.left===!0&&s<0?(o="left",r<l&&(c.up===!0&&a<0?o="up":c.down===!0&&a>0&&(o="down"))):c.right===!0&&s>0&&(o="right",r<l&&(c.up===!0&&a<0?o="up":c.down===!0&&a>0&&(o="down")));let u=!1;if(o===void 0&&i===!1){if(t.event.isFirst===!0||t.event.lastDir===void 0)return{};o=t.event.lastDir,u=!0,o==="left"||o==="right"?(n.left-=s,r=0,s=0):(n.top-=a,l=0,a=0)}return{synthetic:u,payload:{evt:e,touch:t.event.mouse!==!0,mouse:t.event.mouse===!0,position:n,direction:o,isFirst:t.event.isFirst,isFinal:i===!0,duration:Date.now()-t.event.time,distance:{x:r,y:l},offset:{x:s,y:a},delta:{x:n.left-t.event.lastX,y:n.top-t.event.lastY}}}}let z1=0;var sd=Ya({name:"touch-pan",beforeMount(e,{value:t,modifiers:i}){if(i.mouse!==!0&&ct().hasTouch!==!0)return;function n(s,a){i.mouse===!0&&a===!0?Wi(s):(i.stop===!0&&Ho(s),i.prevent===!0&&Rn(s))}const o={uid:"qvtp_"+z1++,handler:t,modifiers:i,direction:od(i),noop:Xr,mouseStart(s){ad(s,o)&&Yr(s)&&(Tt(o,"temp",[[document,"mousemove","move","notPassiveCapture"],[document,"mouseup","end","passiveCapture"]]),o.start(s,!0))},touchStart(s){if(ad(s,o)){const a=s.target;Tt(o,"temp",[[a,"touchmove","move","notPassiveCapture"],[a,"touchcancel","end","passiveCapture"],[a,"touchend","end","passiveCapture"]]),o.start(s)}},start(s,a){if(ct().isFireFox===!0&&Kr(e,!0),o.lastEvt=s,a===!0||i.stop===!0){if(o.direction.all!==!0&&(a!==!0||o.modifiers.mouseAllDir!==!0&&o.modifiers.mousealldir!==!0)){const c=s.type.indexOf("mouse")>-1?new MouseEvent(s.type,s):new TouchEvent(s.type,s);s.defaultPrevented===!0&&Rn(c),s.cancelBubble===!0&&Ho(c),Object.assign(c,{qKeyEvent:s.qKeyEvent,qClickOutside:s.qClickOutside,qAnchorHandled:s.qAnchorHandled,qClonedBy:s.qClonedBy===void 0?[o.uid]:s.qClonedBy.concat(o.uid)}),o.initialEvent={target:s.target,event:c}}Ho(s)}const{left:r,top:l}=Hi(s);o.event={x:r,y:l,time:Date.now(),mouse:a===!0,detected:!1,isFirst:!0,isFinal:!1,lastX:r,lastY:l}},move(s){if(o.event===void 0)return;const a=Hi(s),r=a.left-o.event.x,l=a.top-o.event.y;if(r===0&&l===0)return;o.lastEvt=s;const c=o.event.mouse===!0,u=()=>{n(s,c);let p;i.preserveCursor!==!0&&i.preservecursor!==!0&&(p=document.documentElement.style.cursor||"",document.documentElement.style.cursor="grabbing"),c===!0&&document.body.classList.add("no-pointer-events--children"),document.body.classList.add("non-selectable"),qi(),o.styleCleanup=v=>{if(o.styleCleanup=void 0,p!==void 0&&(document.documentElement.style.cursor=p),document.body.classList.remove("non-selectable"),c===!0){const b=()=>{document.body.classList.remove("no-pointer-events--children")};v!==void 0?setTimeout(()=>{b(),v()},50):b()}else v!==void 0&&v()}};if(o.event.detected===!0){o.event.isFirst!==!0&&n(s,o.event.mouse);const{payload:p,synthetic:v}=il(s,o,!1);p!==void 0&&(o.handler(p)===!1?o.end(s):(o.styleCleanup===void 0&&o.event.isFirst===!0&&u(),o.event.lastX=p.position.left,o.event.lastY=p.position.top,o.event.lastDir=v===!0?void 0:p.direction,o.event.isFirst=!1));return}if(o.direction.all===!0||c===!0&&(o.modifiers.mouseAllDir===!0||o.modifiers.mousealldir===!0)){u(),o.event.detected=!0,o.move(s);return}const d=Math.abs(r),h=Math.abs(l);d!==h&&(o.direction.horizontal===!0&&d>h||o.direction.vertical===!0&&d<h||o.direction.up===!0&&d<h&&l<0||o.direction.down===!0&&d<h&&l>0||o.direction.left===!0&&d>h&&r<0||o.direction.right===!0&&d>h&&r>0?(o.event.detected=!0,o.move(s)):o.end(s,!0))},end(s,a){if(o.event!==void 0){if(hi(o,"temp"),ct().isFireFox===!0&&Kr(e,!1),a===!0)o.styleCleanup!==void 0&&o.styleCleanup(),o.event.detected!==!0&&o.initialEvent!==void 0&&o.initialEvent.target.dispatchEvent(o.initialEvent.event);else if(o.event.detected===!0){o.event.isFirst===!0&&o.handler(il(s===void 0?o.lastEvt:s,o).payload);const{payload:r}=il(s===void 0?o.lastEvt:s,o,!0),l=()=>{o.handler(r)};o.styleCleanup!==void 0?o.styleCleanup(l):l()}o.event=void 0,o.initialEvent=void 0,o.lastEvt=void 0}}};if(e.__qtouchpan=o,i.mouse===!0){const s=i.mouseCapture===!0||i.mousecapture===!0?"Capture":"";Tt(o,"main",[[e,"mousedown","mouseStart",`passive${s}`]])}ct().hasTouch===!0&&Tt(o,"main",[[e,"touchstart","touchStart",`passive${i.capture===!0?"Capture":""}`],[e,"touchmove","noop","notPassiveCapture"]])},updated(e,t){const i=e.__qtouchpan;i!==void 0&&(t.oldValue!==t.value&&(typeof t.value!="function"&&i.end(),i.handler=t.value),i.direction=od(t.modifiers))},beforeUnmount(e){const t=e.__qtouchpan;t!==void 0&&(t.event!==void 0&&t.end(),hi(t,"main"),hi(t,"temp"),ct().isFireFox===!0&&Kr(e,!1),t.styleCleanup!==void 0&&t.styleCleanup(),delete e.__qtouchpan)}});function qo(){let e,t;const i=new Promise(function(n,o){e=n,t=o});return{resolve:e,reject:t,promise:i}}function rd(e,{handleMouseClick:t=void 0,handleMouseDown:i=void 0,handleMouseUp:n=void 0,handleMouseMove:o=void 0,handleDoubleClick:s=void 0,handleMouseWheel:a=void 0,handlePinch:r=void 0}){const l=ee(void 0),c=ee(!1),u=()=>{if(c.value)return;const{ScreenSpaceEventType:W,KeyboardEventModifier:le,ScreenSpaceEventHandler:_e}=Cesium;if(!l.value){const{viewer:Xe}=e;l.value=new _e(Xe.canvas),Ka.beforeMount(Xe.canvas,{arg:"2000",value:ge,touchStart:Se,touchEnd:ve,modifiers:{}})}const ue=l.value;ue.setInputAction(p,W.LEFT_CLICK),ue.setInputAction(v,W.LEFT_CLICK,le.SHIFT),ue.setInputAction(b,W.LEFT_CLICK,le.CTRL),ue.setInputAction(R,W.LEFT_DOWN),ue.setInputAction(D,W.LEFT_DOWN,le.SHIFT),ue.setInputAction(P,W.LEFT_DOWN,le.CTRL),ue.setInputAction(T,W.LEFT_UP),ue.setInputAction(_,W.LEFT_UP,le.SHIFT),ue.setInputAction(E,W.LEFT_UP,le.CTRL),ue.setInputAction(w,W.RIGHT_CLICK),ue.setInputAction(O,W.RIGHT_CLICK,le.SHIFT),ue.setInputAction(I,W.RIGHT_CLICK,le.CTRL),ue.setInputAction(m,W.RIGHT_DOWN),ue.setInputAction(f,W.RIGHT_DOWN,le.SHIFT),ue.setInputAction(C,W.RIGHT_DOWN,le.CTRL),ue.setInputAction(F,W.RIGHT_UP),ue.setInputAction(q,W.RIGHT_UP,le.SHIFT),ue.setInputAction(Z,W.RIGHT_UP,le.CTRL),ue.setInputAction(y,W.MIDDLE_CLICK),ue.setInputAction(x,W.MIDDLE_CLICK,le.SHIFT),ue.setInputAction(M,W.MIDDLE_CLICK,le.CTRL),ue.setInputAction(k,W.MIDDLE_DOWN),ue.setInputAction(N,W.MIDDLE_DOWN,le.SHIFT),ue.setInputAction($,W.MIDDLE_DOWN,le.CTRL),ue.setInputAction(A,W.MIDDLE_UP),ue.setInputAction(L,W.MIDDLE_UP,le.SHIFT),ue.setInputAction(B,W.MIDDLE_UP,le.CTRL),ue.setInputAction(H,W.LEFT_DOUBLE_CLICK),ue.setInputAction(V,W.LEFT_DOUBLE_CLICK,le.SHIFT),ue.setInputAction(j,W.LEFT_DOUBLE_CLICK,le.CTRL),ue.setInputAction(G,W.MOUSE_MOVE),ue.setInputAction(J,W.MOUSE_MOVE,le.SHIFT),ue.setInputAction(U,W.MOUSE_MOVE,le.CTRL),ue.setInputAction(z,W.WHEEL),ue.setInputAction(Y,W.WHEEL,le.SHIFT),ue.setInputAction(Q,W.WHEEL,le.CTRL),ue.setInputAction(te,W.PINCH_START),ue.setInputAction(X,W.PINCH_START,le.SHIFT),ue.setInputAction(ne,W.PINCH_START,le.CTRL),ue.setInputAction(re,W.PINCH_END),ue.setInputAction(pe,W.PINCH_END,le.SHIFT),ue.setInputAction(be,W.PINCH_END,le.CTRL),ue.setInputAction(he,W.PINCH_MOVE),ue.setInputAction(ye,W.PINCH_MOVE,le.SHIFT),ue.setInputAction(we,W.PINCH_MOVE,le.CTRL),c.value=!0},d=()=>{if(!c.value)return;const{ScreenSpaceEventType:W,KeyboardEventModifier:le}=Cesium,_e=l.value;if(!_e)return;_e.removeInputAction(W.LEFT_CLICK),_e.removeInputAction(W.LEFT_CLICK,le.SHIFT),_e.removeInputAction(W.LEFT_CLICK,le.CTRL),_e.removeInputAction(W.LEFT_DOWN),_e.removeInputAction(W.LEFT_DOWN,le.SHIFT),_e.removeInputAction(W.LEFT_DOWN,le.CTRL),_e.removeInputAction(W.LEFT_UP),_e.removeInputAction(W.LEFT_UP,le.SHIFT),_e.removeInputAction(W.LEFT_UP,le.CTRL),_e.removeInputAction(W.RIGHT_CLICK),_e.removeInputAction(W.RIGHT_CLICK,le.SHIFT),_e.removeInputAction(W.RIGHT_CLICK,le.CTRL),_e.removeInputAction(W.RIGHT_DOWN),_e.removeInputAction(W.RIGHT_DOWN,le.SHIFT),_e.removeInputAction(W.RIGHT_DOWN,le.CTRL),_e.removeInputAction(W.RIGHT_UP),_e.removeInputAction(W.RIGHT_UP,le.SHIFT),_e.removeInputAction(W.RIGHT_UP,le.CTRL),_e.removeInputAction(W.MIDDLE_CLICK),_e.removeInputAction(W.MIDDLE_CLICK,le.SHIFT),_e.removeInputAction(W.MIDDLE_CLICK,le.CTRL),_e.removeInputAction(W.MIDDLE_DOWN),_e.removeInputAction(W.MIDDLE_DOWN,le.SHIFT),_e.removeInputAction(W.MIDDLE_DOWN,le.CTRL),_e.removeInputAction(W.MIDDLE_UP),_e.removeInputAction(W.MIDDLE_UP,le.SHIFT),_e.removeInputAction(W.MIDDLE_UP,le.CTRL),_e.removeInputAction(W.LEFT_DOUBLE_CLICK),_e.removeInputAction(W.LEFT_DOUBLE_CLICK,le.SHIFT),_e.removeInputAction(W.LEFT_DOUBLE_CLICK,le.CTRL),_e.removeInputAction(W.MOUSE_MOVE),_e.removeInputAction(W.MOUSE_MOVE,le.SHIFT),_e.removeInputAction(W.MOUSE_MOVE,le.CTRL),_e.removeInputAction(W.WHEEL),_e.removeInputAction(W.WHEEL,le.SHIFT),_e.removeInputAction(W.WHEEL,le.CTRL),_e.removeInputAction(W.PINCH_START),_e.removeInputAction(W.PINCH_START,le.SHIFT),_e.removeInputAction(W.PINCH_START,le.CTRL),_e.removeInputAction(W.PINCH_END),_e.removeInputAction(W.PINCH_END,le.SHIFT),_e.removeInputAction(W.PINCH_END,le.CTRL),_e.removeInputAction(W.PINCH_MOVE),_e.removeInputAction(W.PINCH_MOVE,le.SHIFT),_e.removeInputAction(W.PINCH_MOVE,le.CTRL);const{viewer:ue}=e;Ka.beforeUnmount(ue.canvas),c.value=!1},h=()=>{var W;(W=l.value)==null||W.destroy(),l.value=void 0},p=W=>{t==null||t(W,{button:0})},v=W=>{t==null||t(W,{button:0,shift:!0})},b=W=>{t==null||t(W,{button:0,ctrl:!0})},y=W=>{t==null||t(W,{button:1})},x=W=>{t==null||t(W,{button:1,shift:!0})},M=W=>{t==null||t(W,{button:1,ctrl:!0})};let g;const w=W=>{var le;g?(le=g==null?void 0:g.promise)==null||le.then(_e=>{_e&&(t==null||t(W,{button:2}))}):t==null||t(W,{button:2})},O=W=>{t==null||t(W,{button:2,shift:!0})},I=W=>{t==null||t(W,{button:2,ctrl:!0})},R=W=>{i==null||i(W,{button:0})},D=W=>{i==null||i(W,{button:0,shift:!0})},P=W=>{i==null||i(W,{button:0,ctrl:!0})},k=W=>{i==null||i(W,{button:1})},N=W=>{i==null||i(W,{button:1,shift:!0})},$=W=>{i==null||i(W,{button:1,ctrl:!0})},m=W=>{i==null||i(W,{button:2})},f=W=>{i==null||i(W,{button:2,shift:!0})},C=W=>{i==null||i(W,{button:2,ctrl:!0})},T=W=>{n==null||n(W,{button:0})},_=W=>{n==null||n(W,{button:0,shift:!0})},E=W=>{n==null||n(W,{button:0,ctrl:!0})},A=W=>{n==null||n(W,{button:1,ctrl:!0})},L=W=>{n==null||n(W,{button:1,shift:!0})},B=W=>{n==null||n(W,{button:1,ctrl:!0})},F=W=>{n==null||n(W,{button:2})},q=W=>{n==null||n(W,{button:2,shift:!0})},Z=W=>{n==null||n(W,{button:2,ctrl:!0})},H=W=>{s==null||s(W,{button:0})},V=W=>{s==null||s(W,{button:0,shift:!0})},j=W=>{s==null||s(W,{button:0,ctrl:!0})},G=W=>{o==null||o(W)},J=W=>{o==null||o(W,{shift:!0})},U=W=>{o==null||o(W,{ctrl:!0})},z=W=>{a==null||a(W)},Y=W=>{a==null||a(W,{shift:!0})},Q=W=>{a==null||a(W,{ctrl:!0})},te=W=>{r==null||r(W,{start:!0})},X=W=>{r==null||r(W,{start:!0,shift:!0})},ne=W=>{r==null||r(W,{start:!0,ctrl:!0})},re=W=>{r==null||r(W,{end:!0})},pe=W=>{r==null||r(W,{end:!0,shift:!0})},be=W=>{r==null||r(W,{end:!0,ctrl:!0})},he=W=>{r==null||r(W,{move:!0})},ye=W=>{r==null||r(W,{move:!0,shift:!0})},we=W=>{r==null||r(W,{move:!0,ctrl:!0})},ge=W=>{if(W.touch){const le={position:{x:W.position.left,y:W.position.top}};s==null||s(le,{button:0})}g.resolve(!1)},ve=W=>{g.resolve(!0)},Se=W=>{g=qo()};return{activate:u,deactivate:d,destroy:h,isActive:c}}function $n(e,t,i){const n=Ne(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{const o=n.transformProps(e),s=n.$services.primitives;return s&&s.add(o)},i.mount=async()=>{const o=n.$services.primitives,s=i.cesiumObject;return o&&o.contains(s)},i.unmount=async()=>{const o=n.$services.primitives,s=i.cesiumObject;return o&&!o.isDestroyed()&&o.remove(s)},{transformProps:n.transformProps,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher,$services:n.$services}}function Nn(e,t,i){i.cesiumEvents=["primitiveAdded","primitiveRemoved"];const n=Ne(e,t,i);return n===void 0?void 0:(i.mount=async()=>{const o=n.$services.primitives,s=i.cesiumObject,a=o&&o.add(s);return Cesium.defined(a)},i.unmount=async()=>{const o=n.$services.primitives,s=i.cesiumObject;return o&&o.remove(s)},en(Vi,(()=>On(n.getServices(),{get primitives(){return i.cesiumObject}}))()),{transformProps:n.transformProps,transformProp:n.transformProp,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher})}function mi(e,t,i){const n=Ne(e,t,i);if(n===void 0)return;const{emit:o}=t,s=ee(0),a=ee([]);i.createCesiumObject=async()=>{var c,u;const d=n.transformProps(e);if(d.asynchronous||await((u=(c=Cesium[i.cesiumClass]).initializeTerrainHeights)==null?void 0:u.call(c)),e.geometryInstances&&(et(e.geometryInstances)?(a.value.push(...e.geometryInstances),s.value+=e.geometryInstances.length):(s.value+=1,a.value.push(e.geometryInstances))),(i.cesiumClass==="Cesium3DTileset"||i.cesiumClass==="I3SDataProvider")&&nn(Cesium.VERSION,"1.104"))try{return Cesium.defined(e.assetId)&&i.cesiumClass==="Cesium3DTileset"?await Cesium[i.cesiumClass].fromIonAssetId(e.assetId,d):await Cesium[i.cesiumClass].fromUrl(e.url,d)}catch(h){n.logger.error(`Failed to load tileset: ${h}`)}else return new Cesium[i.cesiumClass](d)},i.mount=async()=>{var c;const u=n.$services.primitives,d=i.cesiumObject;(c=d==null?void 0:d.readyPromise)==null||c.then(p=>{Pe(i,"readyPromise")&&o("readyPromise",p,n.$services.viewer,i.proxy)}),d._vcParent=u;const h=u&&u.add(d);if(i.cesiumClass==="ParticleSystem"){const p=setInterval(()=>{Cesium.defined(h._billboardCollection)&&(h._billboardCollection._vcParent=h,clearInterval(p))},500)}return Cesium.defined(h)},i.unmount=async()=>{s.value=0,a.value=[];const c=n.$services.primitives,u=i.cesiumObject;return c&&c.remove(u)};const r=(c,u)=>{if(a.value.push(c),u===s.value-1)if(Pe(i,"update:geometryInstances"))t.emit("update:geometryInstances",a.value);else{const d=i.cesiumObject;d.geometryInstances=u===0?c:a.value}return!0},l=c=>{const u=a.value.indexOf(c);return a.value.splice(u,1),!0};return en(Vi,(()=>On(n.getServices(),{get primitive(){return i.cesiumObject}}))()),Object.assign(i.proxy,{__updateGeometryInstances:r,__removeGeometryInstances:l,__childCount:s}),{transformProps:n.transformProps,transformProp:n.transformProp,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher,$services:n.$services}}const es=52.35987755982988,Lt=3.141592653589793,ts=6378245,is=.006693421622965943,nl=function(i,n){var i=+i,n=+n;const o=i-.0065,s=n-.006,a=Math.sqrt(o*o+s*s)-2e-5*Math.sin(s*es),r=Math.atan2(s,o)-3e-6*Math.cos(o*es),l=a*Math.cos(r),c=a*Math.sin(r);return[l,c]},ol=function(n,i){var i=+i,n=+n;const o=Math.sqrt(n*n+i*i)+2e-5*Math.sin(i*es),s=Math.atan2(i,n)+3e-6*Math.cos(n*es),a=o*Math.cos(s)+.0065,r=o*Math.sin(s)+.006;return[a,r]},ld=function(n,i){var i=+i,n=+n;if(dd(n,i))return[n,i];{let o=cd(n-105,i-35),s=ud(n-105,i-35);const a=i/180*Lt;let r=Math.sin(a);r=1-is*r*r;const l=Math.sqrt(r);o=o*180/(ts*(1-is)/(r*l)*Lt),s=s*180/(ts/l*Math.cos(a)*Lt);const c=i+o;return[n+s,c]}},al=function(n,i){var i=+i,n=+n;if(dd(n,i))return[n,i];{let o=cd(n-105,i-35),s=ud(n-105,i-35);const a=i/180*Lt;let r=Math.sin(a);r=1-is*r*r;const l=Math.sqrt(r);o=o*180/(ts*(1-is)/(r*l)*Lt),s=s*180/(ts/l*Math.cos(a)*Lt);const c=i+o,u=n+s;return[n*2-u,i*2-c]}};var cd=function(n,i){var i=+i,n=+n;let o=-100+2*n+3*i+.2*i*i+.1*n*i+.2*Math.sqrt(Math.abs(n));return o+=(20*Math.sin(6*n*Lt)+20*Math.sin(2*n*Lt))*2/3,o+=(20*Math.sin(i*Lt)+40*Math.sin(i/3*Lt))*2/3,o+=(160*Math.sin(i/12*Lt)+320*Math.sin(i*Lt/30))*2/3,o},ud=function(n,i){var i=+i,n=+n;let o=300+n+2*i+.1*n*n+.1*n*i+.1*Math.sqrt(Math.abs(n));return o+=(20*Math.sin(6*n*Lt)+20*Math.sin(2*n*Lt))*2/3,o+=(20*Math.sin(n*Lt)+40*Math.sin(n/3*Lt))*2/3,o+=(150*Math.sin(n/12*Lt)+300*Math.sin(n/30*Lt))*2/3,o},dd=function(n,i){var i=+i,n=+n;return!(n>73.66&&n<135.05&&i>3.86&&i<53.55)},hd=Object.freeze({__proto__:null,bd09togcj02:nl,gcj02tobd09:ol,wgs84togcj02:ld,gcj02towgs84:al});function ut(e,t,i){i.cesiumEvents=["errorEvent"];const n=Ne(e,t,i);if(n===void 0)return;const{emit:o}=t;return i.createCesiumObject=async()=>{const s=n.transformProps(e);return nn(Cesium.VERSION,"1.104")&&typeof Cesium[i.cesiumClass].fromUrl=="function"?await Cesium[i.cesiumClass].fromUrl(s.url,s):new Cesium[i.cesiumClass](s)},i.mount=async()=>{var s,a,r,l,c;const{viewer:u}=n.$services;if(i.cesiumClass.indexOf("ImageryProvider")!==-1){i.renderByParent=!0;const d=i.cesiumObject;if((s=d==null?void 0:d.readyPromise)==null||s.then(()=>{Pe(i,"readyPromise")&&o("readyPromise",d,u,i.proxy)}),e.projectionTransforms&&e.projectionTransforms.from!==e.projectionTransforms.to&&!(((a=i.proxy)==null?void 0:a.$options.name)==="VcImageryProviderBaidu"||((r=i.proxy)==null?void 0:r.$options.name)==="VcImageryProviderTianditu"&&d._epsgCode==="4490")){const{WebMercatorTilingScheme:p,Cartographic:v,Math:b}=Cesium,y=new p,x=y.projection,M=x.project,g=x.unproject;let w,O;e.projectionTransforms.to.toUpperCase()==="WGS84"?(w="wgs84togcj02",O="gcj02towgs84"):e.projectionTransforms.to.toUpperCase()==="GCJ02"&&(w="gcj02towgs84",O="wgs84togcj02"),w&&O&&(x.project=function(I,R){return R=R||new Cesium.Cartesian3,R=hd[w](b.toDegrees(I.longitude),b.toDegrees(I.latitude)),M.call(this,new v(b.toRadians(R==null?void 0:R[0]),b.toRadians(R==null?void 0:R[1])))},x.unproject=function(I,R){R=R||new v;const D=g.call(this,I);return R=hd[O](b.toDegrees(D.longitude),b.toDegrees(D.latitude)),new v(b.toRadians(R==null?void 0:R[0]),b.toRadians(R==null?void 0:R[1]))},d._tilingScheme=y)}const h=Pt(i).proxy;return h&&((l=h.__updateProvider)==null?void 0:l.call(h,d))}else{const d=i.cesiumObject;return(c=d==null?void 0:d.readyPromise)==null||c.then(()=>{Pe(i,"readyPromise")&&o("readyPromise",d,u,i.proxy)}),u.terrainProvider=d,!0}},i.unmount=async()=>{var s,a;const{viewer:r}=n.$services;if(i.cesiumClass.indexOf("ImageryProvider")!==-1){const l=Pt(i).proxy;return l&&((s=l.__updateProvider)==null?void 0:s.call(l,void 0))}else{const l=new Cesium.EllipsoidTerrainProvider;return(a=l==null?void 0:l.readyPromise)==null||a.then(()=>{Pe(i,"readyPromise")&&o("readyPromise",l,r,i.proxy)}),r.terrainProvider=l,!0}},{transformProps:n.transformProps,unwatchFns:n.unwatchFns,setPropsWatcher:n.setPropsWatcher}}function sl(e){var t,i,n;const o=oe(),s=(o==null?void 0:o.parent)===null?o.vnode.appContext&&o.vnode.appContext.provides:(t=o==null?void 0:o.parent)==null?void 0:t.provides;(!s||!(Vi in s))&&!e&&(e="cesiumContainer");const a=Po();if(o)if(e){const r=(n=(i=o.appContext.config.globalProperties)==null?void 0:i.$VueCesium)==null?void 0:n[e];return r||a.warn(`Failed to get $vc, reason: vc-viewer with containerId: ${e} was not found.`),r}else return ya(Vi);else a.warn("VueCesium useVueCesium() can only be used inside setup().")}var G1={cesiumPath:String,animation:{type:Boolean,default:!1},baseLayerPicker:{type:Boolean,default:!1},fullscreenButton:{type:Boolean,default:!1},vrButton:{type:Boolean,default:!1},geocoder:{type:[Boolean,Array],default:!1},homeButton:{type:Boolean,default:!1},infoBox:{type:Boolean,default:!0},sceneModePicker:{type:Boolean,default:!1},selectionIndicator:{type:Boolean,default:!0},timeline:{type:Boolean,default:!1},navigationHelpButton:{type:Boolean,default:!1},navigationInstructionsInitiallyVisible:{type:Boolean,default:!1},scene3DOnly:{type:Boolean,default:!1},shouldAnimate:{type:Boolean,default:!1},clockViewModel:Object,selectedImageryProviderViewModel:Object,imageryProviderViewModels:Array,selectedTerrainProviderViewModel:Object,terrainProviderViewModels:Array,imageryProvider:Object,baseLayer:Object,terrainProvider:Object,skyBox:{type:[Object,Boolean],default:()=>{}},skyAtmosphere:{type:[Object,Boolean],default:()=>{}},fullscreenElement:{type:[String,Element]},useDefaultRenderLoop:{type:Boolean,default:!0},targetFrameRate:Number,showRenderLoopErrors:{type:Boolean,default:!0},useBrowserRecommendedResolution:{type:Boolean,default:!0},automaticallyTrackDataSourceClocks:{type:Boolean,default:!0},contextOptions:Object,sceneMode:{type:Number,default:3},mapProjection:Object,globe:{type:[Object,Boolean],default:()=>{}},orderIndependentTranslucency:{type:Boolean,default:!0},creditContainer:[String,Element],creditViewport:[String,Element],dataSources:Object,terrainExaggeration:{type:Number,default:1},shadows:{type:Boolean,default:!1},terrainShadows:{type:Number,default:3},mapMode2D:{type:Number,default:1},projectionPicker:{type:Boolean,default:!1},requestRenderMode:{type:Boolean,default:!1},maximumRenderTimeChange:{type:Number,default:0},debugShowFramesPerSecond:{type:Boolean,default:!1},showCredit:{type:Boolean,default:!0},accessToken:String,camera:{type:Object,default:()=>({position:{lng:105,lat:29.999999999999993,height:19059568497290563e-9},heading:360,pitch:-90,roll:0})},navigation:{type:Boolean,default:!1},TZCode:{type:String},UTCOffset:{type:Number},removeCesiumScript:{type:Boolean,default:!0},autoSortImageryLayers:{type:Boolean,default:!0},enableMouseEvent:{type:Boolean,default:!0},skeleton:{type:[Boolean,Object],default:()=>({dark:!1,animation:"wave",square:!0,bordered:!0,color:void 0})},touchHoldArg:{type:String,default:"1000"},viewerCreator:Function,mars3dConfig:Object,containerId:String};function U1(){return{"font-awesome":["https://unpkg.com/font-awesome@latest/css/font-awesome.min.css"],haoutil:["https://unpkg.com/haoutil@latest/dist/haoutil-src.js"],turf:["https://unpkg.com/@turf/turf@latest/turf.min.js"],"mars3d-space":["https://unpkg.com/mars3d-space@latest/dist/mars3d-space.js"],"mars3d-echarts":["https://unpkg.com/echarts@latest/dist/echarts.min.js","https://unpkg.com/echarts-gl@latest/dist/echarts-gl.min.js","https://unpkg.com/mars3d-echarts@latest/dist/mars3d-echarts.js"],"mars3d-mapv":["https://unpkg.com/mapv@latest/build/mapv.min.js","https://unpkg.com/mars3d-mapv@latest/dist/mars3d-mapv.js"],"mars3d-heatmap":["https://unpkg.com/heatmapjs@latest/heatmap.min.js","https://unpkg.com/mars3d-heatmap@latest/dist/mars3d-heatmap.js"],"mars3d-wind":["https://unpkg.com/netcdfjs@latest/lib/index.js","https://unpkg.com/mars3d-wind@latest/dist/mars3d-wind.js"],"mars3d-tdt":["https://unpkg.com/mars3d-tdt@latest/dist/mars3d-tdt.js"],"mars3d-widget":["https://unpkg.com/mars3d-widget@latest/dist/mars3d-widget.js"],mars3d:["https://unpkg.com/mars3d-cesium@latest/Build/Cesium/Widgets/widgets.css","https://unpkg.com/mars3d-cesium@latest/Build/Cesium/Cesium.js","https://unpkg.com/mars3d@latest/dist/mars3d.css","https://unpkg.com/mars3d@latest/dist/mars3d.js"]}}class md{constructor(){this.states=new Cesium.ManagedArray,this.count=0}hidePrimitiveCollection(t){const{PrimitiveCollection:i,Cesium3DTileset:n,Model:o}=Cesium,s=t.length;for(let a=0;a<s;a++){const r=t.get(a);r instanceof i?this.hidePrimitiveCollection(r):(this.states.push(r.show),r instanceof n||r instanceof o||(r.show=!1))}}restorePrimitiveCollection(t){const{PrimitiveCollection:i}=Cesium,n=t.length;for(let o=0;o<n;o++){const s=t.get(o);s instanceof i?this.restorePrimitiveCollection(s):s.show=this.states.get(this.count++)}}hide(t){this.states.length=0,this.hidePrimitiveCollection(t.primitives),this.hidePrimitiveCollection(t.groundPrimitives)}restore(t){this.count=0,this.restorePrimitiveCollection(t.primitives),this.restorePrimitiveCollection(t.groundPrimitives)}}var Me={BeforeDraw:0,Drawing:1,AfterDraw:2};const It=Object.freeze({METERS:"METERS",CENTIMETERS:"CENTIMETERS",KILOMETERS:"KILOMETERS",FEET:"FEET",US_SURVEY_FEET:"US_SURVEY_FEET",INCHES:"INCHES",YARDS:"YARDS",MILES:"MILES"}),wt=Object.freeze({SQUARE_METERS:"SQUARE_METERS",SQUARE_CENTIMETERS:"SQUARE_CENTIMETERS",SQUARE_KILOMETERS:"SQUARE_KILOMETERS",SQUARE_FEET:"SQUARE_FEET",SQUARE_INCHES:"SQUARE_INCHES",SQUARE_YARDS:"SQUARE_YARDS",SQUARE_MILES:"SQUARE_MILES",ACRES:"ACRES",HECTARES:"HECTARES"}),zt=Object.freeze({CUBIC_METERS:"CUBIC_METERS",CUBIC_CENTIMETERS:"CUBIC_CENTIMETERS",CUBIC_KILOMETERS:"CUBIC_KILOMETERS",CUBIC_FEET:"CUBIC_FEET",CUBIC_INCHES:"CUBIC_INCHES",CUBIC_YARDS:"CUBIC_YARDS",CUBIC_MILES:"CUBIC_MILES"}),_t=Object.freeze({DEGREES:"DEGREES",RADIANS:"RADIANS",DEGREES_MINUTES_SECONDS:"DEGREES_MINUTES_SECONDS",GRADE:"GRADE",RATIO:"RATIO"}),pd=class ci{constructor(t){t=ti(t,{}),this.distanceUnits=ti(t.distanceUnits,It.METERS),this.areaUnits=ti(t.areaUnits,wt.SQUARE_METERS),this.volumeUnits=ti(t.volumeUnits,zt.CUBIC_METERS),this.angleUnits=ti(t.angleUnits,_t.DEGREES),this.slopeUnits=ti(t.slopeUnits,_t.DEGREES)}static distanceToString(t,i,n,o){return t=ci.convertDistance(t,It.METERS,i),to(t,n,o)+ci.getDistanceUnitSpacing(i)+ci.getDistanceUnitSymbol(i)}static areaToString(t,i,n,o){return t=ci.convertArea(t,wt.SQUARE_METERS,i),to(t,n,o)+ci.getAreaUnitSpacing(i)+ci.getAreaUnitSymbol(i)}static angleToString(t,i,n,o){const{Math:s}=Cesium;if(i===_t.DEGREES||i===_t.RADIANS||i===_t.GRADE)return t=yd(t,i),to(t,n,o)+ci.getAngleUnitSpacing(i)+ci.getAngleUnitSymbol(i);if(i===_t.DEGREES_MINUTES_SECONDS){const a=s.toDegrees(t),r=a<0?"-":"",l=Math.floor(a),c=60*(a-l),u=Math.floor(c);return r+l+"\xB0 "+u+"' "+to(60*(c-u),void 0,o)+'"'}_t.RATIO}static volumeToString(t,i,n,o){return t=ci.convertArea(t,zt.CUBIC_METERS,i),to(t,n,o)+ci.getVolumeUnitSpacing(i)+ci.getVolumeUnitSymbol(i)}static getDistanceUnitSpacing(t){return" "}static getAreaUnitSpacing(t){return" "}static getAngleUnitSpacing(t){return t===_t.RADIANS?" ":""}static getVolumeUnitSpacing(t){return" "}static getDistanceUnitSymbol(t){switch(t){case It.METERS:return"m";case It.CENTIMETERS:return"cm";case It.KILOMETERS:return"km";case It.FEET:case It.US_SURVEY_FEET:return"ft";case It.INCHES:return"in";case It.YARDS:return"yd";case It.MILES:return"mi";default:return}}static getAreaUnitSymbol(t){switch(t){case wt.SQUARE_METERS:return"m\xB2";case wt.SQUARE_CENTIMETERS:return"cm\xB2";case wt.SQUARE_KILOMETERS:return"km\xB2";case wt.SQUARE_FEET:return"sq ft";case wt.SQUARE_INCHES:return"sq in";case wt.SQUARE_YARDS:return"sq yd";case wt.SQUARE_MILES:return"sq mi";case wt.ACRES:return"ac";case wt.HECTARES:return"ha";default:return}}static getVolumeUnitSymbol(t){switch(t){case zt.CUBIC_METERS:return"m\xB3";case zt.CUBIC_CENTIMETERS:return"cm\xB3";case zt.CUBIC_KILOMETERS:return"km\xB3";case zt.CUBIC_FEET:return"cu ft";case zt.CUBIC_INCHES:return"cu in";case zt.CUBIC_YARDS:return"cu yd";case zt.CUBIC_MILES:return"cu mi";default:return}}static getAngleUnitSymbol(t){return t===_t.DEGREES?"\xB0":t===_t.RADIANS?"rad":t===_t.GRADE?"%":void 0}static convertDistance(t,i,n){return i===n?t:t*vd(i)*(1/vd(n))}static convertArea(t,i,n){return i===n?t:t*fd(i)*(1/fd(n))}static convertVolume(t,i,n){return i===n?t:t*gd(i)*(1/gd(n))}static convertAngle(t,i,n){return i===n?t:yd(H1(t,i),n)}static longitudeToString(t,i,n,o){return ci.angleToString(Math.abs(t),i,n,o)+" "+(t<0?"W":"E")}static latitudeToString(t,i,n,o){return ci.angleToString(Math.abs(t),i,n,o)+" "+(t<0?"S":"N")}};pd.numberToString=function(e,t,i){return to(e,t,i)};let mt=pd;function vd(e){switch(e){case It.METERS:return 1;case It.CENTIMETERS:return .01;case It.KILOMETERS:return 1e3;case It.FEET:return .3048;case It.US_SURVEY_FEET:return 1200/3937;case It.INCHES:return .254;case It.YARDS:return .9144;case It.MILES:return 1609.344;default:return 1}}function fd(e){switch(e){case wt.SQUARE_METERS:return 1;case wt.SQUARE_CENTIMETERS:return 1e-4;case wt.SQUARE_KILOMETERS:return 1e6;case wt.SQUARE_FEET:return .09290304;case wt.SQUARE_INCHES:return 64516e-8;case wt.SQUARE_YARDS:return .83612736;case wt.SQUARE_MILES:return 2589988110336e-6;case wt.ACRES:return 4046.85642232;case wt.HECTARES:return 1e4;default:return 1}}function gd(e){switch(e){case zt.CUBIC_METERS:return 1;case zt.CUBIC_CENTIMETERS:return 1e-6;case zt.CUBIC_KILOMETERS:return 1e9;case zt.CUBIC_FEET:return .09290304*.3048;case zt.CUBIC_INCHES:return 16387064e-12;case zt.CUBIC_YARDS:return .764554857984;case zt.CUBIC_MILES:return 416818182544058e-5;default:return 1}}function H1(e,t){const{defined:i,Math:n,RuntimeError:o}=Cesium;if(t===_t.RADIANS)return e;if(t===_t.DEGREES)return n.toRadians(e);if(t===_t.GRADE)return e===Number.POSITIVE_INFINITY?n.PI_OVER_TWO:Math.atan(e/100);if(t===_t.RATIO)return Math.atan(e);if(t===_t.DEGREES_MINUTES_SECONDS){const s=/(-?)(\d+)\s*°\s*(\d+)\s*'\s*([\d.,]+)"\s*([WENS]?)/i.exec(e)||[];if(!i(s))throw new o("Could not convert angle to radians: "+e);let a=0<s[1].length?-1:1;const r=parseInt(s[2]),l=parseInt(s[3]),c=parseFloat(s[4]);let u=s[5];u.length===1&&((u=u.toUpperCase())!=="W"&&u!=="S"||(a*=-1));const d=a*(r+l/60+c/3600);return n.toRadians(d)}}function yd(e,t){const{Math:i}=Cesium;if(t===_t.RADIANS)return e;if(t===_t.DEGREES)return i.toDegrees(e);if(t===_t.GRADE)return i.clamp(e,0,i.PI_OVER_TWO)===i.PI_OVER_TWO?Number.POSITIVE_INFINITY:100*Math.tan(e);if(t===_t.RATIO)return Math.sin(e)/Math.cos(e)}function to(e,t,i){const n=W1(i,e,t),o=e.toLocaleString(t,n),s=-0,a=0;return o===s.toLocaleString(t,n)?a.toLocaleString(t,n):o}function W1(e,t,i){let n={minimumFractionDigits:0,maximumFractionDigits:0};return e=Cesium.defaultValue(e,2),typeof e=="number"?(n.minimumFractionDigits=e,n.maximumFractionDigits=e):n=typeof e=="function"?e(t,i):e,n}class rl{constructor(t){const{defined:i,defaultValue:n,createGuid:o,BoundingSphere:s,Ellipsoid:a,ClassificationType:r,ArcType:l}=Cesium;t=n(t,{}),this.show=n(t.show,!0),this._id=i(t.id)?t.id:o(),this._ellipsoid=n(t.ellipsoid,a.WGS84),this._appearance=n(t.appearance,new Cesium.MaterialAppearance),this._depthFailAppearance=t.depthFailAppearance,this._positions=n(t.positions,[]),this._polygonHierarchy=t.polygonHierarchy,this._clampToGround=n(t.clampToGround,!1),this._classificationType=n(t.classificationType,r.BOTH),this._arcType=n(t.arcType,l.RHUMB),this._allowPicking=n(t.allowPicking,!0),this._asynchronous=n(t.asynchronous,!1),this._boundingSphere=new s,this._primitive=void 0,this._update=!0}get positions(){return this._positions}set positions(t){this._positions=t,this._update=!0}get polygonHierarchy(){return this._polygonHierarchy}set polygonHierarchy(t){this._polygonHierarchy=t,this._update=!0}get appearance(){return this._appearance}set appearance(t){this._appearance=t,this._primitive!==void 0&&(this._primitive.appearance=t)}get depthFailAppearance(){return this._depthFailAppearance}set depthFailAppearance(t){this._depthFailAppearance=t,this._primitive!==void 0&&this._primitive instanceof Cesium.Primitive&&(this._primitive.depthFailAppearance=t)}get id(){return this._id}set id(t){this._id=t}get boundingVolume(){return this._boundingSphere}get ellipsoid(){return this._ellipsoid}get clampToGround(){return this._clampToGround}set clampToGround(t){this._clampToGround=t}get classificationType(){return this._classificationType}set classificationType(t){this._classificationType=t,this._update=!0}get allowPicking(){return this._allowPicking}set allowPicking(t){this._allowPicking=t}get asynchronous(){return this._asynchronous}set asynchronous(t){this._asynchronous=t}async update(t){if(this.show){const i=this._polygonHierarchy?this._polygonHierarchy.positions:this._positions;if(i.length<3)this._primitive&&this._primitive.destroy(),this._primitive=void 0;else{if(this._update){this._update=!1;let n;this._clampToGround?n=this._createGroundPolygon():n=this._createPolygon(),n.then(o=>{this._primitive&&this._primitive.destroy(),this._primitive=void 0,this._primitive=o,this._primitive._vcParent=this,this._boundingSphere=Cesium.BoundingSphere.fromPoints(i,this._boundingSphere)})}this._primitive&&this._primitive.update(t)}}}async _createPolygon(){const{Primitive:t,GeometryInstance:i,CoplanarPolygonGeometry:n,Cartesian3:o}=Cesium;return new t({geometryInstances:new i({geometry:this._polygonHierarchy?new n({polygonHierarchy:this._polygonHierarchy,ellipsoid:this._ellipsoid}):n.fromPositions({positions:this._positions.map(function(s){return o.clone(s)}),ellipsoid:this._ellipsoid}),id:this._id}),appearance:this._appearance,depthFailAppearance:this._depthFailAppearance,allowPicking:this._allowPicking,asynchronous:this._asynchronous})}async _createGroundPolygon(){const{GroundPrimitive:t,GeometryInstance:i,PolygonGeometry:n,Cartesian3:o}=Cesium;return await Cesium.GroundPrimitive.initializeTerrainHeights(),new t({geometryInstances:new i({geometry:this._polygonHierarchy?new n({polygonHierarchy:this._polygonHierarchy,ellipsoid:this._ellipsoid,arcType:this._arcType}):n.fromPositions({positions:this._positions.map(function(s){return o.clone(s)}),ellipsoid:this._ellipsoid,arcType:this._arcType}),id:this._id}),appearance:this._appearance,allowPicking:this._allowPicking,asynchronous:this._asynchronous,classificationType:this._classificationType})}isDestroyed(){return!1}destroy(){return this._primitive&&this._primitive.destroy(),this._primitive=void 0,Cesium.destroyObject(this)}}class ll{constructor(t){const{SampledPositionProperty:i,Entity:n,ExtrapolationType:o,VelocityOrientationProperty:s,CallbackProperty:a}=Cesium;this._lastTime=void 0,this._sampledPosition=new i,this._sampledPosition.forwardExtrapolationType=t.forwardExtrapolationType||o.HOLD,this._sampledPosition.backwardExtrapolationType=t.backwardExtrapolationType||o.HOLD,this._cache=[],this._maxCacheSize=t.maxCacheSize||10;const r=new n(t);if(r.position=this._sampledPosition,!Cesium.defined(t.orientation)){const l=new s(this._sampledPosition);let c;r.orientation=new a((u,d)=>{const h=l.getValue(u);if(h)c=h;else return c;return h},!1)}this._entity=r,this._velocityVectorProperty=new Cesium.VelocityVectorProperty(this._sampledPosition,!1)}get id(){return this._entity.id}set id(t){this._entity.id=t}set maxCacheSize(t){this._maxCacheSize=t}get maxCacheSize(){return this._maxCacheSize}get position(){return this._sampledPosition.getValue(Cesium.JulianDate.now())}_removePosition(){if(this._cache.length>this._maxCacheSize){const t=Cesium.JulianDate.addSeconds(this._cache[0],-.2,new Cesium.JulianDate),i=Cesium.JulianDate.addSeconds(this._cache[this._cache.length-this._maxCacheSize],-.2,new Cesium.JulianDate);this._sampledPosition.removeSamples(new Cesium.TimeInterval({start:t,stop:i})),this._cache.splice(0,this._cache.length-this._maxCacheSize)}}addPosition(t,i){this._removePosition();let n;if(typeof i=="number"){const o=Cesium.JulianDate.now();n=Cesium.JulianDate.addSeconds(o,i,new Cesium.JulianDate),Cesium.destroyObject(o)}else n=Di(i);return this._sampledPosition.addSample(n,tt(t)),this._lastTime=n,this._cache.push(this._lastTime),n}}const q1={position:0,normal:1};class bd{constructor(t){const{defaultValue:i,Matrix4:n,Math:o,Color:s,BoundingSphere:a}=Cesium;this.modelMatrix=i(t.modelMatrix,new n),this.fovH=i(t.fovH,o.toRadians(60)),this.fovV=i(t.fovV,o.toRadians(30)),this.segmentH=i(t.segmentH,16),this.segmentV=i(t.segmentV,8),this.subSegmentH=i(t.subSegmentH,3),this.subSegmentV=i(t.subSegmentV,3),this._faceColor=i(t.faceColor,new s(1,1,1,.1)),this._lineColor=i(t.lineColor,new s(1,1,1,.4)),this.show=i(t.show,!0),this._modelMatrix=n.clone(n.IDENTITY),this._fovH=0,this._fovV=0,this._segmentH=1,this._segmentV=1,this._subSegmentH=1,this._subSegmentV=1,this._boundingSphere=new a,this._initBoundingSphere=void 0,this._command=void 0}get faceColor(){return this._faceColor}set faceColor(t){this._faceColor=t}get lineColor(){return this._lineColor}set lineColor(t){this._lineColor=t}update(t){if(this.show&&t.passes.render){const{clone:i,Matrix4:n,defined:o,BoundingSphere:s}=Cesium;this.fovH===this._fovH&&this.fovV===this._fovV&&this.segmentH===this._segmentH&&this.segmentV===this._segmentV&&this.subSegmentH===this._subSegmentH&&this.subSegmentV===this._subSegmentV||(this._fovH=this.fovH,this._fovV=this.fovV,this._segmentH=this.segmentH,this._segmentV=this.segmentV,this._subSegmentH=this.subSegmentH,this._subSegmentV=this.subSegmentV,this._modelMatrix=i(n.IDENTITY),this._destroyVideoMemory()),this.fovH!==this._fovH&&this.fovV!==this._fovV&&this.segmentH!==this._segmentH&&this.segmentV!==this._segmentV&&this.subSegmentH!==this._subSegmentH&&this.subSegmentV!==this._subSegmentV&&(this._fovH=this.fovH,this._fovV=this.fovV,this._segmentH=this.segmentH,this._segmentV=this.segmentV,this._subSegmentH=this.subSegmentH,this._subSegmentV=this.subSegmentV,this._modelMatrix=i(n.IDENTITY),this._destroyVideoMemory()),o(this._command)||this._createCommand(t.context),n.equals(this.modelMatrix,this._modelMatrix)||(n.clone(this.modelMatrix,this._modelMatrix),this._command.modelMatrix=n.IDENTITY,this._command.modelMatrix=this._modelMatrix,this._command.boundingVolume=s.transform(this._initBoundingSphere,this._modelMatrix,this._boundingSphere),this._lineCommand.modelMatrix=n.IDENTITY,this._lineCommand.modelMatrix=this._modelMatrix,this._lineCommand.boundingVolume=s.transform(this._initBoundingSphere,this._modelMatrix,this._boundingSphere)),this._command&&t.commandList.push(this._command),this._lineCommand&&t.commandList.push(this._lineCommand)}}isDestroyed(){return!1}destroy(){this._destroyVideoMemory(),Cesium.destroyObject(this)}_createCommand(t){const{Appearance:i,RenderState:n,ShaderSource:o,ShaderProgram:s,BufferUsage:a,IndexDatatype:r,VertexArray:l,ComponentDatatype:c,BoundingSphere:u,DrawCommand:d,PrimitiveType:h,Pass:p,Matrix4:v}=Cesium,b=this,y=this._subSegmentH*this._segmentH,x=this._subSegmentV*this._segmentV,M=Cd(this._fovH,this._fovV,y,x),g=Cd(this._fovH,this._fovV,y,x),w=Q1(y,x),O=Z1(this._segmentH,this._segmentV,this._subSegmentH,this._subSegmentV),I=i.getDefaultRenderState(!0,!1,void 0),R=n.fromCache(I),D=t.webgl2,P=new o({sources:[`
// \u4F7F\u7528double\u7C7B\u578B\u7684position\u8FDB\u884C\u8BA1\u7B97
// attribute vec3 position3DHigh;
// attribute vec3 position3DLow;
${D?"in":"attribute"} vec3 position;
${D?"in":"attribute"} vec3 normal;
// attribute vec2 st;
// attribute float batchId;
${D?"out":"varying"} vec3 v_positionEC;
${D?"out":"varying"} vec3 v_normalEC;
// varying vec2 v_st;
void main()
{
// \u4F7F\u7528double\u7C7B\u578B\u7684position\u8FDB\u884C\u8BA1\u7B97
// vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);
// v_positionEC = (czm_modelViewRelativeToEye * p).xyz;
// position in eye coordinates
// v_normalEC = czm_normal * normal;
// normal in eye coordinates
// v_st = st;
// gl_Position = czm_modelViewProjectionRelativeToEye * p;
v_positionEC = (czm_modelView * vec4(position, 1.0)).xyz;
// position in eye coordinates
v_normalEC = czm_normal * normal;
// normal in eye coordinates
// v_st = st;
gl_Position = czm_modelViewProjection * vec4(position, 1.0);
}
`]}),k=new o({sources:[`
${D?"in":"varying"} vec3 v_positionEC;
${D?"in":"varying"} vec3 v_normalEC;
// varying vec2 v_st;
// uniform sampler2D myImage;
uniform vec4 vcColor;
void main()
{
vec3 positionToEyeEC = -v_positionEC;
vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif
czm_materialInput materialInput;
materialInput.normalEC = normalEC;
materialInput.positionToEyeEC = positionToEyeEC;
// materialInput.st = v_st;
//czm_material material = czm_getMaterial(materialInput);
czm_material material = czm_getDefaultMaterial(materialInput);
// material.diffuse = texture2D(myImage, materialInput.st).rgb;
material.diffuse = vcColor.rgb;
material.alpha = vcColor.a;
#ifdef FLAT
${D?"out_FragColor":"gl_FragColor"} = vec4(material.diffuse + material.emission, material.alpha);
#else
${D?"out_FragColor":"gl_FragColor"} = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`]}),N={vcColor:function(){return b._faceColor}},$={vcColor:function(){return b._lineColor}},m=s.fromCache({context:t,vertexShaderSource:P,fragmentShaderSource:k,attributeLocations:q1});this._shaderprogram=m;const f=Cesium.Buffer.createVertexBuffer({context:t,typedArray:M,usage:a.STATIC_DRAW}),C=Cesium.Buffer.createVertexBuffer({context:t,typedArray:g,usage:a.STATIC_DRAW}),T=Cesium.Buffer.createIndexBuffer({context:t,typedArray:w,usage:a.STATIC_DRAW,indexDatatype:r.UNSIGNED_SHORT}),_=Cesium.Buffer.createIndexBuffer({context:t,typedArray:O,usage:a.STATIC_DRAW,indexDatatype:r.UNSIGNED_SHORT}),E=new l({context:t,attributes:[{index:0,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:c.FLOAT},{index:1,vertexBuffer:C,componentsPerAttribute:3,componentDatatype:c.FLOAT}],indexBuffer:T}),A=new l({context:t,attributes:[{index:0,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:c.FLOAT},{index:1,vertexBuffer:C,componentsPerAttribute:3,componentDatatype:c.FLOAT}],indexBuffer:_});this._initBoundingSphere=u.fromVertices(M),this._command=new d({vertexArray:E,primitiveType:h.TRIANGLES,renderState:R,shaderProgram:m,uniformMap:N,owner:this,pass:p.TRANSLUCENT,modelMatrix:new v,boundingVolume:new u,cull:!0}),this._lineCommand=new d({vertexArray:A,primitiveType:h.LINES,renderState:R,shaderProgram:m,uniformMap:$,owner:this,pass:p.TRANSLUCENT,modelMatrix:new v,boundingVolume:new u,cull:!0})}_destroyVideoMemory(){const{defined:t}=Cesium;this._shaderprogram=this._shaderprogram&&this._shaderprogram.destroy(),t(this._command)&&(this._command.vertexArray.destroy(),this._command=void 0),t(this._lineCommand)&&(this._lineCommand.vertexArray.destroy(),this._lineCommand=void 0)}}function Cd(e,t,i,n){const o=new Float32Array((i+1)*(n+1)*3+3);for(let s=0;s<i+1;s++)for(let a=0;a<n+1;a++){const r=e*(s/i-.5),l=t*(a/n-.5),c=[Math.cos(-r)*Math.cos(-l),Math.sin(-r)*Math.cos(-l),Math.sin(l)];o[3*(a*(i+1)+s)+0]=c[0],o[3*(a*(i+1)+s)+1]=c[1],o[3*(a*(i+1)+s)+2]=c[2]}return o[(i+1)*(n+1)*3+0]=0,o[(i+1)*(n+1)*3+1]=0,o[(i+1)*(n+1)*3+2]=0,o}function Q1(e,t){const i=e*t*6,n=new Uint16Array(i);for(let o=0;o<e;o++)for(let s=0;s<t;s++){const a=s*(1+e)+o,r=s*(1+e)+o+1,l=(s+1)*(1+e)+o,c=(s+1)*(1+e)+o+1,u=6*(s*e+o);n[0+u]=a,n[1+u]=r,n[2+u]=c,n[3+u]=a,n[4+u]=c,n[5+u]=l}return n}function Z1(e,t,i,n){const o=e*i,s=t*n,a=new Uint16Array((e+1)*(2*s)+(t+1)*(2*o)+8);for(let c=0;c<e+1;c++)for(let u=0;u<s;u++){const d=c*i;a[2*(c*s+u)+0]=u*(1+o)+d,a[2*(c*s+u)+1]=(u+1)*(1+o)+d}const r=(e+1)*(2*s);for(let c=0;c<t;c++)for(let u=0;u<o;u++){const d=c*n;a[r+2*(u+c*o)]=d*(1+o)+u,a[r+2*(u+c*o)+1]=d*(1+o)+u+1}const l=(e+1)*(2*s)+(t+1)*(2*o);return a[l]=0,a[l+1]=(1+o)*(1+s),a[l+2]=o,a[l+3]=(1+o)*(1+s),a[l+4]=(1+o)*s,a[l+5]=(1+o)*(1+s),a[l+6]=(1+o)*(1+s)-1,a[l+7]=(1+o)*(1+s),a}function cl(e,t,i,n,o,s){if(o-n<=i)return;const a=n+o>>1;wd(e,t,a,n,o,s%2),cl(e,t,i,n,a-1,s+1),cl(e,t,i,a+1,o,s+1)}function wd(e,t,i,n,o,s){for(;o>n;){if(o-n>600){const c=o-n+1,u=i-n+1,d=Math.log(c),h=.5*Math.exp(2*d/3),p=.5*Math.sqrt(d*h*(c-h)/c)*(u-c/2<0?-1:1),v=Math.max(n,Math.floor(i-u*h/c+p)),b=Math.min(o,Math.floor(i+(c-u)*h/c+p));wd(e,t,i,v,b,s)}const a=t[2*i+s];let r=n,l=o;for(Qo(e,t,n,i),t[2*o+s]>a&&Qo(e,t,n,o);r<l;){for(Qo(e,t,r,l),r++,l--;t[2*r+s]<a;)r++;for(;t[2*l+s]>a;)l--}t[2*n+s]===a?Qo(e,t,n,l):(l++,Qo(e,t,l,o)),l<=i&&(n=l+1),i<=l&&(o=l-1)}}function Qo(e,t,i,n){ul(e,i,n),ul(t,2*i,2*n),ul(t,2*i+1,2*n+1)}function ul(e,t,i){const n=e[t];e[t]=e[i],e[i]=n}function J1(e,t,i,n,o,s,a){const r=[0,e.length-1,0],l=[];let c,u;for(;r.length;){const d=r.pop(),h=r.pop(),p=r.pop();if(h-p<=a){for(let y=p;y<=h;y++)c=t[2*y],u=t[2*y+1],c>=i&&c<=o&&u>=n&&u<=s&&l.push(e[y]);continue}const v=Math.floor((p+h)/2);c=t[2*v],u=t[2*v+1],c>=i&&c<=o&&u>=n&&u<=s&&l.push(e[v]);const b=(d+1)%2;(d===0?i<=c:n<=u)&&(r.push(p),r.push(v-1),r.push(b)),(d===0?o>=c:s>=u)&&(r.push(v+1),r.push(h),r.push(b))}return l}function X1(e,t,i,n,o,s){const a=[0,e.length-1,0],r=[],l=o*o;for(;a.length;){const c=a.pop(),u=a.pop(),d=a.pop();if(u-d<=s){for(let y=d;y<=u;y++)_d(t[2*y],t[2*y+1],i,n)<=l&&r.push(e[y]);continue}const h=Math.floor((d+u)/2),p=t[2*h],v=t[2*h+1];_d(p,v,i,n)<=l&&r.push(e[h]);const b=(c+1)%2;(c===0?i-o<=p:n-o<=v)&&(a.push(d),a.push(h-1),a.push(b)),(c===0?i+o>=p:n+o>=v)&&(a.push(h+1),a.push(u),a.push(b))}return r}function _d(e,t,i,n){const o=e-i,s=t-n;return o*o+s*s}const Y1=e=>e[0],K1=e=>e[1];class eC{constructor(t,i=Y1,n=K1,o=64,s=Float64Array){this.nodeSize=o,this.points=t;const a=t.length<65536?Uint16Array:Uint32Array,r=this.ids=new a(t.length),l=this.coords=new s(t.length*2);for(let c=0;c<t.length;c++)r[c]=c,l[2*c]=i(t[c]),l[2*c+1]=n(t[c]);cl(r,l,o,0,r.length-1,0)}range(t,i,n,o){return J1(this.ids,this.coords,t,i,n,o,this.nodeSize)}within(t,i,n){return X1(this.ids,this.coords,t,i,n,this.nodeSize)}}class xd{constructor(t){t=ti(t,{}),this._enabled=ti(t.enabled,!1),this._pixelRange=ti(t.pixelRange,80),this._minimumClusterSize=ti(t.minimumClusterSize,2),this._clusterBillboards=ti(t.clusterBillboards,!0),this._clusterLabels=ti(t.clusterLabels,!0),this._clusterPoints=ti(t.clusterPoints,!0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity={},this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._clusterDirty=!1,this._cluster=void 0,this._removeEventListener=void 0,this._clusterEvent=new Cesium.Event,this.show=ti(t.show,!0)}_initialize(t){this._scene=t;const i=aC(this);this._cluster=i,this._removeEventListener=t.camera.changed.addEventListener(i)}get enabled(){return this._enabled}set enabled(t){this._enabledDirty=t!==this._enabled,this._enabled=t}get pixelRange(){return this._pixelRange}set pixelRange(t){this._clusterDirty=this._clusterDirty||t!==this._pixelRange,this._pixelRange=t}get minimumClusterSize(){return this._minimumClusterSize}set minimumClusterSize(t){this._clusterDirty=this._clusterDirty||t!==this._minimumClusterSize,this._minimumClusterSize=t}get clusterEvent(){return this._clusterEvent}get clusterBillboards(){return this._clusterBillboards}set clusterBillboards(t){this._clusterDirty=this._clusterDirty||t!==this._clusterBillboards,this._clusterBillboards=t}get clusterLabels(){return this._clusterLabels}set clusterLabels(t){this._clusterDirty=this._clusterDirty||t!==this._clusterLabels,this._clusterLabels=t}get clusterPoints(){return this._clusterPoints}set clusterPoints(t){this._clusterDirty=this._clusterDirty||t!==this._clusterPoints,this._clusterPoints=t}getLabel(t){return hl.call(this,t,"_labelCollection",Cesium.LabelCollection,"_unusedLabelIndices","labelIndex")}removeLabel(t){const{defined:i}=Cesium,n=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[t.id];if(!i(this._labelCollection)||!i(n)||!i(n.labelIndex))return;const o=n.labelIndex;n.labelIndex=void 0,ml(this,t.id);const s=this._labelCollection.get(o);s.show=!1,s.text="",s.id=void 0,this._unusedLabelIndices.push(o),this._clusterDirty=!0}getBillboard(t){return hl.call(this,t,"_billboardCollection",Cesium.BillboardCollection,"_unusedBillboardIndices","billboardIndex")}removeBillboard(t){const{defined:i}=Cesium,n=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[t.id];if(!i(this._billboardCollection)||!i(n)||!i(n.billboardIndex))return;const o=n.billboardIndex;n.billboardIndex=void 0,ml(this,t.id);const s=this._billboardCollection.get(o);s.id=void 0,s.show=!1,s.image=void 0,this._unusedBillboardIndices.push(o),this._clusterDirty=!0}getPoint(t){return hl.call(this,t,"_pointCollection",Cesium.PointPrimitiveCollection,"_unusedPointIndices","pointIndex")}removePoint(t){const{defined:i}=Cesium,n=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[t.id];if(!i(this._pointCollection)||!i(n)||!i(n.pointIndex))return;const o=n.pointIndex;n.pointIndex=void 0,ml(this,t.id);const s=this._pointCollection.get(o);s.show=!1,s.id=void 0,this._unusedPointIndices.push(o),this._clusterDirty=!0}update(t){if(!this.show)return;const{defined:i}=Cesium;let n;i(this._labelCollection)&&this._labelCollection.length>0&&this._labelCollection.get(0)._glyphs.length===0&&(n=t.commandList,t.commandList=[],this._labelCollection.update(t),t.commandList=n),i(this._billboardCollection)&&this._billboardCollection.length>0&&!i(this._billboardCollection.get(0).width)&&(n=t.commandList,t.commandList=[],this._billboardCollection.update(t),t.commandList=n),this._enabledDirty&&(this._enabledDirty=!1,tC(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),i(this._clusterLabelCollection)&&this._clusterLabelCollection.update(t),i(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(t),i(this._clusterPointCollection)&&this._clusterPointCollection.update(t),i(this._labelCollection)&&this._labelCollection.update(t),i(this._billboardCollection)&&this._billboardCollection.update(t),i(this._pointCollection)&&this._pointCollection.update(t)}destroy(){const{defined:t}=Cesium;this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),t(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1}}function tC(e){if(e.enabled)return;const{defined:t}=Cesium;t(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),t(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),t(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,dl(e._labelCollection),dl(e._billboardCollection),dl(e._pointCollection)}function dl(e){const{defined:t}=Cesium;if(!t(e))return;const i=e.length;for(let n=0;n<i;++n)e.get(n).clusterShow=!0}function hl(e,t,i,n,o){const{defined:s}=Cesium;let a=this[t];s(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});let r=this._collectionIndicesByEntity[e.id];if(s(r)||(r=this._collectionIndicesByEntity[e.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),s(a)&&s(r[o]))return a.get(r[o]);s(a)||(a=this[t]=new i({scene:this._scene}));let l,c;const u=this[n];u.length>0?(l=u.pop(),c=a.get(l)):(c=a.add(),l=a.length-1),r[o]=l;const d=this;return Promise.resolve().then(function(){d._clusterDirty=!0}),c}function ml(e,t){const{defined:i}=Cesium,n=e._collectionIndicesByEntity[t];!i(n.billboardIndex)&&!i(n.labelIndex)&&!i(n.pointIndex)&&delete e._collectionIndicesByEntity[t]}function iC(e){return e.coord.x}function nC(e){return e.coord.y}function Ed(e,t){e.x-=t,e.y-=t,e.width+=t*2,e.height+=t*2}function Md(e,t,i,n,o){const{defined:s,Label:a,Billboard:r,PointPrimitive:l,BoundingRectangle:c}=Cesium,u=new c;if(s(e._labelCollection)&&n._clusterLabels?o=a.getScreenSpaceBoundingBox(e,t,o):s(e._billboardCollection)&&n._clusterBillboards?o=r.getScreenSpaceBoundingBox(e,t,o):s(e._pointPrimitiveCollection)&&n._clusterPoints&&(o=l.getScreenSpaceBoundingBox(e,t,o)),Ed(o,i),n._clusterLabels&&!s(e._labelCollection)&&s(e.id)&&Pd(n,e.id.id)&&s(e.id._label)){const d=n._collectionIndicesByEntity[e.id.id].labelIndex,h=n._labelCollection.get(d),p=a.getScreenSpaceBoundingBox(h,t,u);Ed(p,i),o=c.union(o,p,o)}return o}function oC(e,t){const{defined:i}=Cesium;if(e.clusterShow=!0,!i(e._labelCollection)&&i(e.id)&&Pd(t,e.id.id)&&i(e.id._label)){const n=t._collectionIndicesByEntity[e.id.id].labelIndex,o=t._labelCollection.get(n);o.clusterShow=!0}}function Od(e,t,i,n){const o={billboard:n._clusterBillboardCollection.add(),label:n._clusterLabelCollection.add(),point:n._clusterPointCollection.add()};o.billboard.show=!1,o.point.show=!1,o.label.show=!0,o.label.text=t.toLocaleString(),o.label.id=i,o.billboard.position=o.label.position=o.point.position=e,o.billboard.owner=n,o.label.owner=n,o.point.owner=n,n._clusterEvent.raiseEvent(i,o)}function Pd(e,t){const{defined:i}=Cesium;return i(e)&&i(e._collectionIndicesByEntity[t])&&i(e._collectionIndicesByEntity[t].labelIndex)}function pl(e,t,i,n,o){const{defined:s,SceneMode:a}=Cesium;if(!s(e))return;const r=e.length;for(let l=0;l<r;++l){const c=e.get(l);if(c.clusterShow=!1,!c.show||o._scene.mode===a.SCENE3D&&!n.isPointVisible(c.position))continue;const u=c.computeScreenSpacePosition(i);s(u)&&t.push({index:l,collection:e,clustered:!1,coord:u})}}function aC(e){const{defined:t,LabelCollection:i,BillboardCollection:n,PointPrimitiveCollection:o,Billboard:s,Matrix4:a,Cartesian3:r,Cartesian2:l,BoundingRectangle:c}=Cesium,u=new c,d=new c,h=new c;return function(p){if(t(p)&&p<.05||!e.enabled)return;const v=e._scene,b=e._labelCollection,y=e._billboardCollection,x=e._pointCollection;if(!t(b)&&!t(y)&&!t(x)||!e._clusterBillboards&&!e._clusterLabels&&!e._clusterPoints)return;let M=e._clusterLabelCollection,g=e._clusterBillboardCollection,w=e._clusterPointCollection;t(M)?M.removeAll():M=e._clusterLabelCollection=new i({scene:v}),t(g)?g.removeAll():g=e._clusterBillboardCollection=new n({scene:v}),t(w)?w.removeAll():w=e._clusterPointCollection=new o;const O=e._pixelRange,I=e._minimumClusterSize,R=e._previousClusters,D=[],P=e._previousHeight,k=v.camera.positionCartographic.height,N=v.mapProjection.ellipsoid,$=v.camera.positionWC,m=new Cesium.EllipsoidalOccluder(N,$),f=[];e._clusterLabels&&pl(b,f,v,m,e),e._clusterBillboards&&pl(y,f,v,m,e),e._clusterPoints&&pl(x,f,v,m,e);let C,T,_,E,A,L,B,F,q,Z,H,V;const j=new eC(f,iC,nC,64,Int32Array);if(k<P)for(_=R.length,C=0;C<_;++C){const G=R[C];if(!m.isPointVisible(G.position))continue;const J=s._computeScreenSpacePosition(a.IDENTITY,G.position,r.ZERO,l.ZERO,v);if(!t(J))continue;const U=1-k/P;let z=G.width=G.width*U,Y=G.height=G.height*U;z=Math.max(z,G.minimumWidth),Y=Math.max(Y,G.minimumHeight);const Q=J.x-z*.5,te=J.y-Y*.5,X=J.x+z,ne=J.y+Y;for(A=j.range(Q,te,X,ne),L=A.length,Z=0,q=[],T=0;T<L;++T)B=A[T],F=f[B],F.clustered||(++Z,H=F.collection,V=F.index,q.push(H.get(V).id));if(Z>=I)for(Od(G.position,Z,q,e),D.push(G),T=0;T<L;++T)f[A[T]].clustered=!0}for(_=f.length,C=0;C<_;++C){const G=f[C];if(G.clustered)continue;G.clustered=!0,H=G.collection,V=G.index;const J=H.get(V);E=Md(J,G.coord,O,e,u);const U=c.clone(E,d);A=j.range(E.x,E.y,E.x+E.width,E.y+E.height),L=A.length;const z=r.clone(J.position);for(Z=1,q=[J.id],T=0;T<L;++T)if(B=A[T],F=f[B],!F.clustered){const Y=F.collection.get(F.index),Q=Md(Y,F.coord,O,e,h);r.add(Y.position,z,z),c.union(U,Q,U),++Z,q.push(Y.id)}if(Z>=I){const Y=r.multiplyByScalar(z,1/Z,z);for(Od(Y,Z,q,e),D.push({position:Y,width:U.width,height:U.height,minimumWidth:E.width,minimumHeight:E.height}),T=0;T<L;++T)f[A[T]].clustered=!0}else oC(J,e)}M.length===0&&(M.destroy(),e._clusterLabelCollection=void 0),g.length===0&&(g.destroy(),e._clusterBillboardCollection=void 0),w.length===0&&(w.destroy(),e._clusterPointCollection=void 0),e._previousClusters=D,e._previousHeight=k}}let ns=!1;class Sd{static extend(t){if(ns)return;const{Rectangle:i}=Cesium;i.prototype.expand=function(n,o,s){return s=s&&s instanceof i?s:this.clone(),n=s.width*(1-n)/2,o=s.height*(1-o)/2,s.west+=n,s.south+=o,s.east-=n,s.north-=o,s.west=s.west<-Math.PI?-Math.PI:s.west,s.east=s.east>Math.PI?Math.PI:s.east,s.north=s.north>Math.PI/2?Math.PI/2:s.north,s.south=s.south<-Math.PI/2?-Math.PI/2:s.south,s},ns=!0}static revoke(t){if(!ns)return;const{Rectangle:i}=Cesium;i.prototype.expand=void 0,ns=!1}}let os=!1,vl;class Td{static extend(t){if(os)return;const i=Cesium.ShadowMapShader;vl=i.createShadowReceiveFragmentShader,i.createShadowReceiveFragmentShader=function(n,o,s,a,r){var l;if(n=vl.bind(this)(n,o,s,a,r),o._isSpotLight){n.sources[0]=`
uniform vec4 shadowMap_viewshedVisibleColor;
uniform vec4 shadowMap_viewshedInvisibleColor;
${n.sources[0]}
`;const c=(l=t.scene.context)==null?void 0:l.webgl2;n.sources[n.sources.length-1]=n.sources[n.sources.length-1].replace(`${c?"out_FragColor":"gl_FragColor"}.rgb *= visibility;`,`
float _depth = shadowPosition.z - shadowParameters.depthBias;
float _visibility = czm_shadowDepthCompare(shadowMap_texture, shadowPosition.xy, _depth);
${c?"out_FragColor":"gl_FragColor"}.rgb *= (_visibility < 0.999 ? shadowMap_viewshedInvisibleColor.rgb :shadowMap_viewshedVisibleColor.rgb);
`),n.sources[n.sources.length-1]=n.sources[n.sources.length-1].replace("vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);","vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);if (distance(positionEC.xyz, shadowMap_lightPositionEC.xyz) > shadowMap_lightPositionEC.w) { return; }")}return n},os=!0}static revoke(t){if(!os)return;const i=Cesium.ShadowMapShader;i.createShadowReceiveFragmentShader=vl,os=!1}}class Id{constructor(t,i){const{defined:n,DeveloperError:o,PerspectiveFrustum:s,Math:a,Camera:r,ShadowMap:l,ShadowMode:c,Event:u,Cartesian3:d,defaultValue:h,Color:p}=Cesium;if(!n(t))throw new o("scene is required.");this._scene=t,this._frustum=new s,this._frustum.fov=a.PI/3,this._frustum.aspectRatio=3,this._frustum.near=1,this._frustum.far=400,this._spotLightCamera=new r(this._scene),this._frustum.clone(this._spotLightCamera.frustum),this._viewshedShadowMap=new l({context:this._scene.context,lightCamera:this._spotLightCamera,cascadesEnabled:!1}),i=i||{},this._scene.globe.shadows=c.ENABLED,this._viewshedShadowMap._terrainBias.depthBias=0,this._debugCameraPrimitive=new bd({}),this._enabledChangedEvent=new u,this._position=new d,this._offsetHeight=h(i.offsetHeight,1.8),this._visibleColor=h(i.visibleColor,new p(0,1,0,1)),this._invisibleColor=h(i.invisibleColor,new p(1,0,0,1)),this._viewshedShadowMap._viewshedColors={visible:this._visibleColor,invisible:this._invisibleColor},this._showGridLine=i.showGridLine,this._debugCameraPrimitive.show=this._showGridLine,this._debugCameraPrimitive.lineColor=h(i.lineColor,new p(1,1,1,.4)),this._debugCameraPrimitive.faceColor=h(i.faceColor,new p(1,1,1,.1))}get frustum(){return this._frustum}get fovH(){return this._fovH}set fovH(t){if(isNaN(t)||t===void 0||t==null||t<0||t>=Math.PI)throw new Error("fovH must be in the range [0, PI).");this._fovH=Number(t),this.frustum.aspectRatio=Math.tan(.5*this._fovH)/Math.tan(.5*this._fovV),this.frustum.fov=this._fovH>this._fovV?this._fovH:this._fovV}get fovV(){return this._fovV}set fovV(t){if(isNaN(t)||t===void 0||t==null||t<0||t>=Math.PI)throw new Error("fovV must be in the range [0, PI).");this._fovV=Number(t),this.frustum.aspectRatio=Math.tan(.5*this._fovH)/Math.tan(.5*this._fovV),this.frustum.fov=this._fovH>this._fovV?this._fovH:this._fovV}get near(){return this.frustum.near}set near(t){this.frustum.near!==t&&(this.frustum.near=t)}get far(){return this.far.near}set far(t){this.frustum.far!==t&&(this.frustum.far=t)}get position(){return this._position}set position(t){t instanceof Cesium.Cartesian3&&this.setView({destination:t.clone(),orientation:{heading:this._spotLightCamera.heading,pitch:this._spotLightCamera.pitch,roll:this._spotLightCamera.roll}})}get offsetHeight(){return this._offsetHeight}set offsetHeight(t){if(isNaN(t)||t==null||t==null)throw new Error("Unacceptable offset.");this._offsetHeight=Number(t),this.setView({destination:this._position,orientation:{heading:this._spotLightCamera.heading,pitch:this._spotLightCamera.pitch,roll:this._spotLightCamera.roll}})}get heading(){return this._spotLightCamera.heading}set heading(t){this._spotLightCamera.heading!==t&&this._spotLightCamera.setView({destination:this._spotLightCamera.positionWC,orientation:{heading:t,pitch:this._spotLightCamera.pitch,roll:this._spotLightCamera.roll}})}get pitch(){return this._spotLightCamera.pitch}set pitch(t){this._spotLightCamera.pitch!==t&&this._spotLightCamera.setView({destination:this._spotLightCamera.positionWC,orientation:{heading:this._spotLightCamera.heading,pitch:t,roll:this._spotLightCamera.roll}})}get roll(){return this._spotLightCamera.roll}set roll(t){this._spotLightCamera.roll!==t&&this._spotLightCamera.setView({destination:this._spotLightCamera.positionWC,orientation:{heading:this._spotLightCamera.heading,pitch:this._spotLightCamera.pitch,roll:t}})}get shadowMap(){return this._viewshedShadowMap}get lightCamera(){return this._spotLightCamera}get enabled(){return this._viewshedShadowMap.enabled}set enabled(t){this._viewshedShadowMap.enabled!==t&&(t?(this._viewshedShadowMap.enabled=!0,this._viewshedShadowMap._pointLightRadius=this._spotLightCamera.frustum.far):this._viewshedShadowMap.enabled=!1,this._enabledChangedEvent.raiseEvent(t))}get enabledChangedEvent(){return this._enabledChangedEvent}get visibleColor(){return this._visibleColor}set visibleColor(t){this._visibleColor=t,this._viewshedShadowMap._viewshedColors.visible=t}get invisibleColor(){return this._invisibleColor}set invisibleColor(t){this._invisibleColor=t,this._viewshedShadowMap._viewshedColors.invisible=t}get showGridLine(){return this._showGridLine}set showGridLine(t){this._showGridLine=t,this._debugCameraPrimitive.show=t}get faceColor(){return this._debugCameraPrimitive.faceColor}set faceColor(t){this._debugCameraPrimitive.faceColor=t}get lineColor(){return this._debugCameraPrimitive.lineColor}set lineColor(t){this._debugCameraPrimitive.lineColor=t}update(t){if(this._viewshedShadowMap.enabled){const{ShadowMode:i,Matrix3:n,Matrix4:o,Math:s}=Cesium;if(this._scene.globe.shadows!==i.ENABLED&&(this._scene.globe.shadows=i.ENABLED),t.shadowMaps.unshift(this._viewshedShadowMap),this._frustum.equals(this._spotLightCamera.frustum)||(this._frustum.clone(this._spotLightCamera.frustum),this._viewshedShadowMap._pointLightRadius=this._frustum.far,this.shadowMap._boundingSphere.radius=Math.random()),this._debugCameraPrimitive.show){const a=this._debugCameraPrimitive.modelMatrix;o.clone(this._spotLightCamera.inverseViewMatrix,a);const r=n.fromRotationZ(.5*s.PI),l=n.fromRotationY(.5*s.PI),c=new n;n.multiply(r,l,c),o.multiplyByMatrix3(a,c,a),o.multiplyByUniformScale(a,this._spotLightCamera.frustum.far,a);const u=this._spotLightCamera.frustum;this._debugCameraPrimitive.fovV=u.aspectRatio<=1?u.fov:2*Math.atan(Math.tan(.5*u.fov)/u.aspectRatio),this._debugCameraPrimitive.fovH=1<u.aspectRatio?u.fov:2*Math.atan(Math.tan(.5*u.fov)*u.aspectRatio),this._debugCameraPrimitive.segmentH=parseInt(String(this._debugCameraPrimitive.fovH/(Math.PI/30)))||1,this._debugCameraPrimitive.segmentV=parseInt(String(this._debugCameraPrimitive.fovV/(Math.PI/30)))||1,this._debugCameraPrimitive.update(t)}}}setView(t){t=t||{};const i=t.destination;if(i instanceof Cesium.Cartesian3){this._position=i.clone();const n=this._offsetHeight,o=Cesium.Cartographic.fromCartesian(i,this._scene.globe.ellipsoid);if(o){o.height=o.height+n;const s=Cesium.Cartesian3.fromRadians(o.longitude,o.latitude,o.height,this._scene.globe.ellipsoid);t.destination=s}}this._spotLightCamera.setView(t)}isDestroyed(){return!1}destroy(){this._debugCameraPrimitive&&this._debugCameraPrimitive.destroy(),this._viewshedShadowMap&&this._viewshedShadowMap.destroy(),Cesium.destroyObject(this)}}class sC{constructor(t,i,n){this._color=t,this._height=i,this._base=Cesium.defaultValue(n,0)}getHeight(){return this._height}getBase(){return this._base}getStartTime(){return this._start}getStopTime(){return this._stop}setRange(t,i){this._start=t,this._stop=i}render(t){let i="";const{JulianDate:n}=Cesium;if(this._start&&this._stop&&this._color){const o=n.secondsDifference(this._start,t.epochJulian);let s=Math.round(t.timeBarWidth*t.getAlpha(o));const a=n.secondsDifference(this._stop,t.epochJulian);let r=Math.round(t.timeBarWidth*t.getAlpha(a))-s;s<0&&(r+=s,s=0),s+r>t.timeBarWidth&&(r=t.timeBarWidth-s),r>0&&(i=`<span class="cesium-timeline-highlight" style="left: ${s.toString()}px; width: ${r.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return i}}class rC{constructor(t,i,n,o){const{Color:s}=Cesium;this.interval=t,this.height=i,this.color=n||new s(.5,.5,.5,1),this.backgroundColor=o||new s(0,0,0,0)}render(t,i){const{JulianDate:n,defined:o}=Cesium,s=this.interval.start,a=this.interval.stop,r=i.startJulian,l=n.addSeconds(i.startJulian,i.duration,new n);if(n.lessThan(s,r)&&n.greaterThan(a,l))t.fillStyle=this.color.toCssColorString(),t.fillRect(0,i.y,i.timeBarWidth,this.height);else if(n.lessThanOrEquals(s,l)&&n.greaterThanOrEquals(a,r)){let c,u,d;for(c=0;c<i.timeBarWidth;++c){const h=n.addSeconds(i.startJulian,c/i.timeBarWidth*i.duration,new n);!o(u)&&n.greaterThanOrEquals(h,s)?u=c:!o(d)&&n.greaterThanOrEquals(h,a)&&(d=c)}t.fillStyle=this.backgroundColor.toCssColorString(),t.fillRect(0,i.y,i.timeBarWidth,this.height),o(u)&&(o(d)||(d=i.timeBarWidth),t.fillStyle=this.color.toCssColorString(),t.fillRect(u,i.y,Math.max(d-u,1),this.height))}}}let fl=1e12;const xi={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},Yt={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},mn=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],lC=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];class cC{constructor(t,i){this.smallestTicInPixels=7;const{defined:n,DeveloperError:o}=Cesium;if(!n(t))throw new o("container is required.");if(!n(i))throw new o("clock is required.");t=Ku(t);const s=t.ownerDocument;this.container=t;const a=s.createElement("div");a.className="cesium-timeline-main",t.appendChild(a),this._topDiv=a,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=i,this._scrubJulian=i.currentTime,this._mainTicSpan=-1,this._mouseMode=xi.none,this._touchMode=Yt.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(i.startTime,i.stopTime),this._onMouseDown=uC(this),this._onMouseUp=dC(this),this._onMouseMove=hC(this),this._onMouseWheel=mC(this),this._onTouchStart=pC(this),this._onTouchMove=fC(this),this._onTouchEnd=vC(this);const r=this._timeBarEle;s.addEventListener("mouseup",this._onMouseUp,!1),s.addEventListener("mousemove",this._onMouseMove,!1),r.addEventListener("mousedown",this._onMouseDown,!1),r.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),r.addEventListener("mousewheel",this._onMouseWheel,!1),r.addEventListener("touchstart",this._onTouchStart,!1),r.addEventListener("touchmove",this._onTouchMove,!1),r.addEventListener("touchend",this._onTouchEnd,!1),r.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},i.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}addEventListener(t,i,n){this._topDiv.addEventListener(t,i,n)}removeEventListener(t,i,n){this._topDiv.removeEventListener(t,i,n)}isDestroyed(){return!1}destroy(){this._clock.onTick.removeEventListener(this.updateFromClock,this);const t=this.container.ownerDocument;t.removeEventListener("mouseup",this._onMouseUp,!1),t.removeEventListener("mousemove",this._onMouseMove,!1);const i=this._timeBarEle;i.removeEventListener("mousedown",this._onMouseDown,!1),i.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),i.removeEventListener("mousewheel",this._onMouseWheel,!1),i.removeEventListener("touchstart",this._onTouchStart,!1),i.removeEventListener("touchmove",this._onTouchMove,!1),i.removeEventListener("touchend",this._onTouchEnd,!1),i.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),Cesium.destroyObject(this)}addHighlightRange(t,i,n){const o=new sC(t,i,n);return this._highlightRanges.push(o),this.resize(),o}addTrack(t,i,n,o){const s=new rC(t,i,n,o);return this._trackList.push(s),this._lastHeight=void 0,this.resize(),s}resize(){const t=this.container.clientWidth,i=this.container.clientHeight;if(t===this._lastWidth&&i===this._lastHeight)return;this._trackContainer.style.height=`${i}px`;let n=1;this._trackList.forEach(function(o){n+=o.height}),this._trackListEle.style.height=`${n.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=n,this._makeTics(),this._lastXPos=void 0,this._lastWidth=t,this._lastHeight=i}zoomTo(t,i){const{defined:n,JulianDate:o,DeveloperError:s,ClockRange:a}=Cesium;if(!n(t))throw new s("startTime is required.");if(!n(i))throw new s("stopTime is required");if(o.lessThanOrEquals(i,t))throw new s("Start time must come before end time.");if(this._startJulian=t,this._endJulian=i,this._timeBarSecondsSpan=o.secondsDifference(i,t),this._clock&&this._clock.clockRange!==a.UNBOUNDED){const l=this._clock.startTime,c=this._clock.stopTime,u=o.secondsDifference(c,l),d=o.secondsDifference(l,this._startJulian),h=o.secondsDifference(c,this._endJulian);this._timeBarSecondsSpan>=u?(this._timeBarSecondsSpan=u,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):d>0?(this._endJulian=o.addSeconds(this._endJulian,d,new o),this._startJulian=l,this._timeBarSecondsSpan=o.secondsDifference(this._endJulian,this._startJulian)):h<0&&(this._startJulian=o.addSeconds(this._startJulian,h,new o),this._endJulian=c,this._timeBarSecondsSpan=o.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();const r=new Event("setzoom",{bubbles:!0,cancelable:!0,composed:!0});r.startJulian=this._startJulian,r.endJulian=this._endJulian,r.epochJulian=this._epochJulian,r.totalSpan=this._timeBarSecondsSpan,r.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(r)}updateFromClock(){const{defined:t,JulianDate:i}=Cesium;this._scrubJulian=this._clock.currentTime;const n=this._scrubElement;if(t(this._scrubElement)){const o=i.secondsDifference(this._scrubJulian,this._startJulian),s=Math.round(o*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==s&&(this._lastXPos=s,n.style.left=`${s-8}px`,this._needleEle.style.left=`${s}px`)}t(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(i.addSeconds(this._startJulian,this._timelineDrag,new i),i.addSeconds(this._endJulian,this._timelineDrag,new i)))}_setTimeBarTime(t,i){const{JulianDate:n}=Cesium;if(t=Math.round(t),this._scrubJulian=n.addSeconds(this._startJulian,i,new n),this._scrubElement){const s=t-8;this._scrubElement.style.left=`${s.toString()}px`,this._needleEle.style.left=`${t.toString()}px`}const o=new Event("settime",{bubbles:!0,cancelable:!0,composed:!0});o.clientX=t,o.timeSeconds=i,o.timeJulian=this._scrubJulian,o.clock=this._clock,this._topDiv.dispatchEvent(o)}zoomFrom(t){const{JulianDate:i}=Cesium;let n=i.secondsDifference(this._scrubJulian,this._startJulian);t>1||n<0||n>this._timeBarSecondsSpan?n=this._timeBarSecondsSpan*.5:n+=n-this._timeBarSecondsSpan*.5;const o=this._timeBarSecondsSpan-n;this.zoomTo(i.addSeconds(this._startJulian,n-n*t,new i),i.addSeconds(this._endJulian,o*t-o,new i))}makeLabel(t){const{JulianDate:i}=Cesium,n=i.toGregorianDate(t),o=n.millisecond;let s=" UTC";if(o>0&&this._timeBarSecondsSpan<3600){for(s=Math.floor(o).toString();s.length<3;)s=`0${s}`;s=`.${s}`}return`${lC[n.month-1]} ${n.day} ${n.year} ${gl(n.hour)}:${gl(n.minute)}:${gl(n.second)}${s}`}_makeTics(){const{JulianDate:t}=Cesium,i=this._timeBarEle,n=t.secondsDifference(this._scrubJulian,this._startJulian),o=Math.round(n*this._topDiv.clientWidth/this._timeBarSecondsSpan),s=o-8;let a;const r=this;this._needleEle.style.left=`${o.toString()}px`;let l="";const c=.01,u=31536e6,d=1e-10;let h=0,p=this._timeBarSecondsSpan;p<c?(p=c,this._timeBarSecondsSpan=c,this._endJulian=t.addSeconds(this._startJulian,c,new t)):p>u&&(p=u,this._timeBarSecondsSpan=u,this._endJulian=t.addSeconds(this._startJulian,u,new t));let v=this._timeBarEle.clientWidth;v<10&&(v=10);const b=this._startJulian,y=Math.min(p/v*1e-5,.4);let x;const M=t.toGregorianDate(b);p>31536e4?x=t.fromDate(new Date(Date.UTC(Math.floor(M.year/100)*100,0))):p>31536e3?x=t.fromDate(new Date(Date.UTC(Math.floor(M.year/10)*10,0))):p>86400?x=t.fromDate(new Date(Date.UTC(M.year,0))):x=t.fromDate(new Date(Date.UTC(M.year,M.month,M.day)));const g=t.secondsDifference(this._startJulian,t.addSeconds(x,y,new t));let w=g+p;this._epochJulian=x;function O(F){return Math.floor(g/F)*F}function I(F,q){return Math.ceil(F/q+.5)*q}function R(F){return(F-g)/p}function D(F,q){return F-q*Math.round(F/q)}this._rulerEle.innerHTML=this.makeLabel(t.addSeconds(this._endJulian,-c,new t));let P=this._rulerEle.offsetWidth+20;P<30&&(P=180);const k=h;h-=d;const N={startTime:g,startJulian:b,epochJulian:x,duration:p,timeBarWidth:v,getAlpha:R};this._highlightRanges.forEach(function(F){l+=F.render(N)});let $=0,m=0,f=0,C=P/v;C>1&&(C=1),C*=this._timeBarSecondsSpan;let T=-1,_=-1;const E=mn.length;let A;for(A=0;A<E;++A){const F=mn[A];if(++T,$=F,F>C&&F>h)break;_<0&&v*(F/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(_=T)}if(T>0){for(;T>0;)if(--T,Math.abs(D($,mn[T]))<1e-5){mn[T]>=h&&(m=mn[T]);break}if(_>=0)for(;_<T;){if(Math.abs(D(m,mn[_]))<1e-5&&mn[_]>=h){f=mn[_];break}++_}}h=k,h>d&&f<1e-5&&Math.abs(h-$)>d&&(f=h,h<=$+d&&(m=0));let L=-999999,B;if(v*(f/this._timeBarSecondsSpan)>=3)for(a=O(f);a<=w;a=I(a,f))l+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(v*R(a)).toString()}px;"></span>`;if(v*(m/this._timeBarSecondsSpan)>=3)for(a=O(m);a<=w;a=I(a,m))l+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(v*R(a)).toString()}px;"></span>`;if(v*($/this._timeBarSecondsSpan)>=2){this._mainTicSpan=$,w+=$,a=O($);const F=t.computeTaiMinusUtc(x);for(;a<=w;){let q=t.addSeconds(b,a-g,new t);if($>2.1){const j=t.computeTaiMinusUtc(q);Math.abs(j-F)>.1&&(a+=j-F,q=t.addSeconds(b,a-g,new t))}const Z=Math.round(v*R(a)),H=this.makeLabel(q);this._rulerEle.innerHTML=H,B=this._rulerEle.offsetWidth,B<10&&(B=P);const V=Z-(B/2-1);V>L?(L=V+B+5,l+=`<span class="cesium-timeline-ticMain" style="left: ${Z.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${V.toString()}px;">${H}</span>`):l+=`<span class="cesium-timeline-ticSub" style="left: ${Z.toString()}px;"></span>`,a=I(a,$)}}else this._mainTicSpan=-1;l+=`<span class="cesium-timeline-icon16" style="left:${s}px;bottom:0;background-position: 0 0;"></span>`,i.innerHTML=l,this._scrubElement=i.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),N.y=0,this._trackList.forEach(function(F){F.render(r._context,N),N.y+=F.height})}}function uC(e){return function(t){e._mouseMode!==xi.touchOnly&&(t.button===0?(e._mouseMode=xi.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,t.button===2?e._mouseMode=xi.zoom:e._mouseMode=xi.slide)),t.preventDefault()}}function dC(e){return function(t){e._mouseMode=xi.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function hC(e){return function(t){let i;if(e._mouseMode===xi.scrub){t.preventDefault();const n=t.clientX-e._topDiv.getBoundingClientRect().left;n<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):n>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===xi.slide){if(i=e._mouseX-t.clientX,e._mouseX=t.clientX,i!==0){const{JulianDate:n}=Cesium,o=i*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(n.addSeconds(e._startJulian,o,new n),n.addSeconds(e._endJulian,o,new n))}}else e._mouseMode===xi.zoom&&(i=e._mouseX-t.clientX,e._mouseX=t.clientX,i!==0&&e.zoomFrom(Math.pow(1.01,i)))}}function mC(e){return function(t){let i=t.wheelDeltaY||t.wheelDelta||-t.detail;fl=Math.max(Math.min(Math.abs(i),fl),1),i/=fl,e.zoomFrom(Math.pow(1.05,-i))}}function pC(e){return function(t){const i=t.touches.length;let n,o;const s=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=xi.touchOnly,i===1?(n=Cesium.JulianDate.secondsDifference(e._scrubJulian,e._startJulian),o=Math.round(n*e._topDiv.clientWidth/e._timeBarSecondsSpan+s),Math.abs(t.touches[0].clientX-o)<50?(e._touchMode=Yt.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=i===1?"-16px 0":"0 0")):(e._touchMode=Yt.singleTap,e._touchState.centerX=t.touches[0].clientX-s)):i===2?(e._touchMode=Yt.slideZoom,e._touchState.centerX=(t.touches[0].clientX+t.touches[1].clientX)*.5-s,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=Yt.ignore}}function vC(e){return function(t){const i=t.touches.length,n=e._topDiv.getBoundingClientRect().left;e._touchMode===Yt.singleTap?(e._touchMode=Yt.scrub,e._onTouchMove(t)):e._touchMode===Yt.scrub&&e._onTouchMove(t),e._mouseMode=xi.touchOnly,i!==1?e._touchMode=i>0?Yt.ignore:Yt.none:e._touchMode===Yt.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-n),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function fC(e){return function(t){let i,n,o,s,a,r,l=1;const c=e._topDiv.getBoundingClientRect().left;if(e._touchMode===Yt.singleTap&&(e._touchMode=Yt.slideZoom),e._mouseMode=xi.touchOnly,e._touchMode===Yt.scrub)t.preventDefault(),t.changedTouches.length===1&&(n=t.changedTouches[0].clientX-c,n>=0&&n<=e._topDiv.clientWidth&&e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth));else if(e._touchMode===Yt.slideZoom){o=t.touches.length,o===2?(s=(t.touches[0].clientX+t.touches[1].clientX)*.5-c,a=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):o===1&&(s=t.touches[0].clientX-c,a=0);const{defined:u,JulianDate:d}=Cesium;u(s)&&(a>0&&e._touchState.spanX>0?(l=e._touchState.spanX/a,r=d.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-s*e._timeBarSecondsSpan*l)/e._topDiv.clientWidth,new d)):(i=e._touchState.centerX-s,r=d.addSeconds(e._startJulian,i*e._timeBarSecondsSpan/e._topDiv.clientWidth,new d)),e.zoomTo(r,d.addSeconds(r,e._timeBarSecondsSpan*l,new d)),e._touchState.centerX=s,e._touchState.spanX=a)}}}function gl(e){return e<10?`0${e.toString()}`:e.toString()}const Ad=[Sd,Td,mu];function gC(){return{invokeExtensions:e=>{Ad.forEach(t=>{t.extend(e)})},revokeExtensions:e=>{Ad.forEach(t=>{t.revoke(e)})}}}const Dd=G1;function yC(e,t,i){let n,o;const s=new Promise((_,E)=>{n=_,o=E}),a=ee(),r=ee(!1),l=Kc(),{emit:c}=t,u=xa(),d=Po(i);i.mounted=!1,i.vcMitt=l,i.cesiumClass="Viewer",i.children=[];const h=qr(e,i),p=Ee({toolbarContainerRC:void 0,timelineContainerRC:void 0,animationContainerRC:void 0,bottomContainerRC:void 0});let v=[];d.debug("viewer creating");const{t:b}=Ct(),{invokeExtensions:y,revokeExtensions:x}=gC();de(()=>e.selectionIndicator,_=>{const{viewer:E,viewerElement:A}=i,{defined:L,SelectionIndicator:B}=Cesium;let F;if(L(E.selectionIndicator)&&!E.selectionIndicator.isDestroyed()&&!_)F=E.selectionIndicator.container,A==null||A.removeChild(F),E.selectionIndicator.destroy(),E._selectionIndicator=void 0;else if(!L(E.selectionIndicator)||E.selectionIndicator.isDestroyed()){F=document.createElement("div"),F.className="cesium-viewer-selectionIndicatorContainer",A==null||A.appendChild(F);const q=new B(F,E.scene);E._selectionIndicator=q}E.viewerWidgetResized.raiseEvent({type:"selectionIndicator",status:_?"added":"removed",target:F})}),de(()=>e.infoBox,_=>{var E,A;const{viewer:L,viewerElement:B}=i,{defined:F,InfoBox:q}=Cesium,Z=["cameraClicked","closeClicked"];let H;if(F(L.infoBox)&&!L.infoBox.isDestroyed()&&!_){const V=L.infoBox.viewModel;V&&h.bindEvents(V,Z,!1),H=L.infoBox.container,B==null||B.removeChild(H),L.infoBox.destroy(),L._infoBox=void 0}else if(!F(L.infoBox)||L.infoBox.isDestroyed()){H=document.createElement("div"),H.className="cesium-viewer-infoBoxContainer",B==null||B.appendChild(H);const V=new q(H),j=V.viewModel;L._onInfoBoxCameraClicked&&((E=L._eventHelper)==null||E.add(j.cameraClicked,L._onInfoBoxCameraClicked,L)),L._onInfoBoxClockClicked&&((A=L._eventHelper)==null||A.add(j.closeClicked,L._onInfoBoxClockClicked,L)),j&&h.bindEvents(j,Z,!0),L._infoBox=V}L.forceResize(),L.viewerWidgetResized.raiseEvent({type:"infoBox",status:_?"added":"removed",target:H})}),de(()=>e.geocoder,_=>{var E;const{viewer:A}=i,L=A._toolbar,{defined:B,Geocoder:F}=Cesium;let q;if(B(A.geocoder)&&!A.geocoder.isDestroyed()&&!_)q=A.geocoder.container,L==null||L.removeChild(q),A.geocoder.destroy(),A._geocoder=void 0;else if(!B(A.geocoder)||A.geocoder.isDestroyed()){q=document.createElement("div"),q.className="cesium-viewer-geocoderContainer",L==null||L.appendChild(q);const Z=new F({container:q,geocoderServices:B(e.geocoder)&&typeof e.geocoder!="boolean"?Array.isArray(e.geocoder)?e.geocoder:[e.geocoder]:void 0,scene:A.scene});A._clearObjects&&((E=A._eventHelper)==null||E.add(Z.viewModel.search.beforeExecute,A._clearObjects,A)),A._geocoder=Z,C(L)}A.viewerWidgetResized.raiseEvent({type:"geocoder",status:_?"added":"removed",target:q})}),de(()=>e.homeButton,_=>{var E,A;const{viewer:L}=i,B=L._toolbar,{defined:F,HomeButton:q}=Cesium;if(F(L.homeButton)&&!L.homeButton.isDestroyed()&&!_)L.homeButton.destroy(),L._homeButton=void 0;else if(!F(L.homeButton)||L.homeButton.isDestroyed()){const Z=new q(B,L.scene);F(L.geocoder)&&((E=L._eventHelper)==null||E.add(Z.viewModel.command.afterExecute,function(){const H=L.geocoder.viewModel;H.searchText="",H.isSearchInProgress&&H.search()})),L._clearTrackedObject&&((A=L._eventHelper)==null||A.add(Z.viewModel.command.beforeExecute,L._clearTrackedObject,L)),L._homeButton=Z,C(B)}L.viewerWidgetResized.raiseEvent({type:"homeButton",status:_?"added":"removed",target:B})}),de(()=>e.sceneModePicker,_=>{const{viewer:E}=i,A=E._toolbar,{defined:L,DeveloperError:B,SceneModePicker:F}=Cesium;if(L(E.sceneModePicker)&&!E.sceneModePicker.isDestroyed()&&!_)E.sceneModePicker.destroy(),E._sceneModePicker=void 0;else if(!L(E.sceneModePicker)||E.sceneModePicker.isDestroyed()){if(e.sceneModePicker&&e.scene3DOnly)throw new B("options.sceneModePicker is not available when options.scene3DOnly is set to true.");if(!e.scene3DOnly&&e.sceneModePicker){const q=new F(A,E.scene);E._sceneModePicker=q,C(A)}}E.viewerWidgetResized.raiseEvent({type:"sceneModePicker",status:_?"added":"removed",target:A})}),de(()=>e.projectionPicker,_=>{const{viewer:E}=i,A=E._toolbar,{defined:L,ProjectionPicker:B}=Cesium;if(L(E.projectionPicker)&&!E.projectionPicker.isDestroyed()&&!_)E.projectionPicker.destroy(),E._projectionPicker=void 0;else if(!L(E.projectionPicker)||E.projectionPicker.isDestroyed()){const F=new B(A,E.scene);E._projectionPicker=F,C(A)}E.viewerWidgetResized.raiseEvent({type:"projectionPicker",status:_?"added":"removed",target:A})}),de(()=>e.baseLayerPicker,async _=>{const{viewer:E}=i,A=E._toolbar,{defined:L,buildModuleUrl:B,DeveloperError:F,defaultValue:q,createDefaultImageryProviderViewModels:Z,createDefaultTerrainProviderViewModels:H,BaseLayerPicker:V}=Cesium;if(L(E.baseLayerPicker)&&!E.baseLayerPicker.isDestroyed()&&!_){E.baseLayerPicker.destroy(),E._baseLayerPicker=void 0,E.imageryLayers.remove(E.imageryLayers.get(E.imageryLayers.length-1));const j=B("Assets/Textures/NaturalEarthII"),G=E.imageryLayers.addImageryProvider(nn(Cesium.VERSION,"1.104")?await Cesium.TileMapServiceImageryProvider.fromUrl(j):new Cesium.TileMapServiceImageryProvider({url:j}));E.imageryLayers.lowerToBottom(G)}else if(!L(E.baseLayerPicker)||E.baseLayerPicker.isDestroyed()){const j=(!Cesium.defined(E.scene.globe)||e.globe!==!1)&&(!Cesium.defined(E.baseLayerPicker)||e.baseLayerPicker!==!1);if(j&&L(e.imageryProvider))throw new F(`options.imageryProvider is not available when using the BaseLayerPicker widget.
Either specify options.selectedImageryProviderViewModel instead or set options.baseLayerPicker to false.`);if(!j&&L(e.selectedImageryProviderViewModel))throw new F(`options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget.
Either specify options.imageryProvider instead or set options.baseLayerPicker to true.`);if(j&&L(e.terrainProvider))throw new F(`options.terrainProvider is not available when using the BaseLayerPicker widget.
Either specify options.selectedTerrainProviderViewModel instead or set options.baseLayerPicker to false.`);if(!j&&L(e.selectedTerrainProviderViewModel))throw new F(`options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget.
Either specify options.terrainProvider instead or set options.baseLayerPicker to true.`);if(j){const G=q(e.imageryProviderViewModels,Z()),J=q(e.terrainProviderViewModels,H()),U=new V(A,{globe:E.scene.globe,imageryProviderViewModels:G,selectedImageryProviderViewModel:G[0],terrainProviderViewModels:J,selectedTerrainProviderViewModel:J[0]}),z=A==null?void 0:A.getElementsByClassName("cesium-baseLayerPicker-dropDown"),Y=z==null?void 0:z[0];E._baseLayerPickerDropDown=Y,E._baseLayerPicker=U,E.imageryLayers.raiseToTop(E.imageryLayers.get(0)),C(A)}}E.viewerWidgetResized.raiseEvent({type:"baseLayerPicker",status:_?"added":"removed",target:A})}),de(()=>e.navigationHelpButton,_=>{const{viewer:E}=i,A=E._toolbar,{defined:L,defaultValue:B,NavigationHelpButton:F}=Cesium;if(L(E.navigationHelpButton)&&!E.navigationHelpButton.isDestroyed()&&!_)E.navigationHelpButton.destroy(),E._navigationHelpButton=void 0;else if(!L(E.navigationHelpButton)||E.navigationHelpButton.isDestroyed()){let q=!0;try{if(L(window.localStorage)){const H=window.localStorage.getItem("cesium-hasSeenNavHelp");L(H)&&H?q=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch(H){}const Z=new F({container:A,instructionsInitiallyVisible:B(e.navigationInstructionsInitiallyVisible,q)});E._navigationHelpButton=Z,C(A)}E.viewerWidgetResized.raiseEvent({type:"navigationHelpButton",status:_?"added":"removed",target:A})}),de(()=>e.animation,_=>{const{viewer:E,viewerElement:A}=i,{defined:L,Animation:B,AnimationViewModel:F}=Cesium;let q;if(L(E.animation)&&!E.animation.isDestroyed()&&!_)q=E.animation.container,A==null||A.removeChild(q),E.animation.destroy(),E._animation=void 0;else if(!L(E.animation)||E.animation.isDestroyed()){q=document.createElement("div"),q.className="cesium-viewer-animationContainer",A==null||A.appendChild(q);const Z=new B(q,new F(E.clockViewModel));Z.viewModel.dateFormatter=N,Z.viewModel.timeFormatter=$,E._animation=Z}E.forceResize(),E.viewerWidgetResized.raiseEvent({type:"animation",status:_?"added":"removed",target:q})}),de(()=>e.timeline,_=>{var E;const{viewer:A,viewerElement:L}=i,{defined:B,Timeline:F}=Cesium;let q;if(B(A.timeline)&&!A.timeline.isDestroyed()&&!_)q=A.timeline.container,L==null||L.removeChild(q),A.timeline.destroy(),A._timeline=void 0;else if(!B(A.timeline)||A.timeline.isDestroyed()){q=document.createElement("div"),q.className="cesium-viewer-timelineContainer",L==null||L.appendChild(q);const Z=new F(q,A.clock);Z.makeLabel=H=>N(H),(E=Z.addEventListener)==null||E.call(Z,"settime",m,!1),Z.zoomTo(A.clock.startTime,A.clock.stopTime),A._timeline=Z}A.forceResize(),A.viewerWidgetResized.raiseEvent({type:"timeline",status:_?"added":"removed",target:q})}),de(()=>e.fullscreenButton,_=>{const{viewer:E,viewerElement:A}=i,{defined:L,FullscreenButton:B}=Cesium;let F;if(L(E.fullscreenButton)&&!E.fullscreenButton.isDestroyed()&&!_)F=E.fullscreenButton.container,A==null||A.removeChild(F),E.fullscreenButton.destroy(),E._fullscreenButton=void 0;else if(!L(E.fullscreenButton)||E.fullscreenButton.isDestroyed()){F=document.createElement("div"),F.className="cesium-viewer-fullscreenContainer",A==null||A.appendChild(F);const q=new B(F,A);E._fullscreenButton=q}E.forceResize(),E.viewerWidgetResized.raiseEvent({type:"fullscreenButton",status:_?"added":"removed",target:F})}),de(()=>e.fullscreenElement,_=>{const{viewer:E}=i,{defined:A}=Cesium;A(E.fullscreenButton)&&A(_)&&(E.fullscreenButton.viewModel.fullscreenElement=_)}),de(()=>e.vrButton,_=>{const{viewer:E,viewerElement:A}=i,{defined:L,VRButton:B}=Cesium;let F;if(L(E.vrButton)&&!E.vrButton.isDestroyed()&&!_)F=E.vrButton.container,A==null||A.removeChild(F),E.vrButton.destroy(),E._vrButton=void 0;else if(!L(E.vrButton)||E.vrButton.isDestroyed()){F=document.createElement("div"),F.className="cesium-viewer-vrContainer",A==null||A.appendChild(F);const q=new B(F,E.scene,A),Z=q.viewModel.command;q.viewModel._command=function(H){Z(),f(E,H.isVRMode)},E._vrButton=q}E.forceResize(),E.viewerWidgetResized.raiseEvent({type:"fullscreenButton",status:_?"added":"removed",target:F})}),de(()=>e.useDefaultRenderLoop,_=>{i.viewer.useDefaultRenderLoop=_}),de(()=>e.sceneMode,_=>{const{SceneMode:E}=Cesium;(E.COLUMBUS_VIEW===_||E.MORPHING===_||E.SCENE2D===_||E.SCENE3D===_)&&(i.viewer.scene.mode=_)}),de(()=>e.shouldAnimate,_=>{i.viewer.clock.shouldAnimate=_}),de(()=>e.terrainExaggeration,_=>{i.viewer._terrainExaggeration=_}),de(()=>e.shadows,_=>{i.viewer.scene.shadowMap.enabled=_}),de(()=>e.terrainProvider,_=>{_&&(i.viewer.terrainProvider=_)}),de(()=>e.camera,_=>{Ys(i.viewer,_)},{deep:!0}),de(()=>e.imageryProvider,(_,E)=>{const{viewer:A}=i,{defined:L}=Cesium;if(L(_)){for(let B=0;B<A.imageryLayers.length;B++)A.imageryLayers.get(B).imageryProvider===E&&A.imageryLayers.remove(A.imageryLayers[B]);_&&A.imageryLayers.addImageryProvider(_)}}),de(()=>e.showCredit,_=>{const{viewer:E}=i;E.cesiumWidget.creditContainer.style.display=_?"inline":"none",E.viewerWidgetResized.raiseEvent({type:"credit",status:_?"added":"removed",target:E.cesiumWidget.creditContainer})}),de(()=>e.debugShowFramesPerSecond,_=>{const{viewer:E}=i;E.scene.debugShowFramesPerSecond=_});const M=async function(){d.debug("beforeLoad - viewer"),Pe(i,"beforeLoad")&&c("beforeLoad",i),u.value.__scriptPromise=u.value.__scriptPromise||I(),await u.value.__scriptPromise},g=async function(){var _,E,A;if(d.debug("loading-viewer"),i.mounted||(await M(),typeof Cesium=="undefined"))return!1;const{Ion:L,buildModuleUrl:B,ImageryLayer:F,TileMapServiceImageryProvider:q,Viewer:Z,defined:H,Math:V,Event:j}=Cesium,G=e.accessToken?e.accessToken:u.value.accessToken;L.defaultAccessToken=G;const J=B("Assets/Textures/NaturalEarthII"),U={};e&&Object.keys(e).forEach(Q=>{e[Q]===void 0||e[Q]===null||(U[Q]=e[Q])}),U.fullscreenElement=Oo(U.fullscreenElement)?fe(a):U.fullscreenElement,nn(Cesium.VERSION,"1.104")?U.baseLayer=Oo(U.baseLayer)?F.fromProviderAsync(q.fromUrl(J),{}):U.baseLayer:U.imageryProvider=Oo(U.imageryProvider)?new q({url:J}):U.imageryProvider;let z;e.viewerCreator?z=e.viewerCreator(i,fe(a),U):globalThis.mars3d?(i.map=new mars3d.Map(fe(a).id,{scene:U,control:U}),z=(_=i.map)==null?void 0:_._viewer):globalThis.DC?(i.dcViewer=new DC.Viewer(fe(a).id,U),z=(E=i.dcViewer)==null?void 0:E.delegate):globalThis.XE?(i.earth=new globalThis.XE.Earth(fe(a),U),z=(A=i.earth)==null?void 0:A.czm.viewer):z=new Z(fe(a),U),y(z),i.Cesium=Cesium,i.viewer=z,i.viewerElement=z._element,i.mounted=!0,nn(Cesium.VERSION,"1.83")&&(z.scene.globe.terrainExaggeration=U.terrainExaggeration),H(U.camera)&&Ys(z,U.camera),Pe(i,"update:camera")&&z.camera.changed.addEventListener(()=>{const Q=z.camera.positionCartographic;let te;ze(U.camera.position,"lng")?te={position:{lng:V.toDegrees(Q.longitude),lat:V.toDegrees(Q.latitude),height:Q.height},heading:V.toDegrees(z.camera.heading||360),pitch:V.toDegrees(z.camera.pitch||-90),roll:V.toDegrees(z.camera.roll||0)}:te={position:{x:z.camera.position.x,y:z.camera.position.y,z:z.camera.position.z},heading:z.camera.heading||2*Math.PI,pitch:z.camera.pitch||-Math.PI/2,roll:z.camera.roll||0},c("update:camera",te)}),H(z.animation)&&(z.animation.viewModel.dateFormatter=N,z.animation.viewModel.timeFormatter=$),H(z.timeline)&&(z.timeline.makeLabel=Q=>N(Q),z.timeline.zoomTo(z.clock.startTime,z.clock.stopTime)),!e.showCredit&&(z.cesiumWidget.creditContainer.style.display="none"),e.debugShowFramesPerSecond&&(z.scene.debugShowFramesPerSecond=!0),z.viewerWidgetResized=z.viewerWidgetResized||new j,z.viewerWidgetResized.addEventListener(P),z.imageryLayers.layerAdded.addEventListener(k),h.registerEvents(!0);const Y={Cesium,viewer:z,vm:i};return globalThis.XE?Object.assign(Y,{earth:i.earth}):globalThis.mars3d?Object.assign(Y,{map:i.map}):globalThis.DC&&Object.assign(Y,{dcViewer:i.dcViewer}),Pe(i,"ready")&&c("ready",Y),l==null||l.emit("ready",Y),Be(()=>{z.resize(),P({type:"viewer",status:"added",target:z.container}),r.value=!0}),d.debug("loaded-viewer"),Object.assign(i.proxy,{cesiumObject:z}),Y},w=async function(){if(!i.mounted)return!1;d.debug("viewer---unloading");let _;u.value.__viewerUnloadingPromise=new Promise((q,Z)=>{_=q});for(let q=0;q<i.children.length;q++)await i.children[q].proxy.unload();i.children.length=0;const{viewer:E,earth:A,map:L,dcViewer:B}=i;globalThis.Cesium&&(E.imageryLayers.layerAdded.removeEventListener(k),h.registerEvents(!1));const{removeCesiumScript:F}=e;if(E._vcPickScreenSpaceEventHandler&&E._vcPickScreenSpaceEventHandler.destroy(),E._vcViewerScreenSpaceEventHandler&&E._vcViewerScreenSpaceEventHandler.destroy(),E._vcPickScreenSpaceEventHandler=void 0,E._vcViewerScreenSpaceEventHandler=void 0,F&&x(E),delete i.appContext.config.globalProperties.$VueCesium[E.container.id],globalThis.XE?A&&A.destroy():globalThis.mars3d?L&&L.destroy():globalThis.DC?B&&B.destroy():E&&E.destroy(),i.viewer=void 0,i.mounted=!1,F&&globalThis.Cesium){const q=document.getElementsByTagName("script"),Z=[];for(const V of q)V.src.indexOf("/Cesium.js")>-1&&Z.push(V),V.src.indexOf("/Workers/zlib.min.js")>-1&&Z.push(V),globalThis.XE&&(V.src.indexOf("/rxjs.umd.min.js")>-1&&Z.push(V),V.src.indexOf("/XbsjCesium.js")>-1&&Z.push(V),V.src.indexOf("/viewerCesiumNavigationMixin.js")>-1&&Z.push(V),V.src.indexOf("/XbsjEarth.js")>-1&&Z.push(V)),v.includes(V.src)&&!Z.includes(V)&&Z.push(V);const H=document.getElementsByTagName("link");for(const V of H)V.href.includes("Widgets/widgets.css")&&!Z.includes(V)&&Z.push(V),v.includes(V.href)&&!Z.includes(V)&&Z.push(V);Z.forEach(V=>{V.parentNode&&V.parentNode.removeChild(V)}),globalThis.Cesium&&(globalThis.Cesium=void 0),globalThis.XbsjCesium&&(globalThis.XbsjCesium=void 0),globalThis.XbsjEarth&&(globalThis.XbsjEarth=void 0),globalThis.XE&&(globalThis.XE=void 0),globalThis.mars3d&&(globalThis.mars3d=void 0),globalThis.DC&&(globalThis.DC=void 0),globalThis.DcCore&&(globalThis.DcCore=void 0),u.value.__scriptPromise=void 0,v=[]}return i.isUnmounted=!1,Pe(i,"destroyed")&&c("destroyed",i),l.emit("destroyed",i),d.debug("viewer---unloaded"),_(!0),u.value.__viewerUnloadingPromise=void 0,r.value=!1,!0},O=function(){return w().then(()=>g())},I=async function(){if(d.debug("getCesiumScript"),globalThis.Cesium)return Promise.resolve(globalThis.Cesium);{const _=e.cesiumPath?e.cesiumPath:u.value.cesiumPath,E=o1(_),A=u.value.mars3dConfig||e.mars3dConfig;if(A){const F=A.libs||U1(),q=(A.include||"mars3d").trim().split(","),Z={};for(let H=0,V=q.length;H<V;H++){const j=q[H];Z[j]||(Z[j]=!0,v.push(...F[j]))}}else _.includes("/dc.base.min.js")?(v.push(_),v.push(_.replace("/dc.base.min.js","/dc.core.min.js")),v.push(_.replace("/dc.base.min.js","/dc.core.min.js").replace("/dc.core.min.js","/dc.core.min.css"))):_.includes("/XbsjEarth.js")?v.push(_):(v.push(_),v.push(`${E}/Widgets/widgets.css`));const L=v;if(A){const F=v.find(q=>q.includes("Cesium.js"));await R(F),L.splice(L.indexOf(F),1)}const B=[];return L.forEach(F=>{new RegExp("\\.css").test(F)?B.push(D(F)):B.push(R(F))}),Promise.all(B).then(()=>{if(globalThis.Cesium)return Pe(i,"cesiumReady")&&c("cesiumReady",globalThis.Cesium),globalThis.Cesium;if(globalThis.XE)return globalThis.XE.ready().then(()=>(Pe(i,"cesiumReady")&&c("cesiumReady",globalThis.Cesium),globalThis.Cesium));if(globalThis.DC)return globalThis.DC.use(globalThis.DcCore.default||globalThis.DcCore),globalThis.DC.baseUrl=`${E}/resources/`,globalThis.DC.ready(()=>(globalThis.Cesium=DC.Namespace.Cesium,Pe(i,"cesiumReady")&&c("cesiumReady",globalThis.DC),globalThis.Cesium)),globalThis.Cesium;o(new Error("VueCesium ERROR: Error loading CesiumJS!"))})}},R=_=>{const E=document.createElement("script");return E.async=!1,E.src=_,document.body.appendChild(E),new Promise((A,L)=>{E.onload=()=>{A(!0)}})},D=_=>{const E=document.createElement("link");return E.rel="stylesheet",E.href=_,document.head.appendChild(E),new Promise((A,L)=>{E.onload=()=>{A(!0)}})},P=_=>{var E,A;const{viewer:L}=i,B=L._toolbar;B!==void 0&&getComputedStyle(B).visibility!=="hidden"&&getComputedStyle(B).display!=="none"?p.toolbarContainerRC=B.getBoundingClientRect():p.toolbarContainerRC=void 0;const F=L.bottomContainer;F!==void 0&&getComputedStyle(F).visibility!=="hidden"&&getComputedStyle(F).display!=="none"?p.bottomContainerRC=F.getBoundingClientRect():p.bottomContainerRC=void 0;const q=(E=L.timeline)==null?void 0:E.container;q!==void 0&&getComputedStyle(q).visibility!=="hidden"&&getComputedStyle(q).display!=="none"?p.timelineContainerRC=q.getBoundingClientRect():p.timelineContainerRC=void 0;const Z=(A=L.animation)==null?void 0:A.container;Z!==void 0&&getComputedStyle(Z).visibility!=="hidden"&&getComputedStyle(Z).display!=="none"?p.animationContainerRC=Z.getBoundingClientRect():p.animationContainerRC=void 0,L.resize(),Pe(i,"viewerWidgetResized")&&c("viewerWidgetResized",_)},k=_=>{const E=i.viewer,{autoSortImageryLayers:A}=e;E.baseLayerPicker&&E.imageryLayers.raiseToTop(_);const{defined:L}=Cesium;A&&(_.sortOrder=L(_.sortOrder)?_.sortOrder:9999,E.imageryLayers._layers.sort((B,F)=>B.sortOrder-F.sortOrder),E.imageryLayers._update())},N=function(_,E,A){const{JulianDate:L}=Cesium;let B;if(e.UTCOffset){_=L.addMinutes(_,e.UTCOffset,new L);const H=new Date().getTimezoneOffset()-e.UTCOffset;B=H===0?"UTC":"UTC+"+-(H/60)}else B=new Date().getTimezoneOffset()===0?"UTC":"UTC+"+-(new Date().getTimezoneOffset()/60);const F=L.toDate(_),q=F.toLocaleString(b("name"),{hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).replace(/,/g,""),Z=F.toLocaleString(b("name"),{year:"numeric",month:"short",day:"numeric"}).replace(/,/g,"");return!A&&(E||F.getHours()+F.getMinutes()===0)?Z:(e.TZCode&&(B=e.TZCode),A?`${q} ${B}`:`${Z} ${q} ${B}`)},$=function(_,E){return N(_,E,!0)},m=function(_){const E=_.clock;E.currentTime=_.timeJulian,E.shouldAnimate=!1},f=function(_,E){const A=_._geocoder,L=_._homeButton,B=_._sceneModePicker,F=_._projectionPicker,q=_._baseLayerPicker,Z=_._animation,H=_._timeline,V=_._fullscreenButton,j=_._infoBox,G=_._selectionIndicator,J=E?"hidden":"visible",{defined:U}=Cesium;if(U(A)&&(A.container.style.visibility=J),U(L)&&(L.container.style.visibility=J),U(B)&&(B.container.style.visibility=J),U(F)&&(F.container.style.visibility=J),U(q)&&(q.container.style.visibility=J),U(Z)&&(Z.container.style.visibility=J),U(H)&&(H.container.style.visibility=J),U(V)&&V.viewModel.isFullscreenEnabled&&(V.container.style.visibility=J),U(j)&&(j.container.style.visibility=J),U(G)&&(G.container.style.visibility=J),_._container){const z=E||!U(V)?0:V.container.clientWidth;_._vrButton.container.style.right=z+"px",_.forceResize()}},C=function(_,E){Array.prototype.slice.call(_.children).forEach(L=>{switch(L.className){case"cesium-viewer-geocoderContainer":L.customIndex=1;break;case"cesium-button cesium-toolbar-button cesium-home-button":L.customIndex=2;break;case"cesium-sceneModePicker-wrapper cesium-toolbar-button":L.customIndex=3;break;case"cesium-projectionPicker-wrapper cesium-toolbar-button":L.customIndex=4;break;case"cesium-button cesium-toolbar-button":case"cesium-baseLayerPicker-dropDown":L.customIndex=5;break;case"cesium-navigationHelpButton-wrapper":L.customIndex=6;break}});const A=[];Array.prototype.slice.call(_.children).forEach(L=>{A.push(L)}),A.sort(function(L,B){return L.customIndex-B.customIndex});for(let L=0;L<A.length;L++)_.appendChild(A[L])},T=function(){return On({},{get layout(){return p},get vm(){return i},get Cesium(){return i.Cesium},get viewer(){return i.viewer},get dataSources(){var _;return(_=i.viewer)==null?void 0:_.dataSources},get entities(){var _;return(_=i.viewer)==null?void 0:_.entities},get imageryLayers(){var _;return(_=i.viewer)==null?void 0:_.imageryLayers},get primitives(){var _;return(_=i.viewer)==null?void 0:_.scene.primitives},get groundPrimitives(){var _;return(_=i.viewer)==null?void 0:_.scene.groundPrimitives},get postProcessStages(){var _;return(_=i.viewer)==null?void 0:_.postProcessStages},get creatingPromise(){return s},get mars3dMap(){return i.map},get dcViewer(){return i.dcViewer},get earth(){return i.earth}})};return Object.defineProperties(i,{cesiumObject:{enumerable:!0,get:()=>i.viewer}}),Eo(async()=>{var _;try{d.debug("viewer - onMounted"),await((_=u.value)==null?void 0:_.__viewerUnloadingPromise),g().then(E=>{n(E)}).catch(E=>{c("unready",E),o(E)})}catch(E){c("unready",E),o(E)}}),nt(()=>{d.debug("viewer - onUnmounted"),w().then(()=>{l.all.clear()})}),{isReady:r,load:g,unload:w,reload:O,getServices:T,viewerRef:a,creatingPromise:s}}const Bd=[{name:"imageryLayers",events:["layerAdded","layerMoved","layerRemoved","layerShownOrHidden"]},{name:"dataSources",events:["dataSourceAdded","dataSourceMoved","dataSourceRemoved"]},{name:"entities",events:["collectionChanged"]},{name:"scene",events:["morphComplete","morphStart","postRender","postUpdate","preRender","preUpdate","renderError","terrainProviderChanged"]},{name:"camera",events:["changed","moveEnd","moveStart"]},{name:"clock",events:["onStop","onTick"]},{name:"terrainProvider",events:["errorEvent"]},{name:["infoBox","viewModel"],events:["cameraClicked","closeClicked"]},{name:["scene","globe"],events:["imageryLayersUpdatedEvent","terrainProviderChanged","tileLoadProgressEvent"]}],bC=Qr.map(e=>Jc(e)),CC=["beforeLoad","cesiumReady","ready","destroyed","update:camera","viewerWidgetResized",...Qr,...bC,...Yu];Bd.reduce((e,t)=>e.concat(t.events),CC);const yl={xs:18,sm:24,md:32,lg:38,xl:46},Ld={size:String};function jd(e,t=yl){return ae(()=>e.size!==void 0?{fontSize:e.size in t?`${t[e.size]}px`:e.size}:null)}function Je(e,t){return e!==void 0?e():t}function Ei(e,t){return e!==void 0?t.concat(e()):t}function Fd(e,t,i,n,o,s){t.key=n+o;const a=S(e,t,i);return o===!0?Qc(a,s()):a}const kd={...Ld,tag:{type:String,default:"i"},name:String,color:String,hoverColor:String,left:Boolean,right:Boolean};var io=K({name:"VcIcon",props:kd,setup(e,{slots:t}){const i=jd(e),n=ae(()=>{const a=i.value;if(a)return e.color&&(a.color=e.color),e.hoverColor&&(a["--hover-color"]=e.hoverColor),a}),o=ae(()=>"vc-icon"+(e.left===!0?" on-left":"")+(e.right===!0?" on-right":"")+(e.color!==void 0?` text-${e.color}`:"")),s=ae(()=>{let a,r=e.name;if(!r)return{none:!0,cls:o.value};if(r.startsWith("M")===!0){const[c,u]=r.split("|");return{svg:!0,cls:o.value,nodes:c.split("&&").map(d=>{const[h,p,v]=d.split("@@");return S("path",{style:p,d:h,transform:v})}),viewBox:u!==void 0?u:"0 0 24 24"}}if(r.startsWith("img:")===!0)return{img:!0,cls:o.value,src:r.substring(4)};if(r.startsWith("svguse:")===!0){const[c,u]=r.split("|");return{svguse:!0,cls:o.value,src:c.substring(7),viewBox:u!==void 0?u:"0 0 24 24"}}let l=" ";return/^[l|f]a[s|r|l|b|d]{0,1} /.test(r)||r.startsWith("icon-")===!0?a=r:r.startsWith("bt-")===!0?a=`bt ${r}`:r.startsWith("eva-")===!0?a=`eva ${r}`:/^ion-(md|ios|logo)/.test(r)===!0?a=`ionicons ${r}`:r.startsWith("ion-")===!0?a=`ionicons ion-md${r.substr(3)}`:r.startsWith("mdi-")===!0?a=`mdi ${r}`:r.startsWith("iconfont ")===!0?a=`${r}`:r.startsWith("ti-")===!0?a=`themify-icon ${r}`:r.startsWith("vc-")===!0?a=`vc-icons ${r}`:(a="notranslate material-icons",r.startsWith("o_")===!0?(r=r.substring(2),a+="-outlined"):r.startsWith("r_")===!0?(r=r.substring(2),a+="-round"):r.startsWith("s_")===!0&&(r=r.substring(2),a+="-sharp"),l=r),{cls:a+" "+o.value,content:l}});return()=>{const a={class:s.value.cls,style:n.value,"aria-hidden":"true",role:"presentation",viewBox:"",src:""};return s.value.none===!0?S(e.tag,a,Je(t.default)):s.value.img===!0?(a.src=s.value.src,a.style&&(a.style.width=a.style.fontSize,a.style.height=a.style.fontSize),S("img",a)):s.value.svg===!0?(a.viewBox=s.value.viewBox,a["aria-hidden"]="true",a.style&&(a.style.width=a.style.fontSize,a.style.height=a.style.fontSize),S("svg",a,Ei(t.default,s.value.nodes))):s.value.svguse===!0?(a.viewBox=s.value.viewBox,a["aria-hidden"]="true",a.style&&(a.style.width=a.style.fontSize,a.style.height=a.style.fontSize),S("svg",a,Ei(t.default,[S("use",{"xlink:href":s.value.src})]))):S(e.tag,a,Ei(t.default,[s.value.content]))}}});const Mi={size:{type:[Number,String],default:"1em"},color:String};function Oi(e){return{cSize:ae(()=>e.size in yl?`${yl[e.size]}px`:e.size),classes:ae(()=>"vc-spinner"+(e.color?` text-${e.color}`:""))}}const wC=[S("g",{transform:"translate(1 1)","stroke-width":"2",fill:"none","fill-rule":"evenodd"},[S("circle",{cx:"5",cy:"50",r:"5"},[S("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;5;50;50",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"cx",begin:"0s",dur:"2.2s",values:"5;27;49;5",calcMode:"linear",repeatCount:"indefinite"})]),S("circle",{cx:"27",cy:"5",r:"5"},[S("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",from:"5",to:"5",values:"5;50;50;5",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"cx",begin:"0s",dur:"2.2s",from:"27",to:"27",values:"27;49;5;27",calcMode:"linear",repeatCount:"indefinite"})]),S("circle",{cx:"49",cy:"50",r:"5"},[S("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;50;5;50",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"cx",from:"49",to:"49",begin:"0s",dur:"2.2s",values:"49;5;27;49",calcMode:"linear",repeatCount:"indefinite"})])])];var bl=K({name:"VcSpinnerBall",props:Mi,setup(e){const{cSize:t,classes:i}=Oi(e);return()=>S("svg",{class:i.value,stroke:"currentColor",width:t.value,height:t.value,viewBox:"0 0 57 57",xmlns:"http://www.w3.org/2000/svg"},wC)}});const _C=[S("rect",{y:"10",width:"15",height:"120",rx:"6"},[S("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),S("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},[S("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),S("rect",{x:"60",width:"15",height:"140",rx:"6"},[S("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),S("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},[S("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),S("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},[S("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})])];var Cl=K({name:"VcSpinnerBars",props:Mi,setup(e){const{cSize:t,classes:i}=Oi(e);return()=>S("svg",{class:i.value,fill:"currentColor",width:t.value,height:t.value,viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg"},_C)}});const xC=[S("circle",{cx:"15",cy:"15",r:"15"},[S("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})]),S("circle",{cx:"60",cy:"15",r:"9","fill-opacity":".3"},[S("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"fill-opacity",from:".5",to:".5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})]),S("circle",{cx:"105",cy:"15",r:"15"},[S("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})])];var wl=K({name:"VcSpinnerDots",props:Mi,setup(e){const{cSize:t,classes:i}=Oi(e);return()=>S("svg",{class:i.value,fill:"currentColor",width:t.value,height:t.value,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg"},xC)}});const EC=[S("g",{transform:"translate(-20,-20)"},[S("path",{d:"M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z",fill:"currentColor"},[S("animateTransform",{attributeName:"transform",type:"rotate",from:"90 50 50",to:"0 50 50",dur:"1s",repeatCount:"indefinite"})])]),S("g",{transform:"translate(20,20) rotate(15 50 50)"},[S("path",{d:"M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z",fill:"currentColor"},[S("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:"90 50 50",dur:"1s",repeatCount:"indefinite"})])])];var _l=K({name:"VcSpinnerGears",props:Mi,setup(e){const{cSize:t,classes:i}=Oi(e);return()=>S("svg",{class:i.value,width:t.value,height:t.value,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"},EC)}});const MC=[S("g",[S("path",{fill:"none",stroke:"currentColor","stroke-width":"5","stroke-miterlimit":"10",d:"M58.4,51.7c-0.9-0.9-1.4-2-1.4-2.3s0.5-0.4,1.4-1.4 C70.8,43.8,79.8,30.5,80,15.5H70H30H20c0.2,15,9.2,28.1,21.6,32.3c0.9,0.9,1.4,1.2,1.4,1.5s-0.5,1.6-1.4,2.5 C29.2,56.1,20.2,69.5,20,85.5h10h40h10C79.8,69.5,70.8,55.9,58.4,51.7z"}),S("clipPath",{id:"uil-hourglass-clip1"},[S("rect",{x:"15",y:"20",width:" 70",height:"25"},[S("animate",{attributeName:"height",from:"25",to:"0",dur:"1s",repeatCount:"indefinite",values:"25;0;0",keyTimes:"0;0.5;1"}),S("animate",{attributeName:"y",from:"20",to:"45",dur:"1s",repeatCount:"indefinite",values:"20;45;45",keyTimes:"0;0.5;1"})])]),S("clipPath",{id:"uil-hourglass-clip2"},[S("rect",{x:"15",y:"55",width:" 70",height:"25"},[S("animate",{attributeName:"height",from:"0",to:"25",dur:"1s",repeatCount:"indefinite",values:"0;25;25",keyTimes:"0;0.5;1"}),S("animate",{attributeName:"y",from:"80",to:"55",dur:"1s",repeatCount:"indefinite",values:"80;55;55",keyTimes:"0;0.5;1"})])]),S("path",{d:"M29,23c3.1,11.4,11.3,19.5,21,19.5S67.9,34.4,71,23H29z","clip-path":"url(#uil-hourglass-clip1)",fill:"currentColor"}),S("path",{d:"M71.6,78c-3-11.6-11.5-20-21.5-20s-18.5,8.4-21.5,20H71.6z","clip-path":"url(#uil-hourglass-clip2)",fill:"currentColor"}),S("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 50",to:"180 50 50",repeatCount:"indefinite",dur:"1s",values:"0 50 50;0 50 50;180 50 50",keyTimes:"0;0.7;1"})])];var xl=K({name:"VcSpinnerHourglass",props:Mi,setup(e){const{cSize:t,classes:i}=Oi(e);return()=>S("svg",{class:i.value,width:t.value,height:t.value,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"},MC)}});const OC=[S("g",{"stroke-width":"4","stroke-linecap":"round"},[S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(180)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:"1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(210)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:"0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(240)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".1;0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(270)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".15;.1;0;1;.85;.7;.65;.55;.45;.35;.25;.15",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(300)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".25;.15;.1;0;1;.85;.7;.65;.55;.45;.35;.25",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(330)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".35;.25;.15;.1;0;1;.85;.7;.65;.55;.45;.35",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(0)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".45;.35;.25;.15;.1;0;1;.85;.7;.65;.55;.45",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(30)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".55;.45;.35;.25;.15;.1;0;1;.85;.7;.65;.55",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(60)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".65;.55;.45;.35;.25;.15;.1;0;1;.85;.7;.65",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(90)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".7;.65;.55;.45;.35;.25;.15;.1;0;1;.85;.7",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(120)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:".85;.7;.65;.55;.45;.35;.25;.15;.1;0;1;.85",repeatCount:"indefinite"})]),S("line",{y1:"17",y2:"29",transform:"translate(32,32) rotate(150)"},[S("animate",{attributeName:"stroke-opacity",dur:"750ms",values:"1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1",repeatCount:"indefinite"})])])];var El=K({name:"VcSpinnerIos",props:Mi,setup(e){const{cSize:t,classes:i}=Oi(e);return()=>S("svg",{class:i.value,width:t.value,height:t.value,stroke:"currentColor",fill:"currentColor",viewBox:"0 0 64 64"},OC)}});const PC=[S("circle",{cx:"50",cy:"50",r:"44",fill:"none","stroke-width":"4","stroke-opacity":".5",stroke:"currentColor"}),S("circle",{cx:"8",cy:"54",r:"6",fill:"currentColor","stroke-width":"3",stroke:"currentColor"},[S("animateTransform",{attributeName:"transform",type:"rotate",from:"0 50 48",to:"360 50 52",dur:"2s",repeatCount:"indefinite"})])];var Ml=K({name:"VcSpinnerOrbit",props:Mi,setup(e){const{cSize:t,classes:i}=Oi(e);return()=>S("svg",{class:i.value,width:t.value,height:t.value,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"},PC)}});const SC=[S("g",{transform:"translate(1 1)","stroke-width":"2",fill:"none","fill-rule":"evenodd"},[S("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),S("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[S("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])];var Ol=K({name:"VcSpinnerOval",props:Mi,setup(e){const{cSize:t,classes:i}=Oi(e);return()=>S("svg",{class:i.value,stroke:"currentColor",width:t.value,height:t.value,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg"},SC)}});const TC=[S("g",{fill:"none","fill-rule":"evenodd","stroke-width":"2"},[S("circle",{cx:"22",cy:"22",r:"1"},[S("animate",{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),S("animate",{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})]),S("circle",{cx:"22",cy:"22",r:"1"},[S("animate",{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),S("animate",{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})])])];var Pl=K({name:"VcSpinnerPuff",props:Mi,setup(e){const{cSize:t,classes:i}=Oi(e);return()=>S("svg",{class:i.value,stroke:"currentColor",width:t.value,height:t.value,viewBox:"0 0 44 44",xmlns:"http://www.w3.org/2000/svg"},TC)}});const IC=[S("g",{fill:"none","fill-rule":"evenodd",transform:"translate(1 1)","stroke-width":"2"},[S("circle",{cx:"22",cy:"22",r:"6"},[S("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]),S("circle",{cx:"22",cy:"22",r:"6"},[S("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),S("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]),S("circle",{cx:"22",cy:"22",r:"8"},[S("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})])])];var Sl=K({name:"VcSpinnerRings",props:Mi,setup(e){const{cSize:t,classes:i}=Oi(e);return()=>S("svg",{class:i.value,stroke:"currentColor",width:t.value,height:t.value,viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg"},IC)}});const AC=[S("defs",[S("linearGradient",{x1:"8.042%",y1:"0%",x2:"65.682%",y2:"23.865%",id:"a"},[S("stop",{"stop-color":"currentColor","stop-opacity":"0",offset:"0%"}),S("stop",{"stop-color":"currentColor","stop-opacity":".631",offset:"63.146%"}),S("stop",{"stop-color":"currentColor",offset:"100%"})])]),S("g",{transform:"translate(1 1)",fill:"none","fill-rule":"evenodd"},[S("path",{d:"M36 18c0-9.94-8.06-18-18-18",stroke:"url(#a)","stroke-width":"2"},[S("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"})]),S("circle",{fill:"currentColor",cx:"36",cy:"18",r:"1"},[S("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"})])])];var Tl=K({name:"VcSpinnerTail",props:Mi,setup(e){const{cSize:t,classes:i}=Oi(e);return()=>S("svg",{class:i.value,width:t.value,height:t.value,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg"},AC)}}),as=K({name:"VcSpinner",props:{...Mi,thickness:{type:Number,default:5}},setup(e){const{cSize:t,classes:i}=Oi(e);return()=>S("svg",{class:i.value+" vc-spinner-mat",width:t.value,height:t.value,viewBox:"25 25 50 50"},[S("circle",{class:"path",cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":e.thickness,"stroke-miterlimit":"10"})])}});const Rd={left:"start",center:"center",right:"end",between:"between",around:"around",evenly:"evenly",stretch:"stretch"},BC=Object.keys(Rd),LC={align:{type:String,validator:e=>BC.includes(e)}};function jC(e){return ae(()=>{const t=e.align===void 0?e.vertical===!0?"stretch":"left":e.align;return`${e.vertical===!0?"items":"justify"}-${Rd[t]}`})}const $d={none:0,xs:4,sm:8,md:16,lg:24,xl:32},FC={xs:8,sm:10,md:14,lg:20,xl:24},kC={...Ld,type:{type:String,default:"button"},label:[Number,String],icon:String,iconRight:String,round:Boolean,outline:Boolean,flat:Boolean,unelevated:Boolean,rounded:Boolean,push:Boolean,glossy:Boolean,size:String,fab:Boolean,fabMini:Boolean,padding:String,color:String,textColor:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,tabindex:[Number,String],ripple:{type:[Boolean,Object],default:!0},align:{...LC.align,default:"center"},stack:Boolean,stretch:Boolean,loading:{type:Boolean,default:null},disable:Boolean};function RC(e){const t=jd(e,FC),i=jC(e),n=ae(()=>{const d=e.fab===!1&&e.fabMini===!1?t.value:{};return e.padding!==void 0?Object.assign({},d,{padding:e.padding.split(/\s+/).map(h=>h in $d?$d[h]+"px":h).join(" "),minWidth:"0",minHeight:"0"}):d}),o=ae(()=>e.rounded===!0||e.fab===!0||e.fabMini===!0),s=ae(()=>e.disable!==!0&&e.loading!==!0),a=ae(()=>s.value===!0?e.tabindex||0:-1),r=ae(()=>e.flat===!0?"flat":e.outline===!0?"outline":e.push===!0?"push":e.unelevated===!0?"unelevated":"standard"),l=ae(()=>{const d={tabindex:a.value};return e.type!=="a"&&(d.type=e.type),d.role=e.type==="a"?"link":"button",e.loading===!0&&e.percentage!==void 0&&Object.assign(d,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e.percentage}),e.disable===!0&&(d.disabled="",d["aria-disabled"]="true"),d}),c=ae(()=>{let d;return e.color!==void 0?e.flat===!0||e.outline===!0?d=`text-${e.textColor||e.color}`:d=`bg-${e.color} text-${e.textColor||"white"}`:e.textColor&&(d=`text-${e.textColor}`),`vc-btn--${r.value} vc-btn--${e.round===!0?"round":`rectangle${o.value===!0?" vc-btn--rounded":""}`}`+(d!==void 0?" "+d:"")+(s.value===!0?" vc-btn--actionable vc-focusable vc-hoverable":e.disable===!0?" disabled":"")+(e.fab===!0?" vc-btn--fab":e.fabMini===!0?" vc-btn--fab-mini":"")+(e.noCaps===!0?" vc-btn--no-uppercase":"")+(e.dense===!0?" vc-btn--dense":"")+(e.stretch===!0?" no-border-radius self-stretch":"")+(e.glossy===!0?" glossy":"")}),u=ae(()=>i.value+(e.stack===!0?" column":" row")+(e.noWrap===!0?" no-wrap text-no-wrap":"")+(e.loading===!0?" vc-btn__content--hidden":""));return{classes:c,style:n,innerClasses:u,attributes:l,isActionable:s}}const{passiveCapture:Pi}=hn;let no,oo,ao;const Nd={...kC,percentage:{type:Number,default:0},darkPercentage:Boolean};var ss=K({name:"VcBtn",props:Nd,emits:["click","keydown","touchstart","mousedown","keyup"],setup(e,{slots:t,emit:i}){var n;const o=(n=oe())==null?void 0:n.proxy,{classes:s,style:a,innerClasses:r,attributes:l,isActionable:c}=RC(e),u=ee(),d=ee();let h=null,p,v;const b=ae(()=>e.label!==void 0&&e.label!==null&&e.label!==""),y=ae(()=>e.ripple===!1?!1:{keyCodes:13,...e.ripple===!0?{}:e.ripple}),x=ae(()=>{const $=Math.max(0,Math.min(100,e.percentage));return $>0?{transition:"transform 0.6s",transform:`translateX(${$-100}%)`}:{}}),M=ae(()=>e.loading===!0?{onMousedown:N,onTouchstart:N,onClick:N,onKeydown:N,onKeyup:N}:c.value===!0?{onClick:O,onKeydown:I,onMousedown:D,onTouchstart:R}:{}),g=ae(()=>[[id,y.value,void 0,{center:e.round}]]),w=ae(()=>({ref:u,class:"vc-btn vc-btn-item non-selectable no-outline "+s.value,style:a.value,...l.value,...M.value}));function O($){var m;if($!==void 0){if($.defaultPrevented===!0)return;const f=document.activeElement;if(e.type==="submit"&&f!==document.body&&((m=u.value)==null?void 0:m.contains(f))===!1&&(f==null?void 0:f.contains(u.value))===!1){u.value.focus();const C=()=>{document.removeEventListener("keydown",Wi,!0),document.removeEventListener("keyup",C,Pi),u.value!==null&&u.value.removeEventListener("blur",C,Pi)};document.addEventListener("keydown",Wi,!0),document.addEventListener("keyup",C,Pi),u.value.addEventListener("blur",C,Pi)}}i("click",$,()=>{})}function I($){var m,f,C;Wo($,[13,32])===!0&&(Wi($),oo!==u.value&&(oo!==null&&k(),(m=u.value)==null||m.focus(),oo=u.value,(f=u.value)==null||f.classList.add("vc-btn--active"),document.addEventListener("keyup",P,!0),(C=u.value)==null||C.addEventListener("blur",P,Pi))),i("keydown",$)}function R($){no!==u.value&&(no!==null&&k(),no=u.value,h=tl($.target),h==null||h.addEventListener("touchcancel",P,Pi),h==null||h.addEventListener("touchend",P,Pi)),p=!0,clearTimeout(v),v=setTimeout(()=>{p=!1},200),i("touchstart",$)}function D($){var m;ao!==u.value&&(ao!==null&&k(),ao=u.value,(m=u.value)==null||m.classList.add("vc-btn--active"),document.addEventListener("mouseup",P,Pi)),$.qSkipRipple=p===!0,i("mousedown",$)}function P($){var m;if(!($!==void 0&&$.type==="blur"&&document.activeElement===u.value)){if($!==void 0&&$.type==="keyup"){if(oo===u.value&&Wo($,[13,32])===!0){const f=new MouseEvent("click",$);f.qKeyEvent=!0,$.defaultPrevented===!0&&Rn(f),$.cancelBubble===!0&&Ho(f),(m=u.value)==null||m.dispatchEvent(f),Wi($),$.qKeyEvent=!0}i("keyup",$)}k()}}function k($){const m=d.value;$!==!0&&(no===u.value||ao===u.value)&&m!==null&&m!==document.activeElement&&(m.setAttribute("tabindex","-1"),m.focus()),no===u.value&&(h!==null&&(h.removeEventListener("touchcancel",P,Pi),h.removeEventListener("touchend",P,Pi)),no=h=null),ao===u.value&&(document.removeEventListener("mouseup",P,Pi),ao=null),oo===u.value&&(document.removeEventListener("keyup",P,!0),u.value!==null&&u.value.removeEventListener("blur",P,Pi),oo=null),u.value!==null&&u.value.classList.remove("vc-btn--active")}function N($){Wi($),$.qSkipRipple=!0}return un(()=>{k(!0)}),Object.assign(o,{click:O}),()=>{let $=[];e.icon!==void 0&&$.push(S(io,{name:e.icon,left:e.stack===!1&&b.value===!0,role:"img","aria-hidden":"true"})),b.value===!0&&$.push(S("span",{class:"block"},[e.label])),$=Ei(t.default,$),e.iconRight!==void 0&&e.round===!1&&$.push(S(io,{name:e.iconRight,right:e.stack===!1&&b.value===!0,role:"img","aria-hidden":"true"}));const m=[S("span",{class:"vc-focus-helper",ref:d})];return e.loading===!0&&e.percentage!==void 0&&m.push(S("span",{class:"vc-btn__progress absolute-full overflow-hidden"},[S("span",{class:"vc-btn__progress-indicator fit block"+(e.darkPercentage===!0?" vc-btn__progress--dark":""),style:x.value})])),m.push(S("span",{class:"vc-btn__content text-center col items-center vc-anchor--skip "+r.value},$)),e.loading!==null&&m.push(S(Zc,{name:"vc-transition--fade"},()=>e.loading===!0?[S("span",{key:"loading",class:"absolute-full flex flex-center"},t.loading!==void 0?t.loading():[S(as)])]:null)),Fd("button",w.value,m,"ripple",e.disable!==!0&&e.ripple!==!1,()=>g.value)}}});const $C={target:{type:[Boolean,String],default:!0},noParentEvent:Boolean,contextMenu:Boolean};function NC({showing:e,avoidEmit:t,configureAnchorEl:i}){const{props:n,proxy:o,emit:s}=oe(),a=ee(null);let r;function l(p){return a.value===null?!1:p===void 0||p.touches===void 0||p.touches.length<=1}const c={};i===void 0&&(Object.assign(c,{hide(p){o.hide(p)},toggle(p){o.toggle(p)},toggleKey(p){Wo(p,13)===!0&&o.toggle(p)},contextClick(p){o.hide(p),Be(()=>{o.show(p)}),Rn(p)},mobilePrevent:Rn,mobileTouch(p){var v;if(c.mobileCleanup(p),l(p)!==!0)return;o.hide(p),(v=a.value)==null||v.classList.add("non-selectable");const b=tl(p.target);Tt(c,"anchor",[[b,"touchmove","mobileCleanup","passive"],[b,"touchend","mobileCleanup","passive"],[b,"touchcancel","mobileCleanup","passive"],[a.value,"contextmenu","mobilePrevent","notPassive"]]),r=setTimeout(()=>{o.show(p)},300)},mobileCleanup(p){a.value.classList.remove("non-selectable"),clearTimeout(r),e.value===!0&&p!==void 0&&qi()}}),i=function(p=n.contextMenu){if(n.noParentEvent===!0||a.value===null)return;let v;p===!0?ct().isPhone===!0?v=[[a.value,"touchstart","mobileTouch","passive"]]:v=[[a.value,"click","hide","passive"],[a.value,"contextmenu","contextClick","notPassive"]]:v=[[a.value,"click","toggle","passive"],[a.value,"keyup","toggleKey","passive"]],Tt(c,"anchor",v)});function u(){hi(c,"anchor")}function d(p){for(a.value=p;a.value.classList.contains("vc-anchor--skip");)a.value=a.value.parentNode;i()}function h(){if(n.target===!1||n.target==="")a.value=null;else if(n.target===!0)d(o==null?void 0:o.$el.parentNode);else{let p=n.target;if(typeof n.target=="string")try{p=document.querySelector(n.target)}catch(v){p=void 0}p!=null?(a.value=p.$el||p,i()):(a.value=null,console.error(`Anchor: target "${n.target}" not found`))}}return de(()=>n.contextMenu,p=>{a.value!==null&&(u(),i(p))}),de(()=>n.target,()=>{a.value!==null&&u(),h()}),de(()=>n.noParentEvent,p=>{a.value!==null&&(p===!0?u():i())}),Eo(()=>{h(),t!==!0&&n.modelValue===!0&&a.value===null&&s("update:modelValue",!1)}),un(()=>{clearTimeout(r),u()}),{anchorEl:a,canShow:l,anchorEvents:c}}function VC(e,t){const i=ee(null);let n;function o(r,l){const c=`${l!==void 0?"add":"remove"}EventListener`,u=l!==void 0?l:n;r!==window&&r[c]("scroll",u,hn.passive),window[c]("scroll",u,hn.passive),n=l}function s(){i.value!==null&&(o(i.value),i.value=null)}const a=de(()=>e.noParentEvent,()=>{i.value!==null&&(s(),t())});return un(a),{localScrollTarget:i,unconfigureScrollTarget:s,changeScrollEvent:o}}const Vd={modelValue:{type:Boolean,default:null}},zd=["update:modelValue","before-show","show","before-hide","hide"];function Gd({showing:e,canShow:t=void 0,hideOnRouteChange:i=void 0,handleShow:n=void 0,handleHide:o=void 0,processOnMount:s=void 0}){const a=oe(),{props:r,emit:l,proxy:c}=a;let u;function d(M){(e==null?void 0:e.value)===!0?v(M):h(M)}function h(M){if(r.disable===!0||t!==void 0&&t(M)!==!0)return;const g=qs(a,"onUpdate:modelValue")===!0;g===!0&&(l("update:modelValue",!0),u=M,Be(()=>{u===M&&(u=void 0)})),(r.modelValue===null||g===!1)&&p(M)}function p(M){(e==null?void 0:e.value)!==!0&&(e&&(e.value=!0),l("before-show",M),!(M&&M.cancel===!0)&&(n!==void 0?n(M):l("show",M)))}function v(M){if(r.disable===!0)return;const g=qs(a,"onUpdate:modelValue")===!0;g===!0&&(l("update:modelValue",!1),u=M,Be(()=>{u===M&&(u=void 0)})),(r.modelValue===null||g===!1)&&b(M)}function b(M){(e==null?void 0:e.value)!==!1&&(e&&(e.value=!1),l("before-hide",M),o!==void 0?o(M):l("hide",M))}function y(M){r.disable===!0&&M===!0?qs(a,"onUpdate:modelValue")===!0&&l("update:modelValue",!1):M===!0!==(e==null?void 0:e.value)&&(M===!0?p:b)(u)}de(()=>r.modelValue,y),i!==void 0&&h1(a)===!0&&de(()=>c.$route,()=>{i.value===!0&&(e==null?void 0:e.value)===!0&&v()}),s===!0&&Eo(()=>{y(r.modelValue)});const x={show:h,hide:v,toggle:d};return Object.assign(c,x),x}let zC=document.body;function GC(e){const t=document.createElement("div");return e!==void 0&&(t.id=e),zC.appendChild(t),t}function UC(e){e.remove()}const Il=[];function HC(e){for(e=e.parent;e!=null;){if(e.type.name==="VcGlobalDialog")return!0;if(e.type.name==="VcDialog"||e.type.name==="VcMenu")return!1;e=e.parent}return!1}function Ud(e,t,i,n){var o,s,a,r;let l=null;(s=(o=e.props)==null?void 0:o.teleport)!=null&&s.to&&(l=(r=(a=e.props)==null?void 0:a.teleport)==null?void 0:r.to);const c=n===!0&&HC(e),u=ee(!1);function d(){c===!1&&l===null&&(l=GC()),u.value=!0,Il.push(e.proxy)}function h(){var p,v;u.value=!1;const b=Il.indexOf(e.proxy);b>-1&&Il.splice(b,1),l!==null&&!((v=(p=e.props)==null?void 0:p.teleport)!=null&&v.to)&&(UC(l),l=null)}return nt(h),Object.assign(e.proxy,{__vcPortalInnerRef:t}),{showPortal:d,hidePortal:h,portalIsActive:u,renderPortal:()=>c===!0?i():u.value===!0?[S(tn,{to:l},i())]:void 0}}const WC={transitionShow:{type:String,default:"fade"},transitionHide:{type:String,default:"fade"},transitionDuration:{type:[String,Number],default:300}};function qC(e,t){const i=ee(t.value);return de(t,n=>{Be(()=>{i.value=n})}),{transition:ae(()=>"vc-transition--"+(i.value===!0?e.transitionHide:e.transitionShow)),transitionStyle:ae(()=>`--vc-transition-duration: ${e.transitionDuration}ms`)}}function QC(){let e;return un(()=>{e=void 0}),{registerTick(t){e=t},removeTick(){e=void 0},prepareTick(){if(e!==void 0){const t=e;Be(()=>{e===t&&(e(),e=void 0)})}}}}const ZC=[null,document,document.body,document.scrollingElement,document.documentElement];function JC(e,t){let i=Ku(t);if(i===void 0){if(e==null)return window;i=e.closest(".scroll,.scroll-y,.overflow-auto")}return ZC.includes(i)?window:i}let rs;function XC(){if(rs!==void 0)return rs;const e=document.createElement("p"),t=document.createElement("div");Jr(e,{width:"100%",height:"200px"}),Jr(t,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);const i=e.offsetWidth;t.style.overflow="scroll";let n=e.offsetWidth;return i===n&&(n=t.clientWidth),t.remove(),rs=i-n,rs}let Hd,Wd;function qd(e){const t=e.split(" ");return t.length!==2?!1:["top","center","bottom"].includes(t[0])!==!0?(console.error("Anchor/Self position must start with one of top/center/bottom"),!1):["left","middle","right","start","end"].includes(t[1])!==!0?(console.error("Anchor/Self position must end with one of left/middle/right/start/end"),!1):!0}function YC(e){return e?!(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number"):!0}const Al={"start#ltr":"left","start#rtl":"right","end#ltr":"right","end#rtl":"left"};["left","middle","right"].forEach(e=>{Al[`${e}#ltr`]=e,Al[`${e}#rtl`]=e});function Qd(e,t){const i=e.split(" ");return{vertical:i[0],horizontal:Al[`${i[1]}#${t===!0?"rtl":"ltr"}`]}}function KC(e,t){let{top:i,left:n,right:o,bottom:s,width:a,height:r}=e.getBoundingClientRect();return t!==void 0&&(i-=t[1],n-=t[0],s+=t[1],o+=t[0],a+=t[0],r+=t[1]),{top:i,left:n,right:o,bottom:s,width:a,height:r,middle:n+(o-n)/2,center:i+(s-i)/2}}function ew(e){return{top:0,center:e.offsetHeight/2,bottom:e.offsetHeight,left:0,middle:e.offsetWidth/2,right:e.offsetWidth}}function tw(e){if(ct().isIOS===!0&&window.visualViewport!==void 0){const r=document.body.style,{offsetLeft:l,offsetTop:c}=window.visualViewport;l!==Hd&&(r.setProperty("--vc-pe-left",l+"px"),Hd=l),c!==Wd&&(r.setProperty("--vc-pe-top",c+"px"),Wd=c)}let t={};const{scrollLeft:i,scrollTop:n}=e.el;if(e.absoluteOffset===void 0)t=KC(e.anchorEl,e.cover===!0?[0,0]:e.offset);else{const{top:r,left:l}=e.anchorEl.getBoundingClientRect(),c=r+e.absoluteOffset.top,u=l+e.absoluteOffset.left;t={top:c,left:u,width:1,height:1,right:u+1,center:c,middle:u,bottom:c+1}}let o={maxHeight:e.maxHeight,maxWidth:e.maxWidth,visibility:"visible"};(e.fit===!0||e.cover===!0)&&(o.minWidth=t.width+"px",e.cover===!0&&(o.minHeight=t.height+"px")),Object.assign(e.el.style,o);const s=ew(e.el),a={top:t[e.anchorOrigin.vertical]-s[e.selfOrigin.vertical],left:t[e.anchorOrigin.horizontal]-s[e.selfOrigin.horizontal]};iw(a,t,s,e.anchorOrigin,e.selfOrigin),o={top:a.top+"px",left:a.left+"px"},a.maxHeight!==void 0&&(o.maxHeight=a.maxHeight+"px",t.height>a.maxHeight&&(o.minHeight=o.maxHeight)),a.maxWidth!==void 0&&(o.maxWidth=a.maxWidth+"px",t.width>a.maxWidth&&(o.minWidth=o.maxWidth)),Object.assign(e.el.style,o),e.el.scrollTop!==n&&(e.el.scrollTop=n),e.el.scrollLeft!==i&&(e.el.scrollLeft=i)}function iw(e,t,i,n,o){const s=i.bottom,a=i.right,r=XC(),l=window.innerHeight-r,c=document.body.clientWidth;if(e.top<0||e.top+s>l)if(o.vertical==="center")e.top=t[n.vertical]>l/2?Math.max(0,l-s):0,e.maxHeight=Math.min(s,l);else if(t[n.vertical]>l/2){const u=Math.min(l,n.vertical==="center"?t.center:n.vertical===o.vertical?t.bottom:t.top);e.maxHeight=Math.min(s,u),e.top=Math.max(0,u-s)}else e.top=Math.max(0,n.vertical==="center"?t.center:n.vertical===o.vertical?t.top:t.bottom),e.maxHeight=Math.min(s,l-e.top);if(e.left<0||e.left+a>c)if(e.maxWidth=Math.min(a,c),o.horizontal==="middle")e.left=t[n.horizontal]>c/2?Math.max(0,c-a):0;else if(t[n.horizontal]>c/2){const u=Math.min(c,n.horizontal==="middle"?t.middle:n.horizontal===o.horizontal?t.right:t.left);e.maxWidth=Math.min(a,u),e.left=Math.max(0,u-e.maxWidth)}else e.left=Math.max(0,n.horizontal==="middle"?t.middle:n.horizontal===o.horizontal?t.left:t.right),e.maxWidth=Math.min(a,c-e.left)}const Zd={...$C,...Vd,...WC,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null},transitionShow:{type:String,default:"jump-down"},transitionHide:{type:String,default:"jump-up"},anchor:{type:String,default:"bottom middle",validator:qd},self:{type:String,default:"top middle",validator:qd},offset:{type:Array,default:()=>[14,14],validator:YC},scrollTarget:String,delay:{type:Number,default:0},hideDelay:{type:Number,default:0},persistent:{type:Boolean}};var Jd=K({name:"VcTooltip",inheritAttrs:!1,props:Zd,emits:[...zd],setup(e,{slots:t,emit:i,attrs:n}){let o,s;const a=oe(),r=ee(null),l=ee(!1),c=ae(()=>Qd(e.anchor,!0)),u=ae(()=>Qd(e.self,!0)),d=ae(()=>e.persistent!==!0),{registerTick:h,removeTick:p,prepareTick:v}=QC(),{registerTimeout:b,removeTimeout:y}=Zr(),{transition:x,transitionStyle:M}=qC(e,l),{localScrollTarget:g,changeScrollEvent:w,unconfigureScrollTarget:O}=VC(e,B),{anchorEl:I,canShow:R,anchorEvents:D}=NC({showing:l,configureAnchorEl:L,avoidEmit:void 0}),{show:P,hide:k}=Gd({showing:l,canShow:R,handleShow:f,handleHide:C,hideOnRouteChange:d,processOnMount:!0});Object.assign(D,{delayShow:E,delayHide:A});const{showPortal:N,hidePortal:$,renderPortal:m}=Ud(a,r,q);function f(Z){p(),y(),N(),h(()=>{s=new MutationObserver(()=>_()),s.observe(r.value,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),_(),B()}),v(),o===void 0&&(o=de(()=>e.self+"|"+e.anchor,_)),b(()=>{i("show",Z)},e.transitionDuration)}function C(Z){p(),y(),T(),b(()=>{$(),i("hide",Z)},e.transitionDuration)}function T(){s!==void 0&&(s.disconnect(),s=void 0),o!==void 0&&(o(),o=void 0),O(),hi(D,"tooltipTemp")}function _(){const Z=r.value;I.value===void 0||!Z||tw({el:Z,offset:e.offset,anchorEl:I.value,anchorOrigin:c.value,selfOrigin:u.value,maxHeight:e.maxHeight,maxWidth:e.maxWidth})}function E(Z){if(ct().isPhone===!0){qi(),document.body.classList.add("non-selectable");const H=tl(I.value),V=["touchmove","touchcancel","touchend","click"].map(j=>[H,j,"__delayHide","passiveCapture"]);Tt(D,"tooltipTemp",V)}b(()=>{P(Z)},e.delay)}function A(Z){y(),ct().isPhone===!0&&(hi(D,"tooltipTemp"),qi(),setTimeout(()=>{document.body.classList.remove("non-selectable")},10)),b(()=>{k(Z)},e.hideDelay)}function L(){if(e.noParentEvent===!0||I.value===void 0)return;const Z=ct().isPhone===!0?[[I.value,"touchstart","delayShow","passive"]]:[[I.value,"mouseenter","delayShow","passive"],[I.value,"mouseleave","delayHide","passive"]];Tt(D,"anchor",Z)}function B(){if(I.value!==void 0||e.scrollTarget!==void 0){g.value=JC(I.value,e.scrollTarget);const Z=e.noParentEvent===!0?_:k;w(g.value,Z)}}function F(){return l.value===!0?S("div",{...n,ref:r,class:["vc-tooltip vc-tooltip--style vc-position-engine no-pointer-events",n.class],style:M.value,role:"complementary"},Je(t.default)):null}function q(){return S(Zc,{name:x.value,appear:!0},F)}return un(T),Object.assign(a==null?void 0:a.proxy,{updatePosition:_}),m}});function Vn(e,t,i){return i<=t?t:Math.min(i,Math.max(t,e))}const Dl=XMLHttpRequest,Xd=Dl.prototype.open,nw=["top","right","bottom","left"];let ls=[],Zo=0;function ow({p:e,pos:t,active:i,horiz:n,reverse:o,dir:s}){let a=1,r=1;return n===!0?(o===!0&&(a=-1),t==="bottom"&&(r=-1),{transform:`translate3d(${a*(e-100)}%,${i?0:r*-200}%,0)`}):(o===!0&&(r=-1),t==="right"&&(a=-1),{transform:`translate3d(${i?0:s*a*-200}%,${r*(e-100)}%,0)`})}function aw(e,t){return typeof t!="number"&&(e<25?t=Math.random()*3+3:e<65?t=Math.random()*3:e<85?t=Math.random()*2:e<99?t=.6:t=0),Vn(e+t,0,100)}function sw(e){Zo++,ls.push(e),!(Zo>1)&&(Dl.prototype.open=function(t,i){const n=[],o=()=>{ls.forEach(a=>{(a.hijackFilter.value===null||a.hijackFilter.value(i)===!0)&&(a.start(),n.push(a.stop))})},s=()=>{n.forEach(a=>{a()})};this.addEventListener("loadstart",o,{once:!0}),this.addEventListener("loadend",s,{once:!0}),Xd.apply(this,arguments)})}function rw(e){ls=ls.filter(t=>t.start!==e),Zo=Math.max(0,Zo-1),Zo===0&&(Dl.prototype.open=Xd)}const Yd={position:{type:String,default:"top",validator:e=>nw.includes(e)},size:{type:String,default:"2px"},color:String,skipHijack:Boolean,reverse:Boolean,positioning:{type:String,default:"absolute",validator:e=>["absolute","fixed"].includes(e)},hijackFilter:Function};var Kd=K({name:"VcAjaxBar",props:Yd,emits:["start","stop"],setup(e,{emit:t}){const{proxy:i}=oe(),n=ee(0),o=ee(!1),s=ee(!0);let a=0,r,l;const c=ae(()=>`vc-loading-bar vc-loading-bar--${e.position}`+(e.color!==void 0?` bg-${e.color}`:"")+(s.value===!0?"":" no-transition")),u=ae(()=>e.position==="top"||e.position==="bottom"),d=ae(()=>u.value===!0?"height":"width"),h=ae(()=>{const g=o.value,w=ow({p:n.value,pos:e.position,active:g,horiz:u.value,reverse:e.reverse,dir:1});return w[d.value]=e.size,w.opacity=g?1:0,w.position=e.positioning==="absolute"?"absolute":"fixed",w.backgroundColor=e.color,w}),p=ae(()=>o.value===!0?{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n.value}:{"aria-hidden":"true"});function v(g=300){const w=l;return l=Math.max(0,g)||0,a++,a>1?(w===0&&g>0?x():w>0&&g<=0&&clearTimeout(r),a):(clearTimeout(r),t("start"),n.value=0,r=setTimeout(()=>{s.value=!0,g>0&&x()},o.value===!0?500:1),o.value!==!0&&(o.value=!0,s.value=!1),a)}function b(g){return a>0&&(n.value=aw(n.value,g)),a}function y(){if(a=Math.max(0,a-1),a>0)return a;clearTimeout(r),t("stop");const g=()=>{s.value=!0,n.value=100,r=setTimeout(()=>{o.value=!1},1e3)};n.value===0?r=setTimeout(g,1):g()}function x(){n.value<100&&(r=setTimeout(()=>{b(),x()},l))}let M;return Eo(()=>{e.skipHijack!==!0&&(M=!0,sw({start:v,stop:y,hijackFilter:ae(()=>e.hijackFilter||null)}))}),un(()=>{clearTimeout(r),M===!0&&rw(v)}),Object.assign(i,{start:v,stop:y,increment:b}),()=>S("div",{class:c.value,style:h.value,...p.value})}});const eh={dark:{type:Boolean,default:null}};function th(e){return ae(()=>e.dark)}const ih=["text","rect","circle","VcBtn","VcBadge","VcChip","VcToolbar","VcCheckbox","VcRadio","VcToggle","VcSlider","VcRange","VcInput","VcAvatar"],nh=["wave","pulse","pulse-x","pulse-y","fade","blink","none"],oh={...eh,tag:{type:String,default:"div"},type:{type:String,validator:e=>ih.includes(e),default:"rect"},animation:{type:String,validator:e=>nh.includes(e),default:"wave"},square:Boolean,bordered:Boolean,size:String,width:String,height:String};var ah=K({name:"VcSkeleton",props:oh,setup(e,{slots:t}){const i=th(e),n=ae(()=>e.size!==void 0?{width:e.size,height:e.size}:{width:e.width,height:e.height}),o=ae(()=>`vc-skeleton vc-skeleton--${i.value===!0?"dark":"light"} vc-skeleton--type-${e.type}`+(e.animation!=="none"?` vc-skeleton--anim vc-skeleton--anim-${e.animation}`:"")+(e.square===!0?" vc-skeleton--square":"")+(e.bordered===!0?" vc-skeleton--bordered":""));return()=>S(e.tag,{class:o.value,style:n.value},Je(t.default))}});const lw=["top","right","bottom","left"],sh={type:{type:String,default:"a"},outline:Boolean,push:Boolean,flat:Boolean,unelevated:Boolean,color:String,textColor:String,glossy:Boolean,square:Boolean,padding:String,size:String,label:{type:[String,Number],default:""},labelPosition:{type:String,default:"right",validator:e=>lw.includes(e)},externalLabel:Boolean,hideLabel:{type:Boolean},labelClass:[Array,String,Object],labelStyle:[Array,String,Object],disable:Boolean,tabindex:[Number,String]};function rh(e,t){return{formClass:ae(()=>`vc-fab--form-${e.square===!0?"square":"rounded"}`),stacked:ae(()=>e.externalLabel===!1&&["top","bottom"].includes(e.labelPosition)),labelProps:ae(()=>{if(e.externalLabel===!0){const i=e.hideLabel===null?t.value===!1:e.hideLabel;return{action:"push",data:{class:[e.labelClass,`vc-fab__label vc-tooltip--style vc-fab__label--external vc-fab__label--external-${e.labelPosition}`+(i===!0?" vc-fab__label--external-hidden":"")],style:e.labelStyle}}}return{action:["left","top"].includes(e.labelPosition)?"unshift":"push",data:{class:[e.labelClass,`vc-fab__label vc-fab__label--internal vc-fab__label--internal-${e.labelPosition}`+(e.hideLabel===!0?" vc-fab__label--internal-hidden":"")],style:e.labelStyle}}})}}const cw=["up","right","down","left"],uw=["left","center","right"],dw={...sh,...Vd,icon:String,activeIcon:String,hideActionOnClick:{type:Boolean,default:!0},hideIcon:Boolean,hideLabel:{type:Boolean,default:!0},direction:{type:String,default:"right",validator:e=>cw.includes(e)},persistent:Boolean,stacked:Boolean,verticalActionsAlign:{type:String,default:"center",validator:e=>uw.includes(e)}},lh=dw;var ch=K({name:"VcFab",props:lh,emits:zd,setup(e,{slots:t}){const i=ee(null),n=ee(e.modelValue===!0),{formClass:o,labelProps:s}=rh(e,n),a=ae(()=>e.persistent!==!0),{hide:r,toggle:l}=Gd({showing:n,hideOnRouteChange:a}),c=ae(()=>({opened:n.value})),u=ae(()=>`vc-fab z-fab row inline justify-center vc-fab--align-${e.verticalActionsAlign} ${o.value}`+(n.value===!0?" vc-fab--opened":" vc-fab--closed")),d=ae(()=>`vc-fab__actions flex no-wrap inline vc-fab__actions--${e.direction} vc-fab__actions--${n.value===!0?"opened":"closed"}`),h=ae(()=>`vc-fab__icon-holder vc-fab__icon-holder--${n.value===!0?"opened":"closed"}`);function p(b,y){const x=t[b],M=`vc-fab__${b} absolute-full`;return x===void 0?S(io,{class:M,name:e[y]}):S("div",{class:M},x(c.value))}function v(){const b=[];return e.hideIcon!==!0&&b.push(S("div",{class:h.value},[p("icon","icon"),p("active-icon","activeIcon")])),(e.label!==""||t.label!==void 0)&&b[s.value.action](S("div",s.value.data,t.label!==void 0?t.label(c.value):[e.label])),Ei(t.tooltip,b)}return en(tu,{showing:n,onChildClick(b){e.hideActionOnClick&&r(b),i.value!==null&&i.value.$el.focus()}}),()=>S("div",{class:u.value},[S(ss,{ref:i,class:o.value,...e,noWrap:!0,stack:e.stacked,align:void 0,icon:void 0,label:void 0,noCaps:!0,fab:!0,flat:e.flat,size:e.size,"aria-expanded":n.value===!0?"true":"false","aria-haspopup":"true",onClick:l},v),S("div",{class:d.value},Je(t.default))])}});const uh={start:"self-end",center:"self-center",end:"self-start"},hw=Object.keys(uh),mw={...sh,icon:{type:String,default:""},stacked:Boolean,anchor:{type:String,validator:e=>hw.includes(e)},to:[String,Object],replace:Boolean},dh=mw;var hh=K({name:"VcFabAction",props:dh,emits:["click"],setup(e,{slots:t,emit:i}){const n=ya(tu),{formClass:o,labelProps:s}=rh(e,n==null?void 0:n.showing),a=ae(()=>{let d;return e.anchor&&(d=uh[e.anchor]),o.value+(d!==void 0?` ${d}`:"")}),r=ae(()=>{var d;return e.disable===!0||((d=n==null?void 0:n.showing)==null?void 0:d.value)!==!0});function l(d){var h;(h=n==null?void 0:n.onChildClick)==null||h.call(n,d),i("click",d)}function c(){const d=[];return e.icon!==""&&d.push(S(io,{name:e.icon})),e.label!==""&&d[s.value.action](S("div",s.value.data,[e.label])),Ei(t.default,d)}const u=oe();return Object.assign(u==null?void 0:u.proxy,{click:l}),()=>S(ss,{class:a.value,...e,noWrap:!0,stack:e.stacked,icon:void 0,label:void 0,noCaps:!0,fabMini:!0,disable:r.value,size:e.size,onClick:l},c)}});const pw={name:String};function vw(e){return ae(()=>({type:"hidden",name:e.name,value:e.modelValue}))}function fw(e={}){return(t,i,n)=>{t[i](S("input",{class:"hidden"+(n||""),...e.value}))}}const mh="vc-slider__marker-labels",gw=e=>({value:e}),yw=({marker:e})=>S("div",{key:e.value,style:e.style,class:e.classes},e.label),ph=[34,37,40,33,39,38],bw={...eh,...pw,min:{type:Number,default:0},max:{type:Number,default:100},innerMin:Number,innerMax:Number,step:{type:Number,default:1,validator:e=>e>=0},snap:Boolean,vertical:Boolean,reverse:Boolean,hideSelection:Boolean,color:String,markerLabelsClass:String,label:Boolean,labelColor:String,labelTextColor:String,labelAlways:Boolean,switchLabelSide:Boolean,markers:[Boolean,Number],markerLabels:[Boolean,Array,Object,Function],switchMarkerLabelsSide:Boolean,trackImg:String,trackColor:String,innerTrackImg:String,innerTrackColor:String,selectionColor:String,selectionImg:String,thumbSize:{type:String,default:"20px"},trackSize:{type:String,default:"4px"},disable:Boolean,readonly:Boolean,dense:Boolean,tabindex:[String,Number],thumbColor:String,thumbPath:{type:String,default:"M 4, 10 a 6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"}},Cw=["pan","update:modelValue","change"];function ww({updateValue:e,updatePosition:t,getDragging:i,formAttrs:n}){const{props:o,emit:s,slots:a,proxy:r}=oe(),l=th(o),c=fw(n),u=ee(!1),d=ee(!1),h=ee(!1),p=ee(!1),v=ae(()=>o.vertical===!0?"--v":"--h"),b=ae(()=>"-"+(o.switchLabelSide===!0?"switched":"standard")),y=ae(()=>o.reverse===!0),x=ae(()=>isNaN(o.innerMin)===!0||o.innerMin<o.min?o.min:o.innerMin),M=ae(()=>isNaN(o.innerMax)===!0||o.innerMax>o.max?o.max:o.innerMax),g=ae(()=>o.disable!==!0&&o.readonly!==!0&&x.value<M.value),w=ae(()=>(String(o.step).trim().split(".")[1]||"").length),O=ae(()=>o.step===0?1:o.step),I=ae(()=>g.value===!0?o.tabindex||0:-1),R=ae(()=>o.max-o.min),D=ae(()=>M.value-x.value),P=ae(()=>z(x.value)),k=ae(()=>z(M.value)),N=ae(()=>o.vertical===!0?y.value===!0?"bottom":"top":y.value===!0?"right":"left"),$=ae(()=>o.vertical===!0?"height":"width"),m=ae(()=>o.vertical===!0?"width":"height"),f=ae(()=>o.vertical===!0?"vertical":"horizontal"),C=ae(()=>{const ce={role:"slider","aria-valuemin":x.value,"aria-valuemax":M.value,"aria-orientation":f.value,"data-step":o.step};return o.disable===!0?ce["aria-disabled"]="true":o.readonly===!0&&(ce["aria-readonly"]="true"),ce}),T=ae(()=>`vc-slider vc-slider${v.value} vc-slider--${u.value===!0?"":"in"}active inline no-wrap `+(o.vertical===!0?"row":"column")+(o.disable===!0?" disabled":" vc-slider--enabled"+(g.value===!0?" vc-slider--editable":""))+(h.value==="both"?" vc-slider--focus":"")+(o.label||o.labelAlways===!0?" vc-slider--label":"")+(o.labelAlways===!0?" vc-slider--label-always":"")+(l.value===!0?" vc-slider--dark":"")+(o.dense===!0?" vc-slider--dense vc-slider--dense"+v.value:""));function _(ce){const Ae="vc-slider__"+ce;return`${Ae} ${Ae}${v.value} ${Ae}${v.value}${b.value}`}function E(ce){const Ae="vc-slider__"+ce;return`${Ae} ${Ae}${v.value}`}const A=ae(()=>{const ce=o.selectionColor||o.color;return"vc-slider__selection absolute"+(ce!==void 0?` text-${ce}`:"")}),L=ae(()=>E("markers")+" absolute overflow-hidden"),B=ae(()=>E("track-container")),F=ae(()=>_("pin")),q=ae(()=>_("label")),Z=ae(()=>_("text-container")),H=ae(()=>_("marker-labels-container")+(o.markerLabelsClass!==void 0?` ${o.markerLabelsClass}`:"")),V=ae(()=>"vc-slider__track relative-position no-outline"+(o.trackColor!==void 0?` bg-${o.trackColor}`:"")),j=ae(()=>{const ce={[m.value]:o.trackSize};return o.trackImg!==void 0&&(ce.backgroundImage=`url(${o.trackImg}) !important`),ce}),G=ae(()=>"vc-slider__inner absolute"+(o.innerTrackColor!==void 0?` bg-${o.innerTrackColor}`:"")),J=ae(()=>{const ce={[N.value]:`${100*P.value}%`,[$.value]:`${100*(k.value-P.value)}%`};return o.innerTrackImg!==void 0&&(ce.backgroundImage=`url(${o.innerTrackImg}) !important`),ce});function U(ce){const{min:Ae,max:Le,step:De}=o;let Re=Ae+ce*(Le-Ae);if(De>0){const rt=(Re-Ae)%De;Re+=(Math.abs(rt)>=De/2?(rt<0?-1:1)*De:0)-rt}return w.value>0&&(Re=parseFloat(Re.toFixed(w.value))),Vn(Re,x.value,M.value)}function z(ce){return R.value===0?0:(ce-o.min)/R.value}function Y(ce,Ae){const Le=Hi(ce),De=o.vertical===!0?Vn((Le.top-Ae.top)/Ae.height,0,1):Vn((Le.left-Ae.left)/Ae.width,0,1);return Vn(y.value===!0?1-De:De,P.value,k.value)}const Q=ae(()=>l1(o.markers)===!0?o.markers:O.value),te=ae(()=>{const ce=[],Ae=Q.value,Le=o.max;let De=o.min;do ce.push(De),De+=Ae;while(De<Le);return ce.push(Le),ce}),X=ae(()=>{const ce=` ${mh}${v.value}-`;return mh+`${ce}${o.switchMarkerLabelsSide===!0?"switched":"standard"}${ce}${y.value===!0?"rtl":"ltr"}`}),ne=ae(()=>o.markerLabels===!1?null:be(o.markerLabels).map((ce,Ae)=>({index:Ae,value:ce.value,label:ce.label||ce.value,classes:X.value+(ce.classes!==void 0?" "+ce.classes:""),style:{...he(ce.value),...ce.style||{}}}))),re=ae(()=>({markerList:ne.value,markerMap:ye.value,classes:X.value,getStyle:he})),pe=ae(()=>{if(D.value!==0){const ce=100*Q.value/D.value;return{...J.value,backgroundSize:o.vertical===!0?`2px ${ce}%`:`${ce}% 2px`}}return null});function be(ce){if(ce===!1)return null;if(ce===!0)return te.value.map(gw);if(typeof ce=="function")return te.value.map(Le=>{const De=ce(Le);return Ii(De)===!0?{...De,value:Le}:{value:Le,label:De}});const Ae=({value:Le})=>Le>=o.min&&Le<=o.max;return Array.isArray(ce)===!0?ce.map(Le=>Ii(Le)===!0?Le:{value:Le}).filter(Ae):Object.keys(ce).map(Le=>{const De=ce[Le],Re=Number(Le);return Ii(De)===!0?{...De,value:Re}:{value:Re,label:De}}).filter(Ae)}function he(ce){return{[N.value]:`${100*(ce-o.min)/R.value}%`}}const ye=ae(()=>{if(o.markerLabels===!1)return null;const ce={};return ne.value.forEach(Ae=>{ce[Ae.value]=Ae}),ce});function we(){if(a["marker-label-group"]!==void 0)return a["marker-label-group"](re.value);const ce=a["marker-label"]||yw;return ne.value.map(Ae=>ce({marker:Ae,...re.value}))}const ge=ae(()=>[[sd,ve,void 0,{[f.value]:!0,prevent:!0,stop:!0,mouse:!0,mouseAllDir:!0}]]);function ve(ce){ce.isFinal===!0?(p.value!==void 0&&(t(ce.evt),ce.touch===!0&&e(!0),p.value=void 0,s("pan","end")),u.value=!1,h.value=!1):ce.isFirst===!0?(p.value=i(ce.evt),t(ce.evt),e(),u.value=!0,s("pan","start")):(t(ce.evt),e())}function Se(){h.value=!1}function W(ce){t(ce,i(ce)),e(),d.value=!0,u.value=!0,document.addEventListener("mouseup",le,!0)}function le(){d.value=!1,u.value=!1,e(!0),Se(),document.removeEventListener("mouseup",le,!0)}function _e(ce){t(ce,i(ce)),e(!0)}function ue(ce){ph.includes(ce.keyCode)&&e(!0)}function Xe(ce){if(o.vertical===!0)return null;const Ae=ce;return{transform:`translateX(calc(${2*Ae-1} * ${o.thumbSize} / 2 + ${50-100*Ae}%))`}}function kt(ce){const Ae=ae(()=>d.value===!1&&(h.value===ce.focusValue||h.value==="both")?" vc-slider--focus":""),Le=ae(()=>`vc-slider__thumb vc-slider__thumb${v.value} vc-slider__thumb${v.value}-${y.value===!0?"rtl":"ltr"} absolute non-selectable`+Ae.value+(ce.thumbColor.value!==void 0?` text-${ce.thumbColor.value}`:"")),De=ae(()=>({width:o.thumbSize,height:o.thumbSize,[N.value]:`${100*ce.ratio.value}%`,zIndex:h.value===ce.focusValue?2:void 0})),Re=ae(()=>ce.labelColor.value!==void 0?` text-${ce.labelColor.value}`:""),rt=ae(()=>Xe(ce.ratio.value)),Ye=ae(()=>"vc-slider__text"+(ce.labelTextColor.value!==void 0?` text-${ce.labelTextColor.value}`:""));return()=>{const Ke=[S("svg",{class:"vc-slider__thumb-shape absolute-full",viewBox:"0 0 20 20","aria-hidden":"true"},[S("path",{d:o.thumbPath})]),S("div",{class:"vc-slider__focus-ring fit"})];return(o.label===!0||o.labelAlways===!0)&&(Ke.push(S("div",{class:F.value+" absolute fit no-pointer-events"+Re.value},[S("div",{class:q.value,style:{minWidth:o.thumbSize}},[S("div",{class:Z.value,style:rt.value},[S("span",{class:Ye.value},ce.label.value)])])])),o.name!==void 0&&o.disable!==!0&&c(Ke,"push")),S("div",{class:Le.value,style:De.value,...ce.getNodeData()},Ke)}}function Fe(ce,Ae,Le,De){const Re=[];o.innerTrackColor!=="transparent"&&Re.push(S("div",{key:"inner",class:G.value,style:J.value})),o.selectionColor!=="transparent"&&Re.push(S("div",{key:"selection",class:A.value,style:ce.value})),o.markers!==!1&&Re.push(S("div",{key:"marker",class:L.value,style:pe.value})),De(Re);const rt=[Fd("div",{key:"trackC",class:B.value,tabindex:Ae.value,...Le.value},[S("div",{class:V.value,style:j.value},Re)],"slide",g.value,()=>ge.value)];if(o.markerLabels!==!1){const Ye=o.switchMarkerLabelsSide===!0?"unshift":"push";rt[Ye](S("div",{key:"markerL",class:H.value},we()))}return rt}return un(()=>{document.removeEventListener("mouseup",le,!0)}),{state:{active:u,focus:h,preventFocus:d,dragging:p,editable:g,classes:T,tabindex:I,attributes:C,step:O,decimals:w,trackLen:R,innerMin:x,innerMinRatio:P,innerMax:M,innerMaxRatio:k,positionProp:N,sizeProp:$,isReversed:y},methods:{onActivate:W,onMobileClick:_e,onBlur:Se,onKeyup:ue,getContent:Fe,getThumbRenderFn:kt,convertRatioToModel:U,convertModelToRatio:z,getDraggingRatio:Y}}}const _w=()=>({}),vh={...bw,modelValue:{required:!0,default:null,validator:e=>typeof e=="number"||e===null},labelValue:[String,Number]};var fh=K({name:"VcSlider",props:vh,emits:Cw,setup(e,{emit:t}){const{state:i,methods:n}=ww({updateValue:p,updatePosition:b,getDragging:v,formAttrs:vw(e)}),o=ee(null),s=ee(0),a=ee(0);function r(){a.value=e.modelValue===null?i.innerMin.value:Vn(e.modelValue,i.innerMin.value,i.innerMax.value)}de(()=>`${e.modelValue}|${i.innerMin.value}|${i.innerMax.value}`,r),r();const l=ae(()=>n.convertModelToRatio(a.value)),c=ae(()=>i.active.value===!0?s.value:l.value),u=ae(()=>{const M={[i.positionProp.value]:`${100*i.innerMinRatio.value}%`,[i.sizeProp.value]:`${100*(c.value-i.innerMinRatio.value)}%`};return e.selectionImg!==void 0&&(M.backgroundImage=`url(${e.selectionImg}) !important`),M}),d=n.getThumbRenderFn({focusValue:!0,getNodeData:_w,ratio:c,label:ae(()=>e.labelValue!==void 0?e.labelValue:a.value),thumbColor:ae(()=>e.thumbColor||e.color),labelColor:ae(()=>e.labelColor),labelTextColor:ae(()=>e.labelTextColor)}),h=ae(()=>i.editable.value!==!0?{}:ct().isPhone===!0?{onClick:n.onMobileClick}:{onMousedown:n.onActivate,onFocus:y,onBlur:n.onBlur,onKeydown:x,onKeyup:n.onKeyup});function p(M){a.value!==e.modelValue&&t("update:modelValue",a.value),M===!0&&t("change",a.value)}function v(){return o.value.getBoundingClientRect()}function b(M,g=i.dragging.value){const w=n.getDraggingRatio(M,g);a.value=n.convertRatioToModel(w),s.value=e.snap!==!0||e.step===0?w:n.convertModelToRatio(a.value)}function y(){i.focus.value=!0}function x(M){if(!ph.includes(M.keyCode))return;Wi(M);const g=([34,33].includes(M.keyCode)?10:1)*i.step.value,w=([34,37,40].includes(M.keyCode)?-1:1)*(i.isReversed.value===!0?-1:1)*(e.vertical===!0?-1:1)*g;a.value=Vn(parseFloat((a.value+w).toFixed(i.decimals.value)),i.innerMin.value,i.innerMax.value),p()}return()=>{const M=n.getContent(u,i.tabindex,h,g=>{g.push(d())});return S("div",{ref:o,class:i.classes.value+(e.modelValue===null?" vc-slider--no-value":""),...i.attributes.value,"aria-valuenow":e.modelValue},M)}}});const xw=[ss,io,bl,Cl,wl,_l,xl,El,Ml,Ol,Pl,Sl,Tl,as,Jd,Kd,ah,ch,hh,fh];xw.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const ai=ss,pn=io,gh=bl,cs=Cl,yh=wl,bh=_l,Ch=xl,Bl=El,Ll=Ml,jl=Ol,Fl=Pl,wh=Sl,kl=Tl,_h=as,At=Jd,xh=Kd,Rl=ah,$l=ch,us=hh,Eh=fh,Ce={beforeLoad:e=>!0,ready:e=>!0,unready:e=>!0,destroyed:e=>!0},Jo={mousedown:e=>!0,mouseup:e=>!0,click:e=>!0,clickout:e=>!0,dblclick:e=>!0,mousemove:e=>!0,mouseover:e=>!0,mouseout:e=>!0},Xo={...Ce,definitionChanged:e=>!0},dt={...Ce,errorEvent:e=>!0,readyPromise:(e,t,i)=>!0},pi={...Ce,...Jo,readyPromise:(e,t,i)=>!0,"update:geometryInstances":e=>!0},Si={...Ce,...Jo},Yo={...Ce,...Jo,definitionChanged:e=>!0,clusterEvent:(e,t)=>!0,collectionChanged:(e,t,i,n)=>!0,changedEvent:e=>!0,errorEvent:(e,t)=>!0,loadingEvent:(e,t)=>!0,refreshEvent:(e,t)=>!0,unsupportedNodeEvent:(e,t,i,n,o,s,a)=>!0},xt={...Ce,activeEvt:(e,t)=>!0,drawEvt:(e,t)=>!0,editorEvt:(e,t)=>!0,mouseEvt:(e,t)=>!0},Ew={...Ce,cesiumReady:e=>!0,viewerWidgetResized:e=>!0,selectedEntityChanged:e=>!0,trackedEntityChanged:e=>!0,layerAdded:(e,t)=>!0,layerMoved:(e,t,i)=>!0,layerRemoved:(e,t)=>!0,layerShownOrHidden:(e,t,i)=>!0,dataSourceAdded:(e,t)=>!0,dataSourceMoved:(e,t,i)=>!0,dataSourceRemoved:(e,t)=>!0,collectionChanged:(e,t,i,n)=>!0,morphComplete:(e,t,i,n)=>!0,morphStart:(e,t,i,n)=>!0,postRender:(e,t)=>!0,preRender:(e,t)=>!0,postUpdate:(e,t)=>!0,preUpdate:(e,t)=>!0,renderError:(e,t)=>!0,terrainProviderChanged:e=>!0,changed:e=>!0,moveEnd:()=>!0,moveStart:()=>!0,onStop:e=>!0,onTick:e=>!0,errorEvent:e=>!0,cameraClicked:e=>!0,closeClicked:e=>!0,leftClick:e=>!0,leftDoubleClick:e=>!0,leftDown:e=>!0,leftUp:e=>!0,middleClick:e=>!0,middleDown:e=>!0,middleUp:e=>!0,mouseMove:e=>!0,pinchStart:e=>!0,pinchMove:e=>!0,pinchEnd:()=>!0,rightClick:e=>!0,rightDown:e=>!0,rightUp:e=>!0,wheel:e=>!0,imageryLayersUpdatedEvent:()=>!0,tileLoadProgressEvent:e=>!0,touchEnd:e=>!0};var ds=K({name:"VcViewer",props:Dd,emits:Ew,setup(e,t){const i=oe();i.cesiumEvents=["selectedEntityChanged","trackedEntityChanged"],i.cesiumMembersEvents=Bd;const n=yC(e,t,i),o=ae(()=>e.containerId||t.attrs.id||"cesiumContainer");en(Vi,n.getServices()),i.appContext.config.globalProperties.$VueCesium=i.appContext.config.globalProperties.$VueCesium||{},i.appContext.config.globalProperties.$VueCesium[o.value]=n.getServices(),Object.assign(i.proxy,{creatingPromise:n.creatingPromise,load:n.load,unload:n.unload,reload:n.reload,cesiumObject:i.cesiumObject,getCesiumObject:()=>i.cesiumObject,getInstance:()=>i});const s=a=>{t.emit("touchEnd",a)};return()=>{var a;const r=[];return ot(e.skeleton)&&!n.isReady.value?r.push(S(Rl,{...e.skeleton,style:{background:e.skeleton.color,width:"100%",height:"100%"}})):r.push(ie("v-if")),r.push(ie("vc-viewer"),Qc(S("div",{ref:n.viewerRef,class:se(((a=i.proxy)==null?void 0:a.$options.name)||""),id:o.value,style:t.attrs.style||{width:"100%",height:"100%"}},Je(t.slots.default)),[[Ka,s,e.touchHoldArg]])),r}}});ds.install=(e,t)=>{e.component(ds.name,ds)};const Mh=ds,Oh=Mh,vn={position:{type:String,default:"top-right",validator:e=>["top-right","top-left","bottom-right","bottom-left","top","right","bottom","left"].includes(e)},offset:{type:Array,validator:e=>e.length===2}};function vi(e,t){const i=ae(()=>{const c=e.position;return{top:c.indexOf("top")>-1,right:c.indexOf("right")>-1,bottom:c.indexOf("bottom")>-1,left:c.indexOf("left")>-1,vertical:c==="top"||c==="bottom",horizontal:c==="left"||c==="right"}}),n=ee(0),o=ee(0),s=ee(0),a=ee(0),r=ae(()=>{let c=0,u=0;const d=i.value,h=1;d.top===!0&&n.value!==0?u=`${n.value}px`:d.bottom===!0&&a.value!==0&&(u=`${-a.value}px`),d.left===!0&&s.value!==0?c=`${h*s.value}px`:d.right===!0&&o.value!==0&&(c=`${-h*o.value}px`);const p={transform:`translate(${c}, ${u})`};return e.offset&&(p.margin=`${e.offset[1]}px ${e.offset[0]}px`),d.vertical===!0?(s.value!==0&&(p.right=`${s.value}px`),o.value!==0&&(p.left=`${o.value}px`)):d.horizontal===!0&&(n.value!==0&&(p.top=`${n.value}px`),a.value!==0&&(p.bottom=`${a.value}px`)),typeof e.teleportToViewer=="undefined"||e.teleportToViewer?p:{}}),l=ae(()=>typeof e.teleportToViewer=="undefined"||e.teleportToViewer?`absolute absolute-${e.position}`:"relative-position");return{attach:i,style:r,classes:l}}const Nl={enableCompassOuterRing:{type:Boolean,default:!0},duration:{type:Number,default:1.5},...vn,outerOptions:{type:Object,default:()=>({icon:"vc-icons-compass-outer",size:"96px",color:"#3f4854",background:"transparent",tooltip:{delay:1e3,anchor:"bottom middle",offset:[0,20],tip:void 0}})},innerOptions:{type:Object,default:()=>({icon:"vc-icons-compass-inner",size:"24px",color:"#3f4854",background:"#fff",tooltip:{delay:1e3,anchor:"bottom middle",offset:[0,20],tip:void 0}})},markerOptions:{type:Object,default:()=>({icon:"vc-icons-compass-rotation-marker",size:"96px",color:"#1976D2"})},customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}},Vl=bi(Nl);class Ph{static createTween(t,i){const{Cartesian2:n,Cartesian3:o,defaultValue:s,defined:a,DeveloperError:r,EasingFunction:l,Math:c,SceneMode:u}=Cesium;i=s(i,{});let d=i.destination;if(!a(t))throw new r("scene is required.");if(!a(d))throw new r("destination is required.");const h=t.mode;if(h===u.MORPHING)return Gl();const p=s(i.convert,!0),v=t.mapProjection,b=v.ellipsoid,y=i.maximumHeight,x=i.flyOverLongitude,M=i.flyOverLongitudeWeight,g=i.pitchAdjustHeight;let w=i.easingFunction;p&&h!==u.SCENE3D&&(b.cartesianToCartographic(d,Ih),d=v.project(Ih,jw));const O=t.camera,I=i.endTransform;a(I)&&O._setTransform(I);let R=i.duration;a(R)||(R=Math.ceil(o.distance(O.position,d)/1e6)+2,R=Math.min(R,3));const D=s(i.heading,0),P=s(i.pitch,-c.PI_OVER_TWO),k=s(i.roll,0),N=t.screenSpaceCameraController;N.enableInputs=!1;const $=Ah(N,i.complete),m=Ah(N,i.cancel),f=O.frustum;let C=t.mode===u.SCENE2D;if(C=C&&n.equalsEpsilon(O.position,d,c.EPSILON6),C=C&&c.equalsEpsilon(Math.max(f.right-f.left,f.top-f.bottom),d.z,c.EPSILON6),C=C||t.mode!==u.SCENE2D&&o.equalsEpsilon(d,O.position,c.EPSILON10),C=C&&c.equalsEpsilon(c.negativePiToPi(D),c.negativePiToPi(O.heading),c.EPSILON10)&&c.equalsEpsilon(c.negativePiToPi(P),c.negativePiToPi(O.pitch),c.EPSILON10)&&c.equalsEpsilon(c.negativePiToPi(k),c.negativePiToPi(O.roll),c.EPSILON10),C)return Gl($,m);const T=new Array(4);if(T[u.SCENE2D]=Lw,T[u.SCENE3D]=Bw,T[u.COLUMBUS_VIEW]=Sw,R<=0)return Gl(function(){T[h](t,1,d,D,P,k,y,x,M,g)({time:1}),typeof $=="function"&&$()},m);const _=T[h](t,R,d,D,P,k,y,x,M,g);if(!a(w)){const E=O.positionCartographic.height,A=h===u.SCENE3D?b.cartesianToCartographic(d).height:d.z;E>A&&E>11500?w=l.CUBIC_OUT:w=l.QUINTIC_IN_OUT}return{duration:R,easingFunction:w,startObject:{time:0},stopObject:{time:R},update:_,complete:$,cancel:m}}}function Mw(e,t,i){const{PerspectiveFrustum:n,PerspectiveOffCenterFrustum:o}=Cesium;let s,a,r;if(e instanceof n){const l=Math.tan(.5*e.fovy);return s=e.near,a=e.near*l,r=e.aspectRatio*a,Math.max(t*s/r,i*s/a)}else if(e instanceof o)return s=e.near,a=e.top,r=e.right,Math.max(t*s/r,i*s/a);return Math.max(t,i)}const Ow={},Sh={};function Pw(e,t,i,n){const{defined:o,Math:s}=Cesium;if(o(n)&&i(.5)>n){const a=i(0),r=i(1),l=i(.5),c=l-a,u=l-r;return function(d){const h=i(d);if(d<=.5){const v=(h-a)/c;return s.lerp(e,-s.PI_OVER_TWO,v)}const p=(h-r)/u;return s.lerp(-s.PI_OVER_TWO,t,1-p)}}return function(a){return s.lerp(e,t,a)}}function zl(e,t,i,n,o){const{Cartesian3:s,defined:a,Math:r}=Cesium;let l=o;const c=Math.max(i,n);if(!a(l)){const u=e.position,d=t,h=e.up,p=e.right,v=e.frustum,b=s.subtract(u,d,Ow),y=s.magnitude(s.multiplyByScalar(h,s.dot(b,h),Sh)),x=s.magnitude(s.multiplyByScalar(p,s.dot(b,p),Sh));l=Math.min(Mw(v,y,x)*.2,1e9)}if(c<l){const u=-Math.pow((l-i)*1e6,.125),d=Math.pow((l-n)*1e6,1/8);return function(h){const p=h*(d-u)+u;return-Math.pow(p,8)/1e6+l}}return function(u){return r.lerp(i,n,u)}}function Ko(e,t){const{Math:i}=Cesium;return i.equalsEpsilon(e,i.TWO_PI,i.EPSILON11)&&(e=0),t>e+Math.PI?e+=i.TWO_PI:t<e-Math.PI&&(e-=i.TWO_PI),e}const Th={};function Sw(e,t,i,n,o,s,a){const{Cartesian2:r,Cartesian3:l,Math:c}=Cesium,u=e.camera,d=l.clone(u.position,Th),h=u.pitch,p=Ko(u.heading,n),v=Ko(u.roll,s),b=zl(u,i,d.z,i.z,a);function y(x){const M=x.time/t;u.setView({orientation:{heading:c.lerp(p,n,M),pitch:c.lerp(h,o,M),roll:c.lerp(v,s,M)}}),r.lerp(d,i,M,u.position),u.position.z=b(M)}return y}function Tw(e,t){const{Math:i}=Cesium;e.longitude<t.longitude?e.longitude+=i.TWO_PI:t.longitude+=i.TWO_PI}function Iw(e,t){const{Math:i}=Cesium,n=e.longitude-t.longitude;n<-i.PI?e.longitude+=i.TWO_PI:n>i.PI&&(t.longitude+=i.TWO_PI)}const Aw={},Dw={};function Bw(e,t,i,n,o,s,a,r,l,c){const{Cartesian3:u,Cartographic:d,defined:h,Math:p}=Cesium,v=e.camera,b=e.mapProjection.ellipsoid,y=d.clone(v.positionCartographic,Aw),x=v.pitch,M=Ko(v.heading,n),g=Ko(v.roll,s),w=b.cartesianToCartographic(i,Dw);y.longitude=p.zeroToTwoPi(y.longitude),w.longitude=p.zeroToTwoPi(w.longitude);let O=!1;if(h(r)){const P=p.zeroToTwoPi(r),k=Math.min(y.longitude,w.longitude),N=Math.max(y.longitude,w.longitude),$=P>=k&&P<=N;if(h(l)){const m=Math.abs(y.longitude-w.longitude),f=p.TWO_PI-m;($?m:f)<($?f:m)*l&&!$&&(O=!0)}else $||(O=!0)}O?Tw(y,w):Iw(y,w);const I=zl(v,i,y.height,w.height,a),R=Pw(x,o,I,c);function D(){const P=y.longitude,k=w.longitude,N=y.latitude,$=w.latitude;return function(m){const f=m.time/t,C=u.fromRadians(p.lerp(P,k,f),p.lerp(N,$,f),I(f),e.globe.ellipsoid);v.setView({destination:C,orientation:{heading:p.lerp(M,n,f),pitch:R(f),roll:p.lerp(g,s,f)}})}}return D()}function Lw(e,t,i,n,o,s,a){const{Cartesian2:r,Cartesian3:l,Math:c}=Cesium,u=e.camera,d=l.clone(u.position,Th),h=Ko(u.heading,n),p=u.frustum.right-u.frustum.left,v=zl(u,i,p,i.z,a);function b(y){const x=y.time/t;u.setView({orientation:{heading:c.lerp(h,n,x)}}),r.lerp(d,i,x,u.position);const M=v(x),g=u.frustum,w=g.top/g.right,O=(M-(g.right-g.left))*.5;g.right+=O,g.left-=O,g.top=w*g.right,g.bottom=-g.top}return b}const Ih={},jw={};function Gl(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function Ah(e,t){function i(){typeof t=="function"&&t(),e.enableInputs=!0}return i}function Fw(e,{emit:t},i){const n={},o={},s={},a={};let r,l,c,u,d;const h=ee(0),p=ee(0),v=ee(0);let b=0,y={},x=!1,M,g,w=0,O={},I=0;const R=ee(null),D=ee(null),P=C=>{var T,_;C.stopPropagation&&C.stopPropagation(),C.preventDefault&&C.preventDefault(),(T=fe(R))==null||T.hide(),(_=fe(D))==null||_.hide();const{SceneMode:E,Cartesian2:A}=Cesium;if(i.viewer.scene.mode===E.MORPHING)return!0;const L=C.currentTarget,B=L.getBoundingClientRect(),F=B.width/2,q=new A((B.right-B.left)/2,(B.bottom-B.top)/2);let Z;C instanceof MouseEvent?Z=new A(C.clientX-B.left,C.clientY-B.top):C instanceof TouchEvent&&(Z=new A(C.changedTouches[0].clientX-B.left,C.changedTouches[0].clientY-B.top));const H=A.subtract(Z,q,n),V=A.magnitude(H)/F;if(V<50/145)m(L,H);else if(V<1)f(L,H);else return!0},k=C=>{const{Cartesian2:T,Cartesian3:_,defined:E,Ellipsoid:A,Matrix4:L,Ray:B,SceneMode:F,Transforms:q}=Cesium,{viewer:Z}=i,H=Z.scene,V=H.camera,j=H.screenSpaceCameraController;if(H.mode===F.MORPHING||!j.enableInputs)return!0;if(H.mode===F.COLUMBUS_VIEW&&!j.enableTranslate||(H.mode===F.SCENE3D||H.mode===F.COLUMBUS_VIEW)&&(!j.enableLook||H.mode===F.SCENE3D&&!j.enableRotate))return;const G=new T;G.x=H.canvas.clientWidth/2,G.y=H.canvas.clientHeight/2;const J=new B,U=V.getPickRay(G,J),z=H.globe.pick(U,H,a);if(!Ii(z)||!E(z)){Z.camera.flyHome();return}const Y=Pe(i,"compassEvt");Y&&t("compassEvt",{type:"reset",camera:Z.camera,status:"start",target:C.currentTarget});const Q=q.eastNorthUpToFixedFrame(z,Z.scene.globe.ellipsoid),te=_.subtract(z,V.position,new _),X=Ph.createTween(H,{destination:L.multiplyByPoint(Q,new _(0,0,_.magnitude(te)),new _),direction:L.multiplyByPointAsVector(Q,new _(0,0,-1),new _),up:L.multiplyByPointAsVector(Q,new _(0,1,0),new _),duration:e.duration,complete:()=>{Y&&t("compassEvt",{type:"reset",camera:Z.camera,status:"end",target:C.currentTarget})},cancel:()=>{Y&&t("compassEvt",{type:"reset",camera:Z.camera,status:"cancel",target:C.currentTarget})}});H.tweens.add(X)},N=()=>{v.value=0,p.value=0},$=()=>{const{defined:C}=Cesium;C(i.viewer)?(r&&(r(),r=void 0),r=i.viewer.scene.postRender.addEventListener(function(){h.value!==i.viewer.scene.camera.heading&&(h.value=i.viewer.scene.camera.heading)})):r&&(r(),r=void 0)},m=(C,T)=>{const{Cartesian2:_,Cartesian3:E,defined:A,getTimestamp:L,Math:B,Matrix4:F,Ray:q,SceneMode:Z,Transforms:H}=Cesium;let V=i.viewer.scene,j=V.camera;const G=V.screenSpaceCameraController;if(V.mode===Z.MORPHING||!G.enableInputs)return;switch(V.mode){case Z.COLUMBUS_VIEW:if(G.enableLook)break;if(!G.enableTranslate||!G.enableTilt)return;break;case Z.SCENE3D:if(G.enableLook)break;if(!G.enableTilt||!G.enableRotate)return;break;case Cesium.SceneMode.SCENE2D:if(!G.enableTranslate)return;break}const J=Pe(i,"compassEvt");J&&t("compassEvt",{type:"orbit",camera:V.camera,status:"start",target:C}),document.removeEventListener("mousemove",c,!1),document.removeEventListener("mouseup",u,!1),document.removeEventListener("touchmove",c,!1),document.removeEventListener("touchend",u,!1),A(d)&&i.viewer.clock.onTick.removeEventListener(d),c=void 0,u=void 0,d=void 0,b=L();const U=new _;U.x=V.canvas.clientWidth/2,U.y=V.canvas.clientHeight/2;const z=new q,Y=j.getPickRay(U,z),Q=V.globe.pick(Y,V,a);A(Q)?(y=H.eastNorthUpToFixedFrame(Q||new Cesium.Cartesian3,V.globe.ellipsoid,s),x=!1):(y=H.eastNorthUpToFixedFrame(j.positionWC,V.globe.ellipsoid,s),x=!0),d=function(X){const ne=L(),re=ne-b,pe=(v.value-.5)*2.5/1e3,be=re*pe,he=p.value+B.PI_OVER_TWO,ye=Math.cos(he)*be,we=Math.sin(he)*be;V=i.viewer.scene,j=V.camera;const ge=F.clone(j.transform,o);j.lookAtTransform(y),x?(j.look(E.UNIT_Z,-ye),j.look(j.right,-we)):(j.rotateLeft(ye),j.rotateUp(we)),j.lookAtTransform(ge),b=ne};function te(X,ne){const re=Math.atan2(-X.y,X.x);p.value=B.zeroToTwoPi(re-B.PI_OVER_TWO);const pe=_.magnitude(X),be=ne/2,he=Math.min(pe/be,1),ye=.5*he*he+.5;v.value=ye}c=function(X){const ne=C.getBoundingClientRect(),re=new _((ne.right-ne.left)/2,(ne.bottom-ne.top)/2);let pe;X instanceof MouseEvent?pe=new _(X.clientX-ne.left,X.clientY-ne.top):X instanceof TouchEvent&&(pe=new _(X.changedTouches[0].clientX-ne.left,X.changedTouches[0].clientY-ne.top));const be=_.subtract(pe,re,n);te(be,ne.width),J&&t("compassEvt",{type:"orbit",camera:V.camera,status:"changing",target:C})},u=function(X){document.removeEventListener("mousemove",c,!1),document.removeEventListener("mouseup",u,!1),document.removeEventListener("touchmove",c,!1),document.removeEventListener("touchend",u,!1),A(d)&&i.viewer.clock.onTick.removeEventListener(d),c=void 0,u=void 0,d=void 0,N(),J&&t("compassEvt",{type:"orbit",camera:V.camera,status:"end",target:C})},document.addEventListener("mousemove",c,!1),document.addEventListener("mouseup",u,!1),document.addEventListener("touchmove",c,!1),document.addEventListener("touchend",u,!1),l=i.viewer.clock.onTick.addEventListener(d),te(T,C.getBoundingClientRect().width)},f=(C,T)=>{if(!e.enableCompassOuterRing)return;const _=i.viewer.scene;let E=_.camera;const A=_.screenSpaceCameraController;if(_.mode===Cesium.SceneMode.MORPHING||_.mode===Cesium.SceneMode.SCENE2D||!A.enableInputs||!A.enableLook&&(_.mode===Cesium.SceneMode.COLUMBUS_VIEW||_.mode===Cesium.SceneMode.SCENE3D&&!A.enableRotate))return;document.removeEventListener("mousemove",g,!1),document.removeEventListener("touchmove",g,!1),document.removeEventListener("mouseup",M,!1),document.removeEventListener("touchend",M,!1);const{Cartesian2:L,Cartesian3:B,defined:F,Math:q,Matrix4:Z,Ray:H,Transforms:V}=Cesium;g=void 0,M=void 0;const j=Pe(i,"compassEvt");j&&t("compassEvt",{type:"rotate",camera:_.camera,status:"start",target:C}),w=Math.atan2(-T.y,T.x);const G=new L;G.x=_.canvas.clientWidth/2,G.y=_.canvas.clientHeight/2;const J=new H,U=E.getPickRay(G,J),z=_.globe.pick(U,_,a);F(z)?O=V.eastNorthUpToFixedFrame(z||new B,_.globe.ellipsoid,s):O=V.eastNorthUpToFixedFrame(E.positionWC,_.globe.ellipsoid,s);let Y=Z.clone(E.transform,o);E.lookAtTransform(O),I=Math.atan2(E.position.y,E.position.x),B.magnitude(new B(E.position.x,E.position.y,0)),E.lookAtTransform(Y),g=function(Q){const te=C.getBoundingClientRect(),X=new L((te.right-te.left)/2,(te.bottom-te.top)/2);let ne;Q instanceof MouseEvent?ne=new L(Q.clientX-te.left,Q.clientY-te.top):Q instanceof TouchEvent&&(ne=new L(Q.changedTouches[0].clientX-te.left,Q.changedTouches[0].clientY-te.top));const re=L.subtract(ne,X,n),pe=Math.atan2(-re.y,re.x)-w,be=q.zeroToTwoPi(I-pe);E=i.viewer.scene.camera,Y=Z.clone(E.transform,o),E.lookAtTransform(O);const he=Math.atan2(E.position.y,E.position.x);E.rotateRight(be-he),E.lookAtTransform(Y),j&&t("compassEvt",{type:"rotate",camera:_.camera,status:"changing",target:C})},M=function(Q){document.removeEventListener("mousemove",g,!1),document.removeEventListener("touchmove",g,!1),document.removeEventListener("mouseup",M,!1),document.removeEventListener("touchend",M,!1),g=void 0,M=void 0,j&&t("compassEvt",{type:"rotate",camera:_.camera,status:"end",target:C})},document.addEventListener("mousemove",g,!1),document.addEventListener("touchmove",g,!1),document.addEventListener("mouseup",M,!1),document.addEventListener("touchend",M,!1)};return{heading:h,orbitCursorAngle:p,orbitCursorOpacity:v,handleDoubleClick:k,handleMouseDown:P,resetRotater:N,onTooltipBeforeShow:C=>{(g!==void 0||c!==void 0)&&(C.cancel=!0)},viewerChange:$,load:async C=>(i.viewer=C,$(),!0),unload:async()=>(document.removeEventListener("mousemove",c,!1),document.removeEventListener("mouseup",u,!1),document.removeEventListener("touchmove",c,!1),document.removeEventListener("touchend",u,!1),l&&l(),r&&r(),!0),iconOuterTooltipRef:R,iconInnerTooltipRef:D}}const kw={...Ce,compassEvt:e=>!0},Dh=Nl;var Ul=K({name:"VcCompass",props:Dh,emits:kw,setup(e,t){var i;const n=oe();n.cesiumClass="VcCompass";const o=Ne(e,t,n);if(o===void 0)return;const{t:s}=Ct(),a=Pt(n),{$services:r}=o,l=Fw(e,t,n),c=vi(e),u=ee(null),d=ee(null),h=((i=a.proxy)==null?void 0:i.$options.name)==="VcNavigation",p=ee(h),v=Ee({});de(()=>e,I=>{Be(()=>{n.mounted&&O()})},{deep:!0});const b=ae(()=>Object.assign({},Vl.innerOptions,e.innerOptions)),y=ae(()=>Object.assign({},Vl.outerOptions,e.outerOptions)),x=ae(()=>Object.assign({},Vl.markerOptions,e.markerOptions)),M=ae(()=>({transform:"translate(-50%,-50%) rotate(-"+l.heading.value+"rad)",WebkitTransform:"translate(-50%,-50%) rotate(-"+l.heading.value+"rad)",opacity:void 0,background:y.value.background,color:y.value.color})),g=ae(()=>({transform:"rotate(-"+l.orbitCursorAngle.value+"rad)",WebkitTransform:"rotate(-"+l.orbitCursorAngle.value+"rad)",opacity:l.orbitCursorOpacity.value,color:x.value.color})),w=ae(()=>({background:b.value.background,color:b.value.color}));n.createCesiumObject=async()=>u,n.mount=async()=>{var I;p.value=!0,Be(()=>{O()});const{viewer:R}=r;return(I=R.viewerWidgetResized)==null||I.raiseEvent({type:n.cesiumClass,status:"mounted",target:fe(u)}),l.load(r.viewer)},n.unmount=async()=>{var I;p.value=!1;const{viewer:R}=r;return(I=R.viewerWidgetResized)==null||I.raiseEvent({type:n.cesiumClass,status:"unmounted",target:fe(u)}),l.unload()};const O=()=>{var I;const R=c.style.value,D=(I=fe(d))==null?void 0:I.$el;if(D!==void 0){const P=D.getBoundingClientRect();R.width=`${P.width}px`,R.height=`${P.height}px`}if(typeof e.teleportToViewer=="undefined"||e.teleportToViewer){v.left=R.left,v.top=R.top,v.transform=R.transform;const P=c.attach.value;D!==void 0&&((P.bottom||P.top)&&!P.left&&!P.right&&(R.left="50%",R.transform="translate(-50%, 0)"),(P.left||P.right)&&!P.top&&!P.bottom&&(R.top="50%",R.transform="translate(0, -50%)"))}Object.assign(v,R)};return()=>{if(p.value){let I=[];I=Ei(t.slots.default,I),I.push(S(ai,{ref:d,class:"vc-compass-outerRing absolute-center",style:M.value,size:y.value.size,dense:!0,round:!0,disabled:!e.enableCompassOuterRing},()=>[S(pn,{size:y.value.size,name:y.value.icon}),y.value.tooltip?S(At,{ref:l.iconOuterTooltipRef,...y.value.tooltip,onBeforeShow:l.onTooltipBeforeShow},()=>S("strong",{},y.value.tooltip.tip||s("vc.navigation.compass.outerTip"))):ie("v-if")])),I.push(S(ai,{class:"vc-compass-innerRing absolute-center",style:w.value,size:b.value.size,dense:!0,round:!0},()=>[S(pn,{size:b.value.size,name:b.value.icon}),b.value.tooltip?S(At,{ref:l.iconInnerTooltipRef,...b.value.tooltip,onBeforeShow:l.onTooltipBeforeShow},()=>S("strong",{},b.value.tooltip.tip||s("vc.navigation.compass.innerTip"))):ie("v-if")])),I.push(g.value.opacity?S(ai,{class:"vc-compass-rotation-marker absolute-center",dense:!0,round:!0},()=>[S(pn,{size:x.value.size,name:x.value.icon,style:g.value})]):ie("v-if"));const R=S("div",{ref:u,class:`vc-compass ${c.classes.value} ${e.customClass}`,style:v,onDblclick:l.handleDoubleClick,onMousedown:l.handleMouseDown,onMouseup:l.resetRotater,onTouchend:l.resetRotater,onTouchstart:l.handleMouseDown},I);return!h&&e.teleportToViewer?S(tn,{to:r.viewer._element},R):R}else return ie("v-if")}}});const Hl={enableResetButton:{type:Boolean,default:!0},zoomAmount:{type:Number,default:2},duration:{type:Number,default:.5},durationReset:{type:Number},defaultResetView:{type:Object,default:()=>({position:{lng:105,lat:30,height:190595685e-1}})},overrideViewerCamera:{type:Boolean,default:!1},...vn,background:{type:String,default:"#3f4854"},border:{type:String,default:"solid 1px rgba(255, 255, 255, 0.2)"},borderRadius:{type:String,default:"100px"},direction:{type:String,default:"vertical",validator:e=>["vertical","horizontal"].includes(e)},zoomInOptions:{type:Object,default:()=>({icon:"vc-icons-zoom-in",size:"24px",color:"#fff",background:"transparent",round:!0,flat:!0,label:void 0,stack:!1,tooltip:{delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0}})},zoomOutOptions:{type:Object,default:()=>({icon:"vc-icons-zoom-out",size:"24px",color:"#fff",background:"transparent",round:!0,flat:!0,label:void 0,stack:!1,tooltip:{delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0}})},zoomResetOptions:{type:Object,default:()=>({icon:"vc-icons-reset",size:"24px",color:"#fff",background:"transparent",round:!0,flat:!0,label:void 0,stack:!1,tooltip:{delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0}})},customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}},Wl=bi(Hl);function Rw(e,{emit:t},i,n){const o=ee(null),s=ee(null),a=ee(null),r=h=>{c(1/e.zoomAmount,h)},l=h=>{c(e.zoomAmount,h)},c=(h,p)=>{var v,b;(v=fe(o))==null||v.hide(),(b=fe(s))==null||b.hide();const{Cartesian3:y,defined:x,IntersectionTests:M,Ray:g,SceneMode:w}=Cesium,{viewer:O}=n;if(x(O)){const I=O.scene,R=I.screenSpaceCameraController;if(!R.enableInputs||!R.enableZoom||I.mode===w.COLUMBUS_VIEW&&!R.enableTranslate)return;const D=I.camera;let P;switch(I.mode){case w.MORPHING:break;case w.SCENE2D:{D.zoomIn(D.positionCartographic.height*(1-h));break}default:{let k;if(x(O.trackedEntity)?k=new Cesium.Cartesian3:k=d(O.scene),Cesium.defined(k))P={direction:D.direction,up:D.up};else{const A=new g(D.worldToCameraCoordinatesPoint(I.globe.ellipsoid.cartographicToCartesian(D.positionCartographic)),D.directionWC);k=M.grazingAltitudeLocation(A,I.globe.ellipsoid),P={heading:D.heading,pitch:D.pitch,roll:D.roll}}const N=new y,$=y.subtract(D.position,k,N),m=y.multiplyByScalar($,h,$),f=y.add(k,m,k),C=h<1?"zoomIn":"zoomOut",T=p.currentTarget,_=tr(D.positionCartographic.height).toFixed(0),E=Pe(i,"zoomEvt");E&&t("zoomEvt",{type:C,camera:O.camera,status:"start",target:T,level:_}),Cesium.defined(O.trackedEntity)||I.mode===w.COLUMBUS_VIEW?D.position=f:D.flyTo({destination:f,orientation:P,duration:e.duration,convert:!1,complete:()=>{E&&t("zoomEvt",{type:C,camera:O.camera,status:"end",target:T,level:_})},cancel:()=>{E&&t("zoomEvt",{type:C,camera:O.camera,status:"cancel",target:T,level:_})}})}}}},u=h=>{var p;(p=fe(a))==null||p.hide();const{viewer:v}=n;if(v.scene.screenSpaceCameraController.enableInputs)if(Cesium.defined(v.trackedEntity)){const b=v.trackedEntity;v.trackedEntity=void 0,v.trackedEntity=b}else{const b=Pe(i,"zoomEvt"),y=h.currentTarget,x=tr(v.camera.positionCartographic.height).toFixed(0);b&&t("zoomEvt",{type:"zoomReset",camera:v.camera,status:"start",target:y,level:x});const M=()=>{b&&t("zoomEvt",{type:"zoomReset",camera:v.camera,status:"end",target:y,level:x})},g=()=>{b&&t("zoomEvt",{type:"zoomReset",camera:v.camera,status:"cancel",target:y,level:x})},w=e.defaultResetView,O={duration:e.durationReset,complete:M,cancel:g};S1(v,w,O)}},d=h=>{const{defined:p,IntersectionTests:v,Ray:b}=Cesium,y=new b(h.camera.positionWC,h.camera.directionWC),x=v.rayEllipsoid(y,h.globe.ellipsoid);return p(x)?b.getPoint(y,x.start):v.grazingAltitudeLocation(y,h.globe.ellipsoid)};return{zoomIn:r,zoomOut:l,zoomReset:u,zoomInTooltipRef:o,zoomOutTooltipRef:s,resetTooltipRef:a}}const $w={...Ce,zoomEvt:e=>!0},Bh=Hl;var ql=K({name:"VcZoomControl",props:Bh,emits:$w,setup(e,t){var i;const n=oe();n.cesiumClass="VcZoomControl",n.cesiumEvents=[];const o=Ne(e,t,n);if(o===void 0)return;const{t:s}=Ct(),{$services:a}=o,r=Rw(e,t,n,a),l=vi(e),c=ee(null),u=ee(null),d=ee(null),h=ee(null),p=((i=Pt(n).proxy)==null?void 0:i.$options.name)==="VcNavigation",v=ee(p),b=Ee({});de(()=>e,O=>{Be(()=>{n.mounted&&g()})},{deep:!0});const y=ae(()=>Object.assign({},Wl.zoomOutOptions,e.zoomOutOptions)),x=ae(()=>Object.assign({},Wl.zoomInOptions,e.zoomInOptions)),M=ae(()=>Object.assign({},Wl.zoomResetOptions,e.zoomResetOptions));n.createCesiumObject=async()=>{const{viewer:O}=a;if(e.overrideViewerCamera){const I=e.defaultResetView;Ys(O,I)}return c},n.mount=async()=>{var O;v.value=!0,Be(()=>{g()});const{viewer:I}=a;return(O=I.viewerWidgetResized)==null||O.raiseEvent({type:n.cesiumClass,status:"mounted",target:fe(c)}),!0},n.unmount=async()=>{var O;v.value=!1;const{viewer:I}=a;return(O=I.viewerWidgetResized)==null||O.raiseEvent({type:n.cesiumClass,status:"unmounted",target:fe(c)}),!0};const g=()=>{var O,I,R;const D=l.style.value;if(b.left=D.left,b.top=D.top,b.transform=D.transform,D.flexDirection=e.direction==="vertical"?"column":"row",D.background=e.background,D.borderRadius=e.borderRadius,D.border=e.border,!p){const P=(O=fe(u))==null?void 0:O.$el,k=(I=fe(d))==null?void 0:I.$el,N=(R=fe(h))==null?void 0:R.$el;let $=0,m=0;if(P!==void 0){const f=P.getBoundingClientRect();e.direction==="horizontal"?($+=f.width,m=f.height>m?f.height:m):(m+=f.height,$=f.width>$?f.width:$)}if(k!==void 0){const f=k.getBoundingClientRect();e.direction==="horizontal"?($+=f.width,m=f.height>m?f.height:m):(m+=f.height,$=f.width>$?f.width:$)}if(N!==void 0){const f=N.getBoundingClientRect();e.direction==="horizontal"?($+=f.width,m=f.height>m?f.height:m):(m+=f.height,$=f.width>$?f.width:$)}if(D.width=`${$+4}px`,D.height=`${m+4}px`,typeof e.teleportToViewer=="undefined"||e.teleportToViewer){const f=l.attach.value;(f.bottom||f.top)&&!f.left&&!f.right&&(D.left="50%",D.transform="translate(-50%, 0)"),(f.left||f.right)&&!f.top&&!f.bottom&&(D.top="50%",D.transform="translate(0, -50%)")}}Object.assign(b,D)},w=(O,I)=>{var R,D,P;let k,N,$,m;I==="zoomIn"?(k=u,N=r.zoomInTooltipRef,$=((R=O.tooltip)==null?void 0:R.tip)||s("vc.navigation.zoomCotrol.zoomInTip"),m=r.zoomIn):I==="zoomOut"?(k=h,N=r.zoomOutTooltipRef,$=((D=O.tooltip)==null?void 0:D.tip)||s("vc.navigation.zoomCotrol.zoomOutTip"),m=r.zoomOut):I==="zoomReset"&&(k=d,N=r.resetTooltipRef,$=((P=O.tooltip)==null?void 0:P.tip)||s("vc.navigation.zoomCotrol.zoomResetTip"),m=r.zoomReset);const f=[];return f.push(S(pn,{name:O.icon,size:O.size})),f.push(S("div",null,O.label)),O.tooltip?f.push(S(At,{ref:N,...O.tooltip},()=>S("strong",null,$))):f.push(ie("v-if")),S(ai,{class:`vc-${se(I)}`,ref:k,size:O.size,flat:O.flat,stack:O.stack,round:O.round,dense:!0,style:{color:O.color,background:O.background},onClick:m},()=>Ei(t.slots.default,f))};return Object.assign(n.proxy,{zoomIn:()=>r.zoomIn,zoomOut:()=>r.zoomOut,zoomReset:()=>r.zoomReset}),()=>{if(v.value){const O=[];O.push(S("li",null,w(x.value,"zoomIn"))),e.enableResetButton?O.push(S("li",null,w(M.value,"zoomReset"))):O.push(ie("v-if")),O.push(S("li",null,w(y.value,"zoomOut")));const I=S("div",{ref:c,class:`vc-zoom-control ${l.classes.value} ${e.customClass}`,style:b},S("ul",{class:"vc-list"},O));return!p&&e.teleportToViewer?S(tn,{to:a.viewer._element},I):I}else return ie("v-if")}}});const Nw=K({name:"VcPrintView",props:{options:Object},setup(e){const t=ee(!1),i=ee(!1),n=oe();n.cesiumClass="VcPrintView";const{t:o}=Ct(),s=()=>{var l,c;if(t.value)return;const u=(l=e.options)==null?void 0:l.printWindow.document.getElementsByTagName("img");if(u.length===0)return;let d=!0;for(let h=0;d&&h<u.length;++h)d=u[h].complete;d&&(r(),t.value=d,t.value&&!i.value&&((c=e.options)!=null&&c.readyCallback&&e.options.readyCallback(e.options.printWindow),i.value=!0))};let a;const r=()=>{a&&a()};return Eo(()=>{var l;const c=(l=e.options)==null?void 0:l.printWindow,u=window,d=c==null?void 0:c.setInterval(s,200),h=u.setInterval(s,200);a=()=>{c.clearInterval(d),u.clearInterval(h),a=void 0}}),nt(()=>{r()}),()=>{var l,c,u,d,h,p;const v=[];if(v.push(S("p",{},S("img",{src:(l=e.options)==null?void 0:l.image,alt:o("vc.navigation.screenshot"),class:"vc-map-image"}))),(c=e.options)!=null&&c.credits.length&&(u=e.options)!=null&&u.showCredit?v.push(S("h1",{},o("vc.navigation.credit"))):v.push(ie("v-if")),(d=e.options)!=null&&d.credits.length&&(h=e.options)!=null&&h.showCredit){const b=[];(p=e.options)==null||p.credits.forEach(y=>{b.push(S("li",{innerHTML:y}))}),v.push(S("ul",{},b))}else v.push(ie("v-if"));return S("div",{},v)}}}),Vw=`
.background {
width: 100%;
fill: rgba(255, 255, 255, 1.0);
}
.map-image {
max-width: 95vw;
max-height: 95vh;
}
.layer-legends {
display: inline;
float: left;
padding-left: 20px;
padding-right: 20px;
}
.layer-title {
font-weight: bold;
}
h1, h2, h3 {
clear: both;
}
`,zw=e=>{const{printWindow:t=window.open(),closeCallback:i,title:n}=e;i&&t.addEventListener("unload",()=>{i(t)}),t.document.open(),t.document.close(),t.document.head.innerHTML=`
<meta charset="UTF-8">
<title>${e.title}</title>
<style>${Vw}</style>
`,t.document.body.innerHTML='<div id="print"></div>',e.printWindow=e.printWindow||t,Ub(Nw,{options:e}).mount(t.document.getElementById("print"))};var Lh={showCredit:{type:Boolean,default:!0},printAutomatically:{type:Boolean,default:!1},showPrintView:{type:Boolean,default:!0},downloadAutomatically:{type:Boolean,default:!1},...vn,icon:{type:String,default:"vc-icons-capture"},size:{type:String,default:"24px"},color:{type:String,default:"#3f4854"},background:{type:String,default:"#fff"},round:{type:Boolean,default:!0},flat:{type:Boolean,default:!1},label:String,stack:{type:Boolean,default:!1},tooltip:{type:[Boolean,Object],default:()=>({delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0})},screenshotName:String,customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}};function Gw(e){const t=qo();let i=0;const n=setTimeout(function(){t.reject(!1)},1e4);function o(){clearTimeout(n)}function s(){i<=0&&t.resolve()}return e.matchMedia&&e.matchMedia("print").addListener(function(a){o(),a.matches?++i:(--i,s())}),e.onbeforeprint=function(){o(),++i},e.onafterprint=function(){o(),--i,s()},e.document.execCommand("print",!0,null)||e.print(),t.promise}const Uw={...Ce,printEvt:e=>!0},jh=Lh;var Ql=K({name:"VcPrint",props:jh,emits:Uw,setup(e,t){var i;const n=oe();n.cesiumClass="VcPrint",n.cesiumEvents=[];const o=Ne(e,t,n);if(o===void 0)return;const{t:s}=Ct(),{$services:a}=o,r=ee(null),l=ee(null),c=ee(null),u=vi(e),d=ee(!1),h=((i=Pt(n).proxy)==null?void 0:i.$options.name)==="VcNavigation",p=ee(h),v=Ee({});de(()=>e,I=>{Be(()=>{n.mounted&&b()})},{deep:!0}),n.createCesiumObject=async()=>r,n.mount=async()=>{var I;p.value=!0,Be(()=>{b()});const{viewer:R}=a;return(I=R.viewerWidgetResized)==null||I.raiseEvent({type:n.cesiumClass,status:"mounted",target:fe(r)}),!0},n.unmount=async()=>{var I;p.value=!1;const{viewer:R}=a;return(I=R.viewerWidgetResized)==null||I.raiseEvent({type:n.cesiumClass,status:"unmounted",target:fe(r)}),!0};const b=()=>{var I;const R=u.style.value;if(v.left=R.left,v.top=R.top,v.transform=R.transform,!h){const D=u.attach.value;((I=fe(c))==null?void 0:I.$el)!==void 0&&(typeof e.teleportToViewer=="undefined"||e.teleportToViewer)&&((D.bottom||D.top)&&!D.left&&!D.right&&(R.left="50%",R.transform="translate(-50%, 0)"),(D.left||D.right)&&!D.top&&!D.bottom&&(R.top="50%",R.transform="translate(0, -50%)"))}Object.assign(v,R)},y=()=>{var I;(I=fe(l))==null||I.hide();const{viewer:R}=a;P1(R).then(D=>{if(e.downloadAutomatically){const P=document.createElement("a");P.download=e.screenshotName||s("vc.navigation.print.screenshot"),P.style.display="none",P.href=D,document.body.appendChild(P),P.click(),document.body.removeChild(P)}(e.printAutomatically||e.showPrintView)&&(e.showPrintView?M(D):e.printAutomatically&&x(D)),Pe(n,"printEvt")&&t.emit("printEvt",{type:"capture",image:D,status:"end"})})},x=I=>{g(!0,!0,I)},M=I=>{g(!1,!1,I)},g=(I,R,D)=>{d.value=!0;let P;I&&(P=document.createElement("iframe"),document.body.appendChild(P));const{viewer:k}=a;zw({image:D,showCredit:e.showCredit,credits:w(k),printWindow:P?P.contentWindow:void 0,title:s("vc.navigation.print.printViewTitle"),readyCallback:N=>{R&&Gw(N).catch($=>{o.logger.warn($)}).then(()=>{P&&document.body.removeChild(P),I&&(d.value=!1)})},closeCallback:N=>{I&&(d.value=!1)}}),I||(d.value=!1)},w=I=>I.scene.frameState.creditDisplay._currentFrameCredits.screenCredits.values.concat(I.scene.frameState.creditDisplay._currentFrameCredits.lightboxCredits.values).map(R=>R.html),O=I=>{d.value&&(I.cancel=!0)};return()=>{if(p.value){const I=[];I.push(S(pn,{name:e.icon,size:e.size})),I.push(S("div",null,e.label)),ot(e.tooltip)?I.push(S(At,{ref:l,onBeforeShow:O,...e.tooltip},()=>S("strong",null,ot(e.tooltip)&&e.tooltip.tip||s("vc.navigation.print.printTip")))):I.push(ie("v-if"));const R=[S(ai,{ref:c,size:e.size,disabled:d.value,flat:e.flat,stack:e.stack,round:e.round,style:{color:e.color,background:e.background},dense:!0,onClick:y},()=>I)],D=S("div",{ref:r,class:`vc-print ${u.classes.value} ${e.customClass}`,style:v},R);return!h&&e.teleportToViewer?S(tn,{to:a.viewer._element},D):D}else return ie("v-if")}}}),fn=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Zl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hs={exports:{}};hs.exports,function(e,t){(function(i,n){e.exports=n()})(fn,function(){function i(d){var h=[];return d.AMapUI&&h.push(n(d.AMapUI)),d.Loca&&h.push(o(d.Loca)),Promise.all(h)}function n(d){return new Promise(function(h,p){var v=[];if(d.plugins)for(var b=0;b<d.plugins.length;b+=1)a.AMapUI.plugins.indexOf(d.plugins[b])==-1&&v.push(d.plugins[b]);if(r.AMapUI===s.failed)p("\u524D\u6B21\u8BF7\u6C42 AMapUI \u5931\u8D25");else if(r.AMapUI===s.notload){r.AMapUI=s.loading,a.AMapUI.version=d.version||a.AMapUI.version,b=a.AMapUI.version;var y=document.body||document.head,x=document.createElement("script");x.type="text/javascript",x.src="https://webapi.amap.com/ui/"+b+"/main.js",x.onerror=function(M){r.AMapUI=s.failed,p("\u8BF7\u6C42 AMapUI \u5931\u8D25")},x.onload=function(){if(r.AMapUI=s.loaded,v.length)window.AMapUI.loadUI(v,function(){for(var M=0,g=v.length;M<g;M++){var w=v[M].split("/").slice(-1)[0];window.AMapUI[w]=arguments[M]}for(h();l.AMapUI.length;)l.AMapUI.splice(0,1)[0]()});else for(h();l.AMapUI.length;)l.AMapUI.splice(0,1)[0]()},y.appendChild(x)}else r.AMapUI===s.loaded?d.version&&d.version!==a.AMapUI.version?p("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C AMapUI \u6DF7\u7528"):v.length?window.AMapUI.loadUI(v,function(){for(var M=0,g=v.length;M<g;M++){var w=v[M].split("/").slice(-1)[0];window.AMapUI[w]=arguments[M]}h()}):h():d.version&&d.version!==a.AMapUI.version?p("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C AMapUI \u6DF7\u7528"):l.AMapUI.push(function(M){M?p(M):v.length?window.AMapUI.loadUI(v,function(){for(var g=0,w=v.length;g<w;g++){var O=v[g].split("/").slice(-1)[0];window.AMapUI[O]=arguments[g]}h()}):h()})})}function o(d){return new Promise(function(h,p){if(r.Loca===s.failed)p("\u524D\u6B21\u8BF7\u6C42 Loca \u5931\u8D25");else if(r.Loca===s.notload){r.Loca=s.loading,a.Loca.version=d.version||a.Loca.version;var v=a.Loca.version,b=a.AMap.version.startsWith("2"),y=v.startsWith("2");if(b&&!y||!b&&y)p("JSAPI \u4E0E Loca \u7248\u672C\u4E0D\u5BF9\u5E94\uFF01\uFF01");else{b=a.key,y=document.body||document.head;var x=document.createElement("script");x.type="text/javascript",x.src="https://webapi.amap.com/loca?v="+v+"&key="+b,x.onerror=function(M){r.Loca=s.failed,p("\u8BF7\u6C42 AMapUI \u5931\u8D25")},x.onload=function(){for(r.Loca=s.loaded,h();l.Loca.length;)l.Loca.splice(0,1)[0]()},y.appendChild(x)}}else r.Loca===s.loaded?d.version&&d.version!==a.Loca.version?p("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C Loca \u6DF7\u7528"):h():d.version&&d.version!==a.Loca.version?p("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C Loca \u6DF7\u7528"):l.Loca.push(function(M){M?p(M):p()})})}if(!window)throw Error("AMap JSAPI can only be used in Browser.");var s;(function(d){d.notload="notload",d.loading="loading",d.loaded="loaded",d.failed="failed"})(s||(s={}));var a={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},r={AMap:s.notload,AMapUI:s.notload,Loca:s.notload},l={AMap:[],AMapUI:[],Loca:[]},c=[],u=function(d){typeof d=="function"&&(r.AMap===s.loaded?d(window.AMap):c.push(d))};return{load:function(d){return new Promise(function(h,p){if(r.AMap==s.failed)p("");else if(r.AMap==s.notload){var v=d.key,b=d.version,y=d.plugins;v?(window.AMap&&location.host!=="lbs.amap.com"&&p("\u7981\u6B62\u591A\u79CDAPI\u52A0\u8F7D\u65B9\u5F0F\u6DF7\u7528"),a.key=v,a.AMap.version=b||a.AMap.version,a.AMap.plugins=y||a.AMap.plugins,r.AMap=s.loading,b=document.body||document.head,window.___onAPILoaded=function(M){if(delete window.___onAPILoaded,M)r.AMap=s.failed,p(M);else for(r.AMap=s.loaded,i(d).then(function(){h(window.AMap)}).catch(p);c.length;)c.splice(0,1)[0]()},y=document.createElement("script"),y.type="text/javascript",y.src="https://webapi.amap.com/maps?callback=___onAPILoaded&v="+a.AMap.version+"&key="+v+"&plugin="+a.AMap.plugins.join(","),y.onerror=function(M){r.AMap=s.failed,p(M)},b.appendChild(y)):p("\u8BF7\u586B\u5199key")}else if(r.AMap==s.loaded)if(d.key&&d.key!==a.key)p("\u591A\u4E2A\u4E0D\u4E00\u81F4\u7684 key");else if(d.version&&d.version!==a.AMap.version)p("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C JSAPI \u6DF7\u7528");else{if(v=[],d.plugins)for(b=0;b<d.plugins.length;b+=1)a.AMap.plugins.indexOf(d.plugins[b])==-1&&v.push(d.plugins[b]);v.length?window.AMap.plugin(v,function(){i(d).then(function(){h(window.AMap)}).catch(p)}):i(d).then(function(){h(window.AMap)}).catch(p)}else if(d.key&&d.key!==a.key)p("\u591A\u4E2A\u4E0D\u4E00\u81F4\u7684 key");else if(d.version&&d.version!==a.AMap.version)p("\u4E0D\u5141\u8BB8\u591A\u4E2A\u7248\u672C JSAPI \u6DF7\u7528");else{var x=[];if(d.plugins)for(b=0;b<d.plugins.length;b+=1)a.AMap.plugins.indexOf(d.plugins[b])==-1&&x.push(d.plugins[b]);u(function(){x.length?window.AMap.plugin(x,function(){i(d).then(function(){h(window.AMap)}).catch(p)}):i(d).then(function(){h(window.AMap)}).catch(p)})}})},reset:function(){delete window.AMap,delete window.AMapUI,delete window.Loca,a={key:"",AMap:{version:"1.4.15",plugins:[]},AMapUI:{version:"1.1",plugins:[]},Loca:{version:"1.3.2"}},r={AMap:s.notload,AMapUI:s.notload,Loca:s.notload},l={AMap:[],AMapUI:[],Loca:[]}}}})}(hs,hs.exports);var Hw=hs.exports,Ww=Zl(Hw),Fh={geolocation:{type:Object,default:()=>({enableHighAccuracy:!0,timeout:5e3,maximumAge:0})},amap:Object,id:{type:String,default:"My Location"},pointColor:{type:[Array,Object,String],default:"#08ABD5"},pixelSize:{type:Number,default:25/2},outlineWidth:{type:Number,default:3},outlineColor:{type:[Array,Object,String],default:"#ffffff"},level:{type:Number,default:6},duration:{type:Number,default:3},factor:{type:Number,default:.01},maximumHeight:Number,hpr:{type:Array,default:()=>[0,0,3e3]},customAPI:Function,customApi:Function,description:Function,...vn,icon:{type:String,default:"vc-icons-geolocation"},size:{type:String,default:"24px"},color:{type:String,default:"#3f4854"},background:{type:String,default:"#fff"},round:{type:Boolean,default:!0},flat:{type:Boolean,default:!1},label:String,stack:{type:Boolean,default:!1},tooltip:{type:[Boolean,Object],default:()=>({delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0})},loadingType:{type:String,default:"puff"},customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}};const qw={...Ce,locationEvt:e=>!0},kh=Fh;var Jl=K({name:"VcMyLocation",props:kh,emits:qw,setup(e,t){var i;const n=oe();n.cesiumClass="VcMyLocation",n.cesiumEvents=[];const o=Ne(e,t,n);if(o===void 0)return;const{$services:s}=o,{t:a}=Ct(),r=ee(null),l=ee(null),c=ee(null),u=ee(!1),d=vi(e),h=((i=Pt(n).proxy)==null?void 0:i.$options.name)==="VcNavigation",p=ee(h),v=Ee({});let b,y;de(()=>e,P=>{Be(()=>{n.mounted&&M()})},{deep:!0});const x=ae(()=>u.value?a("vc.navigation.myLocation.positioning"):ot(e.tooltip)&&e.tooltip.tip||a("vc.navigation.myLocation.myLocationTip"));n.createCesiumObject=async()=>{const{viewer:P}=s,{CustomDataSource:k}=Cesium,N=P.dataSources.getByName("__vc-myLocation__");N.length?b=N[0]:P.dataSources.add(new k("__vc-myLocation__")).then(f=>{b=f});let $;if(e.amap&&e.amap.key){const f=e.amap.options;$=new Promise((C,T)=>{var _,E;Ww.load({key:(_=e.amap)==null?void 0:_.key,version:(E=e.amap)==null?void 0:E.version,plugins:["AMap.Geolocation"]}).then(A=>{y=new A.Geolocation(f),C(y)}).catch(A=>{o.logger.error(A),T(A)})})}const m=new Promise((f,C)=>{Be(()=>{f(fe(r))})});return Promise.all([m,$]).then(f=>f[0])},n.mount=async()=>{var P;p.value=!0,Be(()=>{M()});const{viewer:k}=s;return(P=k.viewerWidgetResized)==null||P.raiseEvent({type:n.cesiumClass,status:"mounted",target:fe(r)}),!0},n.unmount=async()=>{var P;p.value=!1;const{viewer:k}=s;if(y){const N=document.getElementsByTagName("script"),$=[];for(const m of N)m.src.indexOf("/webapi.amap.com/maps")>-1&&$.push(m);$.forEach(m=>{document.getElementsByTagName("body")[0].removeChild(m)})}return(P=k.viewerWidgetResized)==null||P.raiseEvent({type:n.cesiumClass,status:"unmounted",target:fe(r)}),k.dataSources.remove(b,!0)};const M=()=>{var P;const k=d.style.value;if(v.left=k.left,v.top=k.top,v.transform=k.transform,!h){const N=d.attach.value;((P=fe(c))==null?void 0:P.$el)!==void 0&&(typeof e.teleportToViewer=="undefined"||e.teleportToViewer)&&((N.bottom||N.top)&&!N.left&&!N.right&&(k.left="50%",k.transform="translate(-50%, 0)"),(N.left||N.right)&&!N.top&&!N.bottom&&(k.top="50%",k.transform="translate(0, -50%)"))}Object.assign(v,k)},g=()=>{var P;(P=fe(l))==null||P.hide(),u.value=!0;const k=e.customApi||e.customAPI;if(bt(k)){const N=k(I);w(N)}else y&&e.amap&&e.amap.key?y.getCurrentPosition((N,$)=>{var m;if(N==="complete"){let f=[$.position.lng,$.position.lat];(m=e.amap)!=null&&m.transformToWGS84&&(f=al(f[0],f[1])),w({lng:f[0],lat:f[1],address:$.formattedAddress},$)}else I(a("vc.navigation.myLocation.fail"),$.message)}):e.geolocation?navigator.geolocation.getCurrentPosition(N=>{w({lng:N.coords.longitude,lat:N.coords.latitude},N)},I,{enableHighAccuracy:e.geolocation.enableHighAccuracy,timeout:e.geolocation.timeout,maximumAge:e.geolocation.maximumAge}):I(a("vc.navigation.myLocation.fail"))},w=(P,k)=>{var N;const $=P.lng,m=P.lat,f=P.address,{Rectangle:C,sampleTerrain:T,defined:_,SceneMode:E}=Cesium,{viewer:A}=s;b.entities.removeAll();const L=b.entities.add({id:e.id,position:tt([$,m],A.scene.globe.ellipsoid),point:{color:Te(e.pointColor),pixelSize:e.pixelSize,outlineWidth:e.outlineWidth,outlineColor:Te(e.outlineColor)},properties:{...k},description:((N=e.description)==null?void 0:N.call(this,P,k))||O({[a("vc.navigation.myLocation.lng")]:$,[a("vc.navigation.myLocation.lat")]:m,[a("vc.navigation.myLocation.address")]:f})}),B=Pe(n,"locationEvt");B&&t.emit("locationEvt",{type:"location",position:P,detail:k,entity:L});const F={duration:e.duration};if(_(e.maximumHeight)&&(F.maximumHeight=e.maximumHeight),_(e.hpr)&&et(e.hpr)&&(F.offset=new Cesium.HeadingPitchRange(e.hpr[0],e.hpr[1],e.hpr[2])),A.scene.mode===E.SCENE2D||A.scene.mode===E.COLUMBUS_VIEW)return A.flyTo(L,F).then(()=>{u.value=!1,B&&t.emit("locationEvt",{type:"zoomIn",camera:A.camera,status:"end"})});const q=e.factor,Z=C.fromDegrees($-q,m-q,$+q,m+q),H=A.scene.camera,V=H.getRectangleCameraCoordinates(Z),j=A.scene.globe.ellipsoid.cartesianToCartographic(V),G=A.scene.globe.terrainProvider,J=e.level,U=[C.center(Z)];return T(G,J,U).then(function(z){const Y={longitude:j.longitude,latitude:j.latitude,height:j.height+z[0].height},Q=A.scene.globe.ellipsoid.cartographicToCartesian(Y);B&&t.emit("locationEvt",{type:"zoomIn",camera:A.camera,status:"start"}),H.flyTo({duration:e.duration,destination:Q,complete:()=>{u.value=!1,B&&t.emit("locationEvt",{type:"zoomIn",camera:A.camera,status:"end"})},cancel:()=>{u.value=!1,B&&t.emit("locationEvt",{type:"zoomIn",camera:A.camera,status:"cancel"})}})})},O=(P,k)=>{let N="";P instanceof Cesium.PropertyBag&&(P=P.getValue(Cesium.JulianDate.now()));for(let $ in P)if(Object.prototype.hasOwnProperty.call(P,$)){if($===k)continue;let m=P[$];typeof m=="object"&&(m=O(m)),$=$.replace(/_/g," "),Cesium.defined(m)&&(N+="<tr><th>"+$+"</th><td>"+m+"</td></tr>")}return N.length>0&&(N='<table class="cesium-infoBox-defaultTable"><tbody>'+N+"</tbody></table>"),N},I=(...P)=>{u.value=!1,o.logger.error(...P)},R=()=>{switch(e.loadingType){case"bars":return cs;case"ios":return Bl;case"orbit":return Ll;case"oval":return jl;case"puff":return Fl;case"tail":return kl;default:return cs}},D=P=>{u.value&&(P.cancel=!0)};return()=>{if(p.value){const P=[];P.push(S(pn,{name:e.icon,size:e.size})),P.push(S("div",null,e.label)),ot(e.tooltip)?P.push(S(At,{ref:l,onBeforeShow:D,...e.tooltip},()=>S("strong",null,x.value))):P.push(ie("v-if"));const k=S("div",{ref:r,class:`vc-my-location ${d.classes.value} ${e.customClass}`,style:v},[S(ai,{ref:c,size:e.size,flat:e.flat,stack:e.stack,round:e.round,loading:u.value,dense:!0,style:{color:e.color,background:e.background},onClick:g},{default:()=>P,loading:()=>S(R())})]);return!h&&e.teleportToViewer?S(tn,{to:s.viewer._element},k):k}else return ie("v-if")}}});function Qw(e,t,i){const n={latitude:"",longitude:"",elevation:""},{defaultValue:o,defined:s}=Cesium,a=o(i,{}),r=o(a.decimal,5);return a.rangeType===0?(n.latitude=Math.abs(t).toFixed(r)+"\xB0"+(t<0?"S":"N"),n.longitude=Math.abs(e).toFixed(r)+"\xB0"+(e<0?"W":"E")):a.rangeType===1?(n.latitude=t.toFixed(r)+"\xB0",n.longitude=e.toFixed(r)+"\xB0"):a.rangeType===2&&(n.latitude=t.toFixed(r)+"\xB0",n.longitude=(e<0?360+e:e).toFixed(r)+"\xB0"),s(a.height)?n.elevation=Math.round(a.height)+(s(a.errorBar)?"\xB1"+Math.round(a.errorBar):"")+"m":n.elevation="",n}function Zw(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}var zn=1,Gn=2,so=3,Jw=4,Xl=5,Rh=6378137,Xw=6356752314e-3,$h=.0066943799901413165,ea=484813681109536e-20,me=Math.PI/2,Yw=.16666666666666666,Kw=.04722222222222222,e_=.022156084656084655,xe=1e-10,Gt=.017453292519943295,Qi=57.29577951308232,We=Math.PI/4,ta=Math.PI*2,Et=3.14159265359,si={};si.greenwich=0,si.lisbon=-9.131906111111,si.paris=2.337229166667,si.bogota=-74.080916666667,si.madrid=-3.687938888889,si.rome=12.452333333333,si.bern=7.439583333333,si.jakarta=106.807719444444,si.ferro=-17.666666666667,si.brussels=4.367975,si.stockholm=18.058277777778,si.athens=23.7163375,si.oslo=10.722916666667;var t_={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},Nh=/[\s_\-\/\(\)]/g;function gn(e,t){if(e[t])return e[t];for(var i=Object.keys(e),n=t.toLowerCase().replace(Nh,""),o=-1,s,a;++o<i.length;)if(s=i[o],a=s.toLowerCase().replace(Nh,""),a===n)return e[s]}function Yl(e){var t={},i=e.split("+").map(function(r){return r.trim()}).filter(function(r){return r}).reduce(function(r,l){var c=l.split("=");return c.push(!0),r[c[0].toLowerCase()]=c[1],r},{}),n,o,s,a={proj:"projName",datum:"datumCode",rf:function(r){t.rf=parseFloat(r)},lat_0:function(r){t.lat0=r*Gt},lat_1:function(r){t.lat1=r*Gt},lat_2:function(r){t.lat2=r*Gt},lat_ts:function(r){t.lat_ts=r*Gt},lon_0:function(r){t.long0=r*Gt},lon_1:function(r){t.long1=r*Gt},lon_2:function(r){t.long2=r*Gt},alpha:function(r){t.alpha=parseFloat(r)*Gt},gamma:function(r){t.rectified_grid_angle=parseFloat(r)},lonc:function(r){t.longc=r*Gt},x_0:function(r){t.x0=parseFloat(r)},y_0:function(r){t.y0=parseFloat(r)},k_0:function(r){t.k0=parseFloat(r)},k:function(r){t.k0=parseFloat(r)},a:function(r){t.a=parseFloat(r)},b:function(r){t.b=parseFloat(r)},r_a:function(){t.R_A=!0},zone:function(r){t.zone=parseInt(r,10)},south:function(){t.utmSouth=!0},towgs84:function(r){t.datum_params=r.split(",").map(function(l){return parseFloat(l)})},to_meter:function(r){t.to_meter=parseFloat(r)},units:function(r){t.units=r;var l=gn(t_,r);l&&(t.to_meter=l.to_meter)},from_greenwich:function(r){t.from_greenwich=r*Gt},pm:function(r){var l=gn(si,r);t.from_greenwich=(l||parseFloat(r))*Gt},nadgrids:function(r){r==="@null"?t.datumCode="none":t.nadgrids=r},axis:function(r){var l="ewnsud";r.length===3&&l.indexOf(r.substr(0,1))!==-1&&l.indexOf(r.substr(1,1))!==-1&&l.indexOf(r.substr(2,1))!==-1&&(t.axis=r)},approx:function(){t.approx=!0}};for(n in i)o=i[n],n in a?(s=a[n],typeof s=="function"?s(o):t[s]=o):t[n]=o;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var ia=1,Vh=2,zh=3,ms=4,Gh=5,Kl=-1,i_=/\s/,n_=/[A-Za-z]/,o_=/[A-Za-z84_]/,ps=/[,\]]/,Uh=/[\d\.E\-\+]/;function rn(e){if(typeof e!="string")throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=ia}rn.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==ms)for(;i_.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case ia:return this.neutral(e);case Vh:return this.keyword(e);case ms:return this.quoted(e);case Gh:return this.afterquote(e);case zh:return this.number(e);case Kl:return}},rn.prototype.afterquote=function(e){if(e==='"'){this.word+='"',this.state=ms;return}if(ps.test(e)){this.word=this.word.trim(),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in afterquote yet, index '+this.place)},rn.prototype.afterItem=function(e){if(e===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=ia;return}if(e==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=ia,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Kl);return}},rn.prototype.number=function(e){if(Uh.test(e)){this.word+=e;return}if(ps.test(e)){this.word=parseFloat(this.word),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in number yet, index '+this.place)},rn.prototype.quoted=function(e){if(e==='"'){this.state=Gh;return}this.word+=e},rn.prototype.keyword=function(e){if(o_.test(e)){this.word+=e;return}if(e==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=ia;return}if(ps.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in keyword yet, index '+this.place)},rn.prototype.neutral=function(e){if(n_.test(e)){this.word=e,this.state=Vh;return}if(e==='"'){this.word="",this.state=ms;return}if(Uh.test(e)){this.word=e,this.state=zh;return}if(ps.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in neutral yet, index '+this.place)},rn.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Kl)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function a_(e){var t=new rn(e);return t.output()}function Hh(e,t,i){Array.isArray(t)&&(i.unshift(t),t=null);var n=t?{}:e,o=i.reduce(function(s,a){return ro(a,s),s},n);t&&(e[t]=o)}function ro(e,t){if(!Array.isArray(e)){t[e]=!0;return}var i=e.shift();if(i==="PARAMETER"&&(i=e.shift()),e.length===1){if(Array.isArray(e[0])){t[i]={},ro(e[0],t[i]);return}t[i]=e[0];return}if(!e.length){t[i]=!0;return}if(i==="TOWGS84"){t[i]=e;return}if(i==="AXIS"){i in t||(t[i]=[]),t[i].push(e);return}Array.isArray(i)||(t[i]={});var n;switch(i){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[i]={name:e[0].toLowerCase(),convert:e[1]},e.length===3&&ro(e[2],t[i]);return;case"SPHEROID":case"ELLIPSOID":t[i]={name:e[0],a:e[1],rf:e[2]},e.length===4&&ro(e[3],t[i]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":e[0]=["name",e[0]],Hh(t,i,e);return;default:for(n=-1;++n<e.length;)if(!Array.isArray(e[n]))return ro(e,t[i]);return Hh(t,i,e)}}var s_=.017453292519943295;function r_(e,t){var i=t[0],n=t[1];!(i in e)&&n in e&&(e[i]=e[n],t.length===3&&(e[i]=t[2](e[i])))}function Zi(e){return e*s_}function l_(e){if(e.type==="GEOGCS"?e.projName="longlat":e.type==="LOCAL_CS"?(e.projName="identity",e.local=!0):typeof e.PROJECTION=="object"?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",i=0,n=e.AXIS.length;i<n;++i){var o=[e.AXIS[i][0].toLowerCase(),e.AXIS[i][1].toLowerCase()];o[0].indexOf("north")!==-1||(o[0]==="y"||o[0]==="lat")&&o[1]==="north"?t+="n":o[0].indexOf("south")!==-1||(o[0]==="y"||o[0]==="lat")&&o[1]==="south"?t+="s":o[0].indexOf("east")!==-1||(o[0]==="x"||o[0]==="lon")&&o[1]==="east"?t+="e":(o[0].indexOf("west")!==-1||(o[0]==="x"||o[0]==="lon")&&o[1]==="west")&&(t+="w")}t.length===2&&(t+="u"),t.length===3&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.UNIT.convert&&(e.type==="GEOGCS"?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var s=e.GEOGCS;e.type==="GEOGCS"&&(s=e),s&&(s.DATUM?e.datumCode=s.DATUM.name.toLowerCase():e.datumCode=s.name.toLowerCase(),e.datumCode.slice(0,2)==="d_"&&(e.datumCode=e.datumCode.slice(2)),(e.datumCode==="new_zealand_geodetic_datum_1949"||e.datumCode==="new_zealand_1949")&&(e.datumCode="nzgd49"),(e.datumCode==="wgs_1984"||e.datumCode==="world_geodetic_system_1984")&&(e.PROJECTION==="Mercator_Auxiliary_Sphere"&&(e.sphere=!0),e.datumCode="wgs84"),e.datumCode.slice(-6)==="_ferro"&&(e.datumCode=e.datumCode.slice(0,-6)),e.datumCode.slice(-8)==="_jakarta"&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),s.DATUM&&s.DATUM.SPHEROID&&(e.ellps=s.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),e.ellps.toLowerCase().slice(0,13)==="international"&&(e.ellps="intl"),e.a=s.DATUM.SPHEROID.a,e.rf=parseFloat(s.DATUM.SPHEROID.rf,10)),s.DATUM&&s.DATUM.TOWGS84&&(e.datum_params=s.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),e.datumCode==="ch1903+"&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a);function a(c){var u=e.to_meter||1;return c*u}var r=function(c){return r_(e,c)},l=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Zi],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Zi],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",Zi],["lat0","latitude_of_origin",Zi],["lat0","standard_parallel_1",Zi],["lat1","standard_parallel_1",Zi],["lat2","standard_parallel_2",Zi],["azimuth","Azimuth"],["alpha","azimuth",Zi],["srsCode","name"]];l.forEach(r),!e.long0&&e.longc&&(e.projName==="Albers_Conic_Equal_Area"||e.projName==="Lambert_Azimuthal_Equal_Area")&&(e.long0=e.longc),!e.lat_ts&&e.lat1&&(e.projName==="Stereographic_South_Pole"||e.projName==="Polar Stereographic (variant B)")?(e.lat0=Zi(e.lat1>0?90:-90),e.lat_ts=e.lat1):!e.lat_ts&&e.lat0&&e.projName==="Polar_Stereographic"&&(e.lat_ts=e.lat0,e.lat0=Zi(e.lat0>0?90:-90))}function Wh(e){var t=a_(e),i=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",i]);var o={};return ro(t,o),l_(o),o}function Kt(e){var t=this;if(arguments.length===2){var i=arguments[1];typeof i=="string"?i.charAt(0)==="+"?Kt[e]=Yl(arguments[1]):Kt[e]=Wh(arguments[1]):Kt[e]=i}else if(arguments.length===1){if(Array.isArray(e))return e.map(function(n){Array.isArray(n)?Kt.apply(t,n):Kt(n)});if(typeof e=="string"){if(e in Kt)return Kt[e]}else"EPSG"in e?Kt["EPSG:"+e.EPSG]=e:"ESRI"in e?Kt["ESRI:"+e.ESRI]=e:"IAU2000"in e?Kt["IAU2000:"+e.IAU2000]=e:console.log(e);return}}Zw(Kt);function c_(e){return typeof e=="string"}function u_(e){return e in Kt}var d_=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function h_(e){return d_.some(function(t){return e.indexOf(t)>-1})}var m_=["3857","900913","3785","102113"];function p_(e){var t=gn(e,"authority");if(t){var i=gn(t,"epsg");return i&&m_.indexOf(i)>-1}}function v_(e){var t=gn(e,"extension");if(t)return gn(t,"proj4")}function f_(e){return e[0]==="+"}function g_(e){if(c_(e)){if(u_(e))return Kt[e];if(h_(e)){var t=Wh(e);if(p_(t))return Kt["EPSG:3857"];var i=v_(t);return i?Yl(i):t}if(f_(e))return Yl(e)}else return e}function qh(e,t){e=e||{};var i,n;if(!t)return e;for(n in t)i=t[n],i!==void 0&&(e[n]=i);return e}function Ji(e,t,i){var n=e*t;return i/Math.sqrt(1-n*n)}function na(e){return e<0?-1:1}function Oe(e){return Math.abs(e)<=Et?e:e-na(e)*ta}function $i(e,t,i){var n=e*i,o=.5*e;return n=Math.pow((1-n)/(1+n),o),Math.tan(.5*(me-t))/n}function oa(e,t){for(var i=.5*e,n,o,s=me-2*Math.atan(t),a=0;a<=15;a++)if(n=e*Math.sin(s),o=me-2*Math.atan(t*Math.pow((1-n)/(1+n),i))-s,s+=o,Math.abs(o)<=1e-10)return s;return-9999}function y_(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Ji(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function b_(e){var t=e.x,i=e.y;if(i*Qi>90&&i*Qi<-90&&t*Qi>180&&t*Qi<-180)return null;var n,o;if(Math.abs(Math.abs(i)-me)<=xe)return null;if(this.sphere)n=this.x0+this.a*this.k0*Oe(t-this.long0),o=this.y0+this.a*this.k0*Math.log(Math.tan(We+.5*i));else{var s=Math.sin(i),a=$i(this.e,i,s);n=this.x0+this.a*this.k0*Oe(t-this.long0),o=this.y0-this.a*this.k0*Math.log(a)}return e.x=n,e.y=o,e}function C_(e){var t=e.x-this.x0,i=e.y-this.y0,n,o;if(this.sphere)o=me-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var s=Math.exp(-i/(this.a*this.k0));if(o=oa(this.e,s),o===-9999)return null}return n=Oe(this.long0+t/(this.a*this.k0)),e.x=n,e.y=o,e}var w_=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],__={init:y_,forward:b_,inverse:C_,names:w_};function x_(){}function Qh(e){return e}var E_=["longlat","identity"],M_={init:x_,forward:Qh,inverse:Qh,names:E_},O_=[__,M_],vs={},fs=[];function Zh(e,t){var i=fs.length;return e.names?(fs[i]=e,e.names.forEach(function(n){vs[n.toLowerCase()]=i}),this):(console.log(t),!0)}function P_(e){if(!e)return!1;var t=e.toLowerCase();if(typeof vs[t]!="undefined"&&fs[vs[t]])return fs[vs[t]]}function S_(){O_.forEach(Zh)}var T_={start:S_,add:Zh,get:P_},ke={};ke.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},ke.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},ke.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},ke.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},ke.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},ke.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},ke.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},ke.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},ke.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},ke.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},ke.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},ke.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},ke.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},ke.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},ke.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},ke.clrk80ign={a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},ke.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},ke.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},ke.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},ke.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},ke.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},ke.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},ke.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},ke.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},ke.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},ke.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},ke.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},ke.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},ke.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},ke.hough={a:6378270,rf:297,ellipseName:"Hough"},ke.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},ke.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},ke.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},ke.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},ke.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},ke.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},ke.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},ke.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},ke.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},ke.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},ke.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},ke.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var I_=ke.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};ke.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function A_(e,t,i,n){var o=e*e,s=t*t,a=(o-s)/o,r=0;n?(e*=1-a*(Yw+a*(Kw+a*e_)),o=e*e,a=0):r=Math.sqrt(a);var l=(o-s)/s;return{es:a,e:r,ep2:l}}function D_(e,t,i,n,o){if(!e){var s=gn(ke,n);s||(s=I_),e=s.a,t=s.b,i=s.rf}return i&&!t&&(t=(1-1/i)*e),(i===0||Math.abs(e-t)<xe)&&(o=!0,t=e),{a:e,b:t,rf:i,sphere:o}}var jt={};jt.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},jt.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},jt.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},jt.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},jt.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},jt.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},jt.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},jt.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},jt.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},jt.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},jt.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},jt.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},jt.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},jt.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},jt.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},jt.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},jt.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function B_(e,t,i,n,o,s,a){var r={};return e===void 0||e==="none"?r.datum_type=Xl:r.datum_type=Jw,t&&(r.datum_params=t.map(parseFloat),(r.datum_params[0]!==0||r.datum_params[1]!==0||r.datum_params[2]!==0)&&(r.datum_type=zn),r.datum_params.length>3&&(r.datum_params[3]!==0||r.datum_params[4]!==0||r.datum_params[5]!==0||r.datum_params[6]!==0)&&(r.datum_type=Gn,r.datum_params[3]*=ea,r.datum_params[4]*=ea,r.datum_params[5]*=ea,r.datum_params[6]=r.datum_params[6]/1e6+1)),a&&(r.datum_type=so,r.grids=a),r.a=i,r.b=n,r.es=o,r.ep2=s,r}var Jh={};function L_(e,t){var i=new DataView(t),n=k_(i),o=R_(i,n),s=$_(i,o,n),a={header:o,subgrids:s};return Jh[e]=a,a}function j_(e){if(e===void 0)return null;var t=e.split(",");return t.map(F_)}function F_(e){if(e.length===0)return null;var t=e[0]==="@";return t&&(e=e.slice(1)),e==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:Jh[e]||null,isNull:!1}}function lo(e){return e/3600*Math.PI/180}function k_(e){var t=e.getInt32(8,!1);return t===11?!1:(t=e.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function R_(e,t){return{nFields:e.getInt32(8,t),nSubgridFields:e.getInt32(24,t),nSubgrids:e.getInt32(40,t),shiftType:ec(e,56,56+8).trim(),fromSemiMajorAxis:e.getFloat64(120,t),fromSemiMinorAxis:e.getFloat64(136,t),toSemiMajorAxis:e.getFloat64(152,t),toSemiMinorAxis:e.getFloat64(168,t)}}function ec(e,t,i){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,i)))}function $_(e,t,i){for(var n=176,o=[],s=0;s<t.nSubgrids;s++){var a=V_(e,n,i),r=z_(e,n,a,i),l=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval),c=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);o.push({ll:[lo(a.lowerLongitude),lo(a.lowerLatitude)],del:[lo(a.longitudeInterval),lo(a.latitudeInterval)],lim:[l,c],count:a.gridNodeCount,cvs:N_(r)}),n+=176+a.gridNodeCount*16}return o}function N_(e){return e.map(function(t){return[lo(t.longitudeShift),lo(t.latitudeShift)]})}function V_(e,t,i){return{name:ec(e,t+8,t+16).trim(),parent:ec(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,i),upperLatitude:e.getFloat64(t+88,i),lowerLongitude:e.getFloat64(t+104,i),upperLongitude:e.getFloat64(t+120,i),latitudeInterval:e.getFloat64(t+136,i),longitudeInterval:e.getFloat64(t+152,i),gridNodeCount:e.getInt32(t+168,i)}}function z_(e,t,i,n){for(var o=t+176,s=16,a=[],r=0;r<i.gridNodeCount;r++){var l={latitudeShift:e.getFloat32(o+r*s,n),longitudeShift:e.getFloat32(o+r*s+4,n),latitudeAccuracy:e.getFloat32(o+r*s+8,n),longitudeAccuracy:e.getFloat32(o+r*s+12,n)};a.push(l)}return a}function Xi(e,t){if(!(this instanceof Xi))return new Xi(e);t=t||function(c){if(c)throw c};var i=g_(e);if(typeof i!="object"){t(e);return}var n=Xi.projections.get(i.projName);if(!n){t(e);return}if(i.datumCode&&i.datumCode!=="none"){var o=gn(jt,i.datumCode);o&&(i.datum_params=i.datum_params||(o.towgs84?o.towgs84.split(","):null),i.ellps=o.ellipse,i.datumName=o.datumName?o.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84",i.lat1=i.lat1||i.lat0;var s=D_(i.a,i.b,i.rf,i.ellps,i.sphere),a=A_(s.a,s.b,s.rf,i.R_A),r=j_(i.nadgrids),l=i.datum||B_(i.datumCode,i.datum_params,s.a,s.b,a.es,a.ep2,r);qh(this,i),qh(this,n),this.a=s.a,this.b=s.b,this.rf=s.rf,this.sphere=s.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=l,this.init(),t(null,this)}Xi.projections=T_,Xi.projections.start();function G_(e,t){return e.datum_type!==t.datum_type||e.a!==t.a||Math.abs(e.es-t.es)>5e-11?!1:e.datum_type===zn?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type===Gn?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6]:!0}function Xh(e,t,i){var n=e.x,o=e.y,s=e.z?e.z:0,a,r,l,c;if(o<-me&&o>-1.001*me)o=-me;else if(o>me&&o<1.001*me)o=me;else{if(o<-me)return{x:-1/0,y:-1/0,z:e.z};if(o>me)return{x:1/0,y:1/0,z:e.z}}return n>Math.PI&&(n-=2*Math.PI),r=Math.sin(o),c=Math.cos(o),l=r*r,a=i/Math.sqrt(1-t*l),{x:(a+s)*c*Math.cos(n),y:(a+s)*c*Math.sin(n),z:(a*(1-t)+s)*r}}function Yh(e,t,i,n){var o=1e-12,s=o*o,a=30,r,l,c,u,d,h,p,v,b,y,x,M,g,w=e.x,O=e.y,I=e.z?e.z:0,R,D,P;if(r=Math.sqrt(w*w+O*O),l=Math.sqrt(w*w+O*O+I*I),r/i<o){if(R=0,l/i<o)return D=me,P=-n,{x:e.x,y:e.y,z:e.z}}else R=Math.atan2(O,w);c=I/l,u=r/l,d=1/Math.sqrt(1-t*(2-t)*u*u),v=u*(1-t)*d,b=c*d,g=0;do g++,p=i/Math.sqrt(1-t*b*b),P=r*v+I*b-p*(1-t*b*b),h=t*p/(p+P),d=1/Math.sqrt(1-h*(2-h)*u*u),y=u*(1-h)*d,x=c*d,M=x*v-y*b,v=y,b=x;while(M*M>s&&g<a);return D=Math.atan(x/Math.abs(y)),{x:R,y:D,z:P}}function U_(e,t,i){if(t===zn)return{x:e.x+i[0],y:e.y+i[1],z:e.z+i[2]};if(t===Gn){var n=i[0],o=i[1],s=i[2],a=i[3],r=i[4],l=i[5],c=i[6];return{x:c*(e.x-l*e.y+r*e.z)+n,y:c*(l*e.x+e.y-a*e.z)+o,z:c*(-r*e.x+a*e.y+e.z)+s}}}function H_(e,t,i){if(t===zn)return{x:e.x-i[0],y:e.y-i[1],z:e.z-i[2]};if(t===Gn){var n=i[0],o=i[1],s=i[2],a=i[3],r=i[4],l=i[5],c=i[6],u=(e.x-n)/c,d=(e.y-o)/c,h=(e.z-s)/c;return{x:u+l*d-r*h,y:-l*u+d+a*h,z:r*u-a*d+h}}}function gs(e){return e===zn||e===Gn}function W_(e,t,i){if(G_(e,t)||e.datum_type===Xl||t.datum_type===Xl)return i;var n=e.a,o=e.es;if(e.datum_type===so){var s=Kh(e,!1,i);if(s!==0)return;n=Rh,o=$h}var a=t.a,r=t.b,l=t.es;if(t.datum_type===so&&(a=Rh,r=Xw,l=$h),o===l&&n===a&&!gs(e.datum_type)&&!gs(t.datum_type))return i;if(i=Xh(i,o,n),gs(e.datum_type)&&(i=U_(i,e.datum_type,e.datum_params)),gs(t.datum_type)&&(i=H_(i,t.datum_type,t.datum_params)),i=Yh(i,l,a,r),t.datum_type===so){var c=Kh(t,!0,i);if(c!==0)return}return i}function Kh(e,t,i){if(e.grids===null||e.grids.length===0)return console.log("Grid shift grids not found"),-1;var n={x:-i.x,y:i.y},o={x:Number.NaN,y:Number.NaN},s=[];e:for(var a=0;a<e.grids.length;a++){var r=e.grids[a];if(s.push(r.name),r.isNull){o=n;break}if(r.mandatory,r.grid===null){if(r.mandatory)return console.log("Unable to find mandatory grid '"+r.name+"'"),-1;continue}for(var l=r.grid.subgrids,c=0,u=l.length;c<u;c++){var d=l[c],h=(Math.abs(d.del[1])+Math.abs(d.del[0]))/1e4,p=d.ll[0]-h,v=d.ll[1]-h,b=d.ll[0]+(d.lim[0]-1)*d.del[0]+h,y=d.ll[1]+(d.lim[1]-1)*d.del[1]+h;if(!(v>n.y||p>n.x||y<n.y||b<n.x)&&(o=q_(n,t,d),!isNaN(o.x)))break e}}return isNaN(o.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*Qi+" "+n.y*Qi+" tried: '"+s+"'"),-1):(i.x=-o.x,i.y=o.y,0)}function q_(e,t,i){var n={x:Number.NaN,y:Number.NaN};if(isNaN(e.x))return n;var o={x:e.x,y:e.y};o.x-=i.ll[0],o.y-=i.ll[1],o.x=Oe(o.x-Math.PI)+Math.PI;var s=em(o,i);if(t){if(isNaN(s.x))return n;s.x=o.x-s.x,s.y=o.y-s.y;var a=9,r=1e-12,l,c;do{if(c=em(s,i),isNaN(c.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:o.x-(c.x+s.x),y:o.y-(c.y+s.y)},s.x+=l.x,s.y+=l.y}while(a--&&Math.abs(l.x)>r&&Math.abs(l.y)>r);if(a<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=Oe(s.x+i.ll[0]),n.y=s.y+i.ll[1]}else isNaN(s.x)||(n.x=e.x+s.x,n.y=e.y+s.y);return n}function em(e,t){var i={x:e.x/t.del[0],y:e.y/t.del[1]},n={x:Math.floor(i.x),y:Math.floor(i.y)},o={x:i.x-1*n.x,y:i.y-1*n.y},s={x:Number.NaN,y:Number.NaN},a;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return s;a=n.y*t.lim[0]+n.x;var r={x:t.cvs[a][0],y:t.cvs[a][1]};a++;var l={x:t.cvs[a][0],y:t.cvs[a][1]};a+=t.lim[0];var c={x:t.cvs[a][0],y:t.cvs[a][1]};a--;var u={x:t.cvs[a][0],y:t.cvs[a][1]},d=o.x*o.y,h=o.x*(1-o.y),p=(1-o.x)*(1-o.y),v=(1-o.x)*o.y;return s.x=p*r.x+h*l.x+v*u.x+d*c.x,s.y=p*r.y+h*l.y+v*u.y+d*c.y,s}function tm(e,t,i){var n=i.x,o=i.y,s=i.z||0,a,r,l,c={};for(l=0;l<3;l++)if(!(t&&l===2&&i.z===void 0))switch(l===0?(a=n,"ew".indexOf(e.axis[l])!==-1?r="x":r="y"):l===1?(a=o,"ns".indexOf(e.axis[l])!==-1?r="y":r="x"):(a=s,r="z"),e.axis[l]){case"e":c[r]=a;break;case"w":c[r]=-a;break;case"n":c[r]=a;break;case"s":c[r]=-a;break;case"u":i[r]!==void 0&&(c.z=a);break;case"d":i[r]!==void 0&&(c.z=-a);break;default:return null}return c}function im(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t}function Q_(e){nm(e.x),nm(e.y)}function nm(e){if(typeof Number.isFinite=="function"){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if(typeof e!="number"||e!==e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function Z_(e,t){return(e.datum.datum_type===zn||e.datum.datum_type===Gn||e.datum.datum_type===so)&&t.datumCode!=="WGS84"||(t.datum.datum_type===zn||t.datum.datum_type===Gn||t.datum.datum_type===so)&&e.datumCode!=="WGS84"}function ys(e,t,i,n){var o;Array.isArray(i)?i=im(i):i={x:i.x,y:i.y,z:i.z,m:i.m};var s=i.z!==void 0;if(Q_(i),e.datum&&t.datum&&Z_(e,t)&&(o=new Xi("WGS84"),i=ys(e,o,i,n),e=o),n&&e.axis!=="enu"&&(i=tm(e,!1,i)),e.projName==="longlat")i={x:i.x*Gt,y:i.y*Gt,z:i.z||0};else if(e.to_meter&&(i={x:i.x*e.to_meter,y:i.y*e.to_meter,z:i.z||0}),i=e.inverse(i),!i)return;if(e.from_greenwich&&(i.x+=e.from_greenwich),i=W_(e.datum,t.datum,i),!!i)return t.from_greenwich&&(i={x:i.x-t.from_greenwich,y:i.y,z:i.z||0}),t.projName==="longlat"?i={x:i.x*Qi,y:i.y*Qi,z:i.z||0}:(i=t.forward(i),t.to_meter&&(i={x:i.x/t.to_meter,y:i.y/t.to_meter,z:i.z||0})),n&&t.axis!=="enu"?tm(t,!0,i):(i&&!s&&delete i.z,i)}var om=Xi("WGS84");function tc(e,t,i,n){var o,s,a;return Array.isArray(i)?(o=ys(e,t,i,n)||{x:NaN,y:NaN},i.length>2?typeof e.name!="undefined"&&e.name==="geocent"||typeof t.name!="undefined"&&t.name==="geocent"?typeof o.z=="number"?[o.x,o.y,o.z].concat(i.splice(3)):[o.x,o.y,i[2]].concat(i.splice(3)):[o.x,o.y].concat(i.splice(2)):[o.x,o.y]):(s=ys(e,t,i,n),a=Object.keys(i),a.length===2||a.forEach(function(r){if(typeof e.name!="undefined"&&e.name==="geocent"||typeof t.name!="undefined"&&t.name==="geocent"){if(r==="x"||r==="y"||r==="z")return}else if(r==="x"||r==="y")return;s[r]=i[r]}),s)}function am(e){return e instanceof Xi?e:e.oProj?e.oProj:Xi(e)}function fi(e,t,i){e=am(e);var n=!1,o;return typeof t=="undefined"?(t=e,e=om,n=!0):(typeof t.x!="undefined"||Array.isArray(t))&&(i=t,t=e,e=om,n=!0),t=am(t),i?tc(e,t,i):(o={forward:function(s,a){return tc(e,t,s,a)},inverse:function(s,a){return tc(t,e,s,a)}},n&&(o.oProj=t),o)}var sm=6,rm="AJSAJS",lm="AFAFAF",co=65,ri=73,Ti=79,aa=86,sa=90,J_={forward:cm,inverse:X_,toPoint:um};function cm(e,t){return t=t||5,e2(Y_({lat:e[1],lon:e[0]}),t)}function X_(e){var t=nc(mm(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function um(e){var t=nc(mm(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function ic(e){return e*(Math.PI/180)}function dm(e){return 180*(e/Math.PI)}function Y_(e){var t=e.lat,i=e.lon,n=6378137,o=.00669438,s=.9996,a,r,l,c,u,d,h,p=ic(t),v=ic(i),b,y;y=Math.floor((i+180)/6)+1,i===180&&(y=60),t>=56&&t<64&&i>=3&&i<12&&(y=32),t>=72&&t<84&&(i>=0&&i<9?y=31:i>=9&&i<21?y=33:i>=21&&i<33?y=35:i>=33&&i<42&&(y=37)),a=(y-1)*6-180+3,b=ic(a),r=o/(1-o),l=n/Math.sqrt(1-o*Math.sin(p)*Math.sin(p)),c=Math.tan(p)*Math.tan(p),u=r*Math.cos(p)*Math.cos(p),d=Math.cos(p)*(v-b),h=n*((1-o/4-3*o*o/64-5*o*o*o/256)*p-(3*o/8+3*o*o/32+45*o*o*o/1024)*Math.sin(2*p)+(15*o*o/256+45*o*o*o/1024)*Math.sin(4*p)-35*o*o*o/3072*Math.sin(6*p));var x=s*l*(d+(1-c+u)*d*d*d/6+(5-18*c+c*c+72*u-58*r)*d*d*d*d*d/120)+5e5,M=s*(h+l*Math.tan(p)*(d*d/2+(5-c+9*u+4*u*u)*d*d*d*d/24+(61-58*c+c*c+600*u-330*r)*d*d*d*d*d*d/720));return t<0&&(M+=1e7),{northing:Math.round(M),easting:Math.round(x),zoneNumber:y,zoneLetter:K_(t)}}function nc(e){var t=e.northing,i=e.easting,n=e.zoneLetter,o=e.zoneNumber;if(o<0||o>60)return null;var s=.9996,a=6378137,r=.00669438,l,c=(1-Math.sqrt(1-r))/(1+Math.sqrt(1-r)),u,d,h,p,v,b,y,x,M,g=i-5e5,w=t;n<"N"&&(w-=1e7),y=(o-1)*6-180+3,l=r/(1-r),b=w/s,x=b/(a*(1-r/4-3*r*r/64-5*r*r*r/256)),M=x+(3*c/2-27*c*c*c/32)*Math.sin(2*x)+(21*c*c/16-55*c*c*c*c/32)*Math.sin(4*x)+151*c*c*c/96*Math.sin(6*x),u=a/Math.sqrt(1-r*Math.sin(M)*Math.sin(M)),d=Math.tan(M)*Math.tan(M),h=l*Math.cos(M)*Math.cos(M),p=a*(1-r)/Math.pow(1-r*Math.sin(M)*Math.sin(M),1.5),v=g/(u*s);var O=M-u*Math.tan(M)/p*(v*v/2-(5+3*d+10*h-4*h*h-9*l)*v*v*v*v/24+(61+90*d+298*h+45*d*d-252*l-3*h*h)*v*v*v*v*v*v/720);O=dm(O);var I=(v-(1+2*d+h)*v*v*v/6+(5-2*h+28*d-3*h*h+8*l+24*d*d)*v*v*v*v*v/120)/Math.cos(M);I=y+dm(I);var R;if(e.accuracy){var D=nc({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});R={top:D.lat,right:D.lon,bottom:O,left:I}}else R={lat:O,lon:I};return R}function K_(e){var t="Z";return 84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C"),t}function e2(e,t){var i="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+t2(e.easting,e.northing,e.zoneNumber)+i.substr(i.length-5,t)+n.substr(n.length-5,t)}function t2(e,t,i){var n=hm(i),o=Math.floor(e/1e5),s=Math.floor(t/1e5)%20;return i2(o,s,n)}function hm(e){var t=e%sm;return t===0&&(t=sm),t}function i2(e,t,i){var n=i-1,o=rm.charCodeAt(n),s=lm.charCodeAt(n),a=o+e-1,r=s+t,l=!1;a>sa&&(a=a-sa+co-1,l=!0),(a===ri||o<ri&&a>ri||(a>ri||o<ri)&&l)&&a++,(a===Ti||o<Ti&&a>Ti||(a>Ti||o<Ti)&&l)&&(a++,a===ri&&a++),a>sa&&(a=a-sa+co-1),r>aa?(r=r-aa+co-1,l=!0):l=!1,(r===ri||s<ri&&r>ri||(r>ri||s<ri)&&l)&&r++,(r===Ti||s<Ti&&r>Ti||(r>Ti||s<Ti)&&l)&&(r++,r===ri&&r++),r>aa&&(r=r-aa+co-1);var c=String.fromCharCode(a)+String.fromCharCode(r);return c}function mm(e){if(e&&e.length===0)throw"MGRSPoint coverting from nothing";for(var t=e.length,i=null,n="",o,s=0;!/[A-Z]/.test(o=e.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+e;n+=o,s++}var a=parseInt(n,10);if(s===0||s+3>t)throw"MGRSPoint bad conversion from: "+e;var r=e.charAt(s++);if(r<="A"||r==="B"||r==="Y"||r>="Z"||r==="I"||r==="O")throw"MGRSPoint zone letter "+r+" not handled: "+e;i=e.substring(s,s+=2);for(var l=hm(a),c=n2(i.charAt(0),l),u=o2(i.charAt(1),l);u<a2(r);)u+=2e6;var d=t-s;if(d%2!==0)throw`MGRSPoint has to have an even number
of digits after the zone letter and two 100km letters - front
half for easting meters, second half for
northing meters`+e;var h=d/2,p=0,v=0,b,y,x,M,g;return h>0&&(b=1e5/Math.pow(10,h),y=e.substring(s,s+h),p=parseFloat(y)*b,x=e.substring(s+h),v=parseFloat(x)*b),M=p+c,g=v+u,{easting:M,northing:g,zoneLetter:r,zoneNumber:a,accuracy:b}}function n2(e,t){for(var i=rm.charCodeAt(t-1),n=1e5,o=!1;i!==e.charCodeAt(0);){if(i++,i===ri&&i++,i===Ti&&i++,i>sa){if(o)throw"Bad character: "+e;i=co,o=!0}n+=1e5}return n}function o2(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var i=lm.charCodeAt(t-1),n=0,o=!1;i!==e.charCodeAt(0);){if(i++,i===ri&&i++,i===Ti&&i++,i>aa){if(o)throw"Bad character: "+e;i=co,o=!0}n+=1e5}return n}function a2(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function uo(e,t,i){if(!(this instanceof uo))return new uo(e,t,i);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if(typeof e=="object")this.x=e.x,this.y=e.y,this.z=e.z||0;else if(typeof e=="string"&&typeof t=="undefined"){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}uo.fromMGRS=function(e){return new uo(um(e))},uo.prototype.toMGRS=function(e){return cm([this.x,this.y],e)};var s2=1,r2=.25,pm=.046875,vm=.01953125,fm=.01068115234375,l2=.75,c2=.46875,u2=.013020833333333334,d2=.007120768229166667,h2=.3645833333333333,m2=.005696614583333333,p2=.3076171875;function gm(e){var t=[];t[0]=s2-e*(r2+e*(pm+e*(vm+e*fm))),t[1]=e*(l2-e*(pm+e*(vm+e*fm)));var i=e*e;return t[2]=i*(c2-e*(u2+e*d2)),i*=e,t[3]=i*(h2-e*m2),t[4]=i*e*p2,t}function bs(e,t,i,n){return i*=t,t*=t,n[0]*e-i*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var v2=20;function ym(e,t,i){for(var n=1/(1-t),o=e,s=v2;s;--s){var a=Math.sin(o),r=1-t*a*a;if(r=(bs(o,a,Math.cos(o),i)-e)*(r*Math.sqrt(r))*n,o-=r,Math.abs(r)<xe)return o}return o}function f2(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=gm(this.es),this.ml0=bs(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function g2(e){var t=e.x,i=e.y,n=Oe(t-this.long0),o,s,a,r=Math.sin(i),l=Math.cos(i);if(this.es){var u=l*n,d=Math.pow(u,2),h=this.ep2*Math.pow(l,2),p=Math.pow(h,2),v=Math.abs(l)>xe?Math.tan(i):0,b=Math.pow(v,2),y=Math.pow(b,2);o=1-this.es*Math.pow(r,2),u=u/Math.sqrt(o);var x=bs(i,r,l,this.en);s=this.a*(this.k0*u*(1+d/6*(1-b+h+d/20*(5-18*b+y+14*h-58*b*h+d/42*(61+179*y-y*b-479*b)))))+this.x0,a=this.a*(this.k0*(x-this.ml0+r*n*u/2*(1+d/12*(5-b+9*h+4*p+d/30*(61+y-58*b+270*h-330*b*h+d/56*(1385+543*y-y*b-3111*b))))))+this.y0}else{var c=l*Math.sin(n);if(Math.abs(Math.abs(c)-1)<xe)return 93;if(s=.5*this.a*this.k0*Math.log((1+c)/(1-c))+this.x0,a=l*Math.cos(n)/Math.sqrt(1-Math.pow(c,2)),c=Math.abs(a),c>=1){if(c-1>xe)return 93;a=0}else a=Math.acos(a);i<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return e.x=s,e.y=a,e}function y2(e){var t,i,n,o,s=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,i=ym(t,this.es,this.en),Math.abs(i)<me){var d=Math.sin(i),h=Math.cos(i),p=Math.abs(h)>xe?Math.tan(i):0,v=this.ep2*Math.pow(h,2),b=Math.pow(v,2),y=Math.pow(p,2),x=Math.pow(y,2);t=1-this.es*Math.pow(d,2);var M=s*Math.sqrt(t)/this.k0,g=Math.pow(M,2);t=t*p,n=i-t*g/(1-this.es)*.5*(1-g/12*(5+3*y-9*v*y+v-4*b-g/30*(61+90*y-252*v*y+45*x+46*v-g/56*(1385+3633*y+4095*x+1574*x*y)))),o=Oe(this.long0+M*(1-g/6*(1+2*y+v-g/20*(5+28*y+24*x+8*v*y+6*v-g/42*(61+662*y+1320*x+720*x*y))))/h)}else n=me*na(a),o=0;else{var r=Math.exp(s/this.k0),l=.5*(r-1/r),c=this.lat0+a/this.k0,u=Math.cos(c);t=Math.sqrt((1-Math.pow(u,2))/(1+Math.pow(l,2))),n=Math.asin(t),a<0&&(n=-n),l===0&&u===0?o=0:o=Oe(Math.atan2(l,u)+this.long0)}return e.x=o,e.y=n,e}var b2=["Fast_Transverse_Mercator","Fast Transverse Mercator"],Cs={init:f2,forward:g2,inverse:y2,names:b2};function bm(e){var t=Math.exp(e);return t=(t-1/t)/2,t}function Ni(e,t){e=Math.abs(e),t=Math.abs(t);var i=Math.max(e,t),n=Math.min(e,t)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))}function C2(e){var t=1+e,i=t-1;return i===0?e:e*Math.log(t)/i}function w2(e){var t=Math.abs(e);return t=C2(t*(1+t/(Ni(1,t)+1))),e<0?-t:t}function oc(e,t){for(var i=2*Math.cos(2*t),n=e.length-1,o=e[n],s=0,a;--n>=0;)a=-s+i*o+e[n],s=o,o=a;return t+a*Math.sin(2*t)}function _2(e,t){for(var i=2*Math.cos(t),n=e.length-1,o=e[n],s=0,a;--n>=0;)a=-s+i*o+e[n],s=o,o=a;return Math.sin(t)*a}function x2(e){var t=Math.exp(e);return t=(t+1/t)/2,t}function Cm(e,t,i){for(var n=Math.sin(t),o=Math.cos(t),s=bm(i),a=x2(i),r=2*o*a,l=-2*n*s,c=e.length-1,u=e[c],d=0,h=0,p=0,v,b;--c>=0;)v=h,b=d,h=u,d=p,u=-v+r*h-l*d+e[c],p=-b+l*h+r*d;return r=n*a,l=o*s,[r*u-l*p,r*p+l*u]}function E2(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Cs.init.apply(this),this.forward=Cs.forward,this.inverse=Cs.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),i=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),i=i*t,this.cgb[1]=i*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=i*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),i=i*t,this.cgb[2]=i*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=i*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),i=i*t,this.cgb[3]=i*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=i*(1237/630+t*(-12/5+t*(-24832/14175))),i=i*t,this.cgb[4]=i*(4174/315+t*(-144838/6237)),this.cbg[4]=i*(-734/315+t*(109598/31185)),i=i*t,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=i*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=i*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),i=i*t,this.utg[2]=i*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=i*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),i=i*t,this.utg[3]=i*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=i*(49561/161280+t*(-179/168+t*(6601661/7257600))),i=i*t,this.utg[4]=i*(-4583/161280+t*(108847/3991680)),this.gtu[4]=i*(34729/80640+t*(-3418889/1995840)),i=i*t,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=i*(212378941/319334400);var n=oc(this.cbg,this.lat0);this.Zb=-this.Qn*(n+_2(this.gtu,2*n))}function M2(e){var t=Oe(e.x-this.long0),i=e.y;i=oc(this.cbg,i);var n=Math.sin(i),o=Math.cos(i),s=Math.sin(t),a=Math.cos(t);i=Math.atan2(n,a*o),t=Math.atan2(s*o,Ni(n,o*a)),t=w2(Math.tan(t));var r=Cm(this.gtu,2*i,2*t);i=i+r[0],t=t+r[1];var l,c;return Math.abs(t)<=2.623395162778?(l=this.a*(this.Qn*t)+this.x0,c=this.a*(this.Qn*i+this.Zb)+this.y0):(l=1/0,c=1/0),e.x=l,e.y=c,e}function O2(e){var t=(e.x-this.x0)*(1/this.a),i=(e.y-this.y0)*(1/this.a);i=(i-this.Zb)/this.Qn,t=t/this.Qn;var n,o;if(Math.abs(t)<=2.623395162778){var s=Cm(this.utg,2*i,2*t);i=i+s[0],t=t+s[1],t=Math.atan(bm(t));var a=Math.sin(i),r=Math.cos(i),l=Math.sin(t),c=Math.cos(t);i=Math.atan2(a*c,Ni(l,c*r)),t=Math.atan2(l,c*r),n=Oe(t+this.long0),o=oc(this.cgb,i)}else n=1/0,o=1/0;return e.x=n,e.y=o,e}var P2=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"],ws={init:E2,forward:M2,inverse:O2,names:P2};function S2(e,t){if(e===void 0){if(e=Math.floor((Oe(t)+Math.PI)*30/Math.PI)+1,e<0)return 0;if(e>60)return 60}return e}var T2="etmerc";function I2(){var e=S2(this.zone,this.long0);if(e===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*Gt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,ws.init.apply(this),this.forward=ws.forward,this.inverse=ws.inverse}var A2=["Universal Transverse Mercator System","utm"],D2={init:I2,names:A2,dependsOn:T2};function ac(e,t){return Math.pow((1-e)/(1+e),t)}var B2=20;function L2(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+We)/(Math.pow(Math.tan(.5*this.lat0+We),this.C)*ac(this.e*e,this.ratexp))}function j2(e){var t=e.x,i=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+We),this.C)*ac(this.e*Math.sin(i),this.ratexp))-me,e.x=this.C*t,e}function F2(e){for(var t=1e-14,i=e.x/this.C,n=e.y,o=Math.pow(Math.tan(.5*n+We)/this.K,1/this.C),s=B2;s>0&&(n=2*Math.atan(o*ac(this.e*Math.sin(e.y),-.5*this.e))-me,!(Math.abs(n-e.y)<t));--s)e.y=n;return s?(e.x=i,e.y=n,e):null}var k2=["gauss"],sc={init:L2,forward:j2,inverse:F2,names:k2};function R2(){sc.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function $2(e){var t,i,n,o;return e.x=Oe(e.x-this.long0),sc.forward.apply(this,[e]),t=Math.sin(e.y),i=Math.cos(e.y),n=Math.cos(e.x),o=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*i*n),e.x=o*i*Math.sin(e.x),e.y=o*(this.cosc0*t-this.sinc0*i*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function N2(e){var t,i,n,o,s;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,s=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(s,this.R2);t=Math.sin(a),i=Math.cos(a),o=Math.asin(i*this.sinc0+e.y*t*this.cosc0/s),n=Math.atan2(e.x*t,s*this.cosc0*i-e.y*this.sinc0*t)}else o=this.phic0,n=0;return e.x=n,e.y=o,sc.inverse.apply(this,[e]),e.x=Oe(e.x+this.long0),e}var V2=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],z2={init:R2,forward:$2,inverse:N2,names:V2};function G2(e,t,i){return t*=i,Math.tan(.5*(me+e))*Math.pow((1-t)/(1+t),.5*i)}function U2(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=xe&&(this.k0=.5*(1+na(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=xe&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=xe&&Math.abs(Math.cos(this.lat_ts))>xe&&(this.k0=.5*this.cons*Ji(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/$i(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Ji(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-me,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function H2(e){var t=e.x,i=e.y,n=Math.sin(i),o=Math.cos(i),s,a,r,l,c,u,d=Oe(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=xe&&Math.abs(i+this.lat0)<=xe?(e.x=NaN,e.y=NaN,e):this.sphere?(s=2*this.k0/(1+this.sinlat0*n+this.coslat0*o*Math.cos(d)),e.x=this.a*s*o*Math.sin(d)+this.x0,e.y=this.a*s*(this.coslat0*n-this.sinlat0*o*Math.cos(d))+this.y0,e):(a=2*Math.atan(this.ssfn_(i,n,this.e))-me,l=Math.cos(a),r=Math.sin(a),Math.abs(this.coslat0)<=xe?(c=$i(this.e,i*this.con,this.con*n),u=2*this.a*this.k0*c/this.cons,e.x=this.x0+u*Math.sin(t-this.long0),e.y=this.y0-this.con*u*Math.cos(t-this.long0),e):(Math.abs(this.sinlat0)<xe?(s=2*this.a*this.k0/(1+l*Math.cos(d)),e.y=s*r):(s=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*r+this.cosX0*l*Math.cos(d))),e.y=s*(this.cosX0*r-this.sinX0*l*Math.cos(d))+this.y0),e.x=s*l*Math.sin(d)+this.x0,e))}function W2(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,o,s,a=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var r=2*Math.atan(a/(2*this.a*this.k0));return t=this.long0,i=this.lat0,a<=xe?(e.x=t,e.y=i,e):(i=Math.asin(Math.cos(r)*this.sinlat0+e.y*Math.sin(r)*this.coslat0/a),Math.abs(this.coslat0)<xe?this.lat0>0?t=Oe(this.long0+Math.atan2(e.x,-1*e.y)):t=Oe(this.long0+Math.atan2(e.x,e.y)):t=Oe(this.long0+Math.atan2(e.x*Math.sin(r),a*this.coslat0*Math.cos(r)-e.y*this.sinlat0*Math.sin(r))),e.x=t,e.y=i,e)}else if(Math.abs(this.coslat0)<=xe){if(a<=xe)return i=this.lat0,t=this.long0,e.x=t,e.y=i,e;e.x*=this.con,e.y*=this.con,n=a*this.cons/(2*this.a*this.k0),i=this.con*oa(this.e,n),t=this.con*Oe(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else o=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=xe?s=this.X0:(s=Math.asin(Math.cos(o)*this.sinX0+e.y*Math.sin(o)*this.cosX0/a),t=Oe(this.long0+Math.atan2(e.x*Math.sin(o),a*this.cosX0*Math.cos(o)-e.y*this.sinX0*Math.sin(o)))),i=-1*oa(this.e,Math.tan(.5*(me+s)));return e.x=t,e.y=i,e}var q2=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],Q2={init:U2,forward:H2,inverse:W2,names:q2,ssfn_:G2};function Z2(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),i=this.a,n=this.rf,o=1/n,s=2*o-Math.pow(o,2),a=this.e=Math.sqrt(s);this.R=this.k0*i*Math.sqrt(1-s)/(1-s*Math.pow(t,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var r=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+e/2)),c=Math.log((1+a*t)/(1-a*t));this.K=r-this.alpha*l+this.alpha*a/2*c}function J2(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+i)+this.K,o=2*(Math.atan(Math.exp(n))-Math.PI/4),s=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(s))),r=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(s));return e.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,e.x=this.R*a+this.x0,e}function X2(e){for(var t=e.x-this.x0,i=e.y-this.y0,n=t/this.R,o=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(o))),r=this.lambda0+a/this.alpha,l=0,c=s,u=-1e3,d=0;Math.abs(c-u)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(c))/2)),u=c,c=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=r,e.y=c,e}var Y2=["somerc"],K2={init:Z2,forward:J2,inverse:X2,names:Y2},ho=1e-7;function ex(e){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],i=typeof e.PROJECTION=="object"?Object.keys(e.PROJECTION)[0]:e.PROJECTION;return"no_uoff"in e||"no_off"in e||t.indexOf(i)!==-1}function tx(){var e,t,i,n,o,s,a,r,l,c,u=0,d,h=0,p=0,v=0,b=0,y=0,x=0;this.no_off=ex(this),this.no_rot="no_rot"in this;var M=!1;"alpha"in this&&(M=!0);var g=!1;if("rectified_grid_angle"in this&&(g=!0),M&&(x=this.alpha),g&&(u=this.rectified_grid_angle*Gt),M||g)h=this.longc;else if(p=this.long1,b=this.lat1,v=this.long2,y=this.lat2,Math.abs(b-y)<=ho||(e=Math.abs(b))<=ho||Math.abs(e-me)<=ho||Math.abs(Math.abs(this.lat0)-me)<=ho||Math.abs(Math.abs(y)-me)<=ho)throw new Error;var w=1-this.es;t=Math.sqrt(w),Math.abs(this.lat0)>xe?(r=Math.sin(this.lat0),i=Math.cos(this.lat0),e=1-this.es*r*r,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/w),this.A=this.B*this.k0*t/e,n=this.B*t/(i*Math.sqrt(e)),o=n*n-1,o<=0?o=0:(o=Math.sqrt(o),this.lat0<0&&(o=-o)),this.E=o+=n,this.E*=Math.pow($i(this.e,this.lat0,r),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=o=1),M||g?(M?(d=Math.asin(Math.sin(x)/n),g||(u=x)):(d=u,x=Math.asin(n*Math.sin(d))),this.lam0=h-Math.asin(.5*(o-1/o)*Math.tan(d))/this.B):(s=Math.pow($i(this.e,b,Math.sin(b)),this.B),a=Math.pow($i(this.e,y,Math.sin(y)),this.B),o=this.E/s,l=(a-s)/(a+s),c=this.E*this.E,c=(c-a*s)/(c+a*s),e=p-v,e<-Math.pi?v-=ta:e>Math.pi&&(v+=ta),this.lam0=Oe(.5*(p+v)-Math.atan(c*Math.tan(.5*this.B*(p-v))/l)/this.B),d=Math.atan(2*Math.sin(this.B*Oe(p-this.lam0))/(o-1/o)),u=x=Math.asin(n*Math.sin(d))),this.singam=Math.sin(d),this.cosgam=Math.cos(d),this.sinrot=Math.sin(u),this.cosrot=Math.cos(u),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(x))),this.lat0<0&&(this.u_0=-this.u_0)),o=.5*d,this.v_pole_n=this.ArB*Math.log(Math.tan(We-o)),this.v_pole_s=this.ArB*Math.log(Math.tan(We+o))}function ix(e){var t={},i,n,o,s,a,r,l,c;if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-me)>xe){if(a=this.E/Math.pow($i(this.e,e.y,Math.sin(e.y)),this.B),r=1/a,i=.5*(a-r),n=.5*(a+r),s=Math.sin(this.B*e.x),o=(i*this.singam-s*this.cosgam)/n,Math.abs(Math.abs(o)-1)<xe)throw new Error;c=.5*this.ArB*Math.log((1-o)/(1+o)),r=Math.cos(this.B*e.x),Math.abs(r)<ho?l=this.A*e.x:l=this.ArB*Math.atan2(i*this.cosgam+s*this.singam,r)}else c=e.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*e.y;return this.no_rot?(t.x=l,t.y=c):(l-=this.u_0,t.x=c*this.cosrot+l*this.sinrot,t.y=l*this.cosrot-c*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function nx(e){var t,i,n,o,s,a,r,l={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(i=e.y,t=e.x):(i=e.x*this.cosrot-e.y*this.sinrot,t=e.y*this.cosrot+e.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*i),o=.5*(n-1/n),s=.5*(n+1/n),a=Math.sin(this.BrA*t),r=(a*this.cosgam+o*this.singam)/s,Math.abs(Math.abs(r)-1)<xe)l.x=0,l.y=r<0?-me:me;else{if(l.y=this.E/Math.sqrt((1+r)/(1-r)),l.y=oa(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(o*this.cosgam-a*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,l}var ox=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"],ax={init:tx,forward:ix,inverse:nx,names:ox};function sx(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<xe)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),i=Math.cos(this.lat1),n=Ji(this.e,t,i),o=$i(this.e,this.lat1,t),s=Math.sin(this.lat2),a=Math.cos(this.lat2),r=Ji(this.e,s,a),l=$i(this.e,this.lat2,s),c=$i(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>xe?this.ns=Math.log(n/r)/Math.log(o/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function rx(e){var t=e.x,i=e.y;Math.abs(2*Math.abs(i)-Math.PI)<=xe&&(i=na(i)*(me-2*xe));var n=Math.abs(Math.abs(i)-me),o,s;if(n>xe)o=$i(this.e,i,Math.sin(i)),s=this.a*this.f0*Math.pow(o,this.ns);else{if(n=i*this.ns,n<=0)return null;s=0}var a=this.ns*Oe(t-this.long0);return e.x=this.k0*(s*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-s*Math.cos(a))+this.y0,e}function lx(e){var t,i,n,o,s,a=(e.x-this.x0)/this.k0,r=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+r*r),i=1):(t=-Math.sqrt(a*a+r*r),i=-1);var l=0;if(t!==0&&(l=Math.atan2(i*a,i*r)),t!==0||this.ns>0){if(i=1/this.ns,n=Math.pow(t/(this.a*this.f0),i),o=oa(this.e,n),o===-9999)return null}else o=-me;return s=Oe(l/this.ns+this.long0),e.x=s,e.y=o,e}var cx=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"],ux={init:sx,forward:rx,inverse:lx,names:cx};function dx(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function hx(e){var t,i,n,o,s,a,r,l=e.x,c=e.y,u=Oe(l-this.long0);return t=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/t)-this.s45),n=-u*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),s=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(o)),a=this.n*s,r=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),e.y=r*Math.cos(a)/1,e.x=r*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e}function mx(e){var t,i,n,o,s,a,r,l,c=e.x;e.x=e.y,e.y=c,this.czech||(e.y*=-1,e.x*=-1),a=Math.sqrt(e.x*e.x+e.y*e.y),s=Math.atan2(e.y,e.x),o=s/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(o)),i=Math.asin(Math.cos(n)*Math.sin(o)/Math.cos(t)),e.x=this.long0-i/this.alfa,r=t,l=0;var u=0;do e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(r))/(1-this.e*Math.sin(r)),this.e/2))-this.s45),Math.abs(r-e.y)<1e-10&&(l=1),r=e.y,u+=1;while(l===0&&u<15);return u>=15?null:e}var px=["Krovak","krovak"],vx={init:dx,forward:hx,inverse:mx,names:px};function ei(e,t,i,n,o){return e*o-t*Math.sin(2*o)+i*Math.sin(4*o)-n*Math.sin(6*o)}function ra(e){return 1-.25*e*(1+e/16*(3+1.25*e))}function la(e){return .375*e*(1+.25*e*(1+.46875*e))}function ca(e){return .05859375*e*e*(1+.75*e)}function ua(e){return e*e*e*(35/3072)}function mo(e,t,i){var n=t*i;return e/Math.sqrt(1-n*n)}function po(e){return Math.abs(e)<me?e:e-na(e)*Math.PI}function _s(e,t,i,n,o){var s,a;s=e/t;for(var r=0;r<15;r++)if(a=(e-(t*s-i*Math.sin(2*s)+n*Math.sin(4*s)-o*Math.sin(6*s)))/(t-2*i*Math.cos(2*s)+4*n*Math.cos(4*s)-6*o*Math.cos(6*s)),s+=a,Math.abs(a)<=1e-10)return s;return NaN}function fx(){this.sphere||(this.e0=ra(this.es),this.e1=la(this.es),this.e2=ca(this.es),this.e3=ua(this.es),this.ml0=this.a*ei(this.e0,this.e1,this.e2,this.e3,this.lat0))}function gx(e){var t,i,n=e.x,o=e.y;if(n=Oe(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(o)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(o),Math.cos(n))-this.lat0);else{var s=Math.sin(o),a=Math.cos(o),r=mo(this.a,this.e,s),l=Math.tan(o)*Math.tan(o),c=n*Math.cos(o),u=c*c,d=this.es*a*a/(1-this.es),h=this.a*ei(this.e0,this.e1,this.e2,this.e3,o);t=r*c*(1-u*l*(1/6-(8-l+8*d)*u/120)),i=h-this.ml0+r*s/a*u*(.5+(5-l+6*d)*u/24)}return e.x=t+this.x0,e.y=i+this.y0,e}function yx(e){e.x-=this.x0,e.y-=this.y0;var t=e.x/this.a,i=e.y/this.a,n,o;if(this.sphere){var s=i+this.lat0;n=Math.asin(Math.sin(s)*Math.cos(t)),o=Math.atan2(Math.tan(t),Math.cos(s))}else{var a=this.ml0/this.a+i,r=_s(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(r)-me)<=xe)return e.x=this.long0,e.y=me,i<0&&(e.y*=-1),e;var l=mo(this.a,this.e,Math.sin(r)),c=l*l*l/this.a/this.a*(1-this.es),u=Math.pow(Math.tan(r),2),d=t*this.a/l,h=d*d;n=r-l*Math.tan(r)/c*d*d*(.5-(1+3*u)*d*d/24),o=d*(1-h*(u/3+(1+3*u)*u*h/15))/Math.cos(r)}return e.x=Oe(o+this.long0),e.y=po(n),e}var bx=["Cassini","Cassini_Soldner","cass"],Cx={init:fx,forward:gx,inverse:yx,names:bx};function yn(e,t){var i;return e>1e-7?(i=e*t,(1-e*e)*(t/(1-i*i)-.5/e*Math.log((1-i)/(1+i)))):2*t}var wx=1,_x=2,xx=3,Ex=4;function Mx(){var e=Math.abs(this.lat0);if(Math.abs(e-me)<xe?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<xe?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=yn(this.e,1),this.mmf=.5/(1-this.es),this.apa=Lx(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=yn(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function Ox(e){var t,i,n,o,s,a,r,l,c,u,d=e.x,h=e.y;if(d=Oe(d-this.long0),this.sphere){if(s=Math.sin(h),u=Math.cos(h),n=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(i=this.mode===this.EQUIT?1+u*n:1+this.sinph0*s+this.cosph0*u*n,i<=xe)return null;i=Math.sqrt(2/i),t=i*u*Math.sin(d),i*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(h+this.lat0)<xe)return null;i=We-h*.5,i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)),t=i*Math.sin(d),i*=n}}else{switch(r=0,l=0,c=0,n=Math.cos(d),o=Math.sin(d),s=Math.sin(h),a=yn(this.e,s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(r=a/this.qp,l=Math.sqrt(1-r*r)),this.mode){case this.OBLIQ:c=1+this.sinb1*r+this.cosb1*l*n;break;case this.EQUIT:c=1+l*n;break;case this.N_POLE:c=me+h,a=this.qp-a;break;case this.S_POLE:c=h-me,a=this.qp+a;break}if(Math.abs(c)<xe)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:c=Math.sqrt(2/c),this.mode===this.OBLIQ?i=this.ymf*c*(this.cosb1*r-this.sinb1*l*n):i=(c=Math.sqrt(2/(1+l*n)))*r*this.ymf,t=this.xmf*c*l*o;break;case this.N_POLE:case this.S_POLE:a>=0?(t=(c=Math.sqrt(a))*o,i=n*(this.mode===this.S_POLE?c:-c)):t=i=0;break}}return e.x=this.a*t+this.x0,e.y=this.a*i+this.y0,e}function Px(e){e.x-=this.x0,e.y-=this.y0;var t=e.x/this.a,i=e.y/this.a,n,o,s,a,r,l,c;if(this.sphere){var u=0,d,h=0;if(d=Math.sqrt(t*t+i*i),o=d*.5,o>1)return null;switch(o=2*Math.asin(o),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(h=Math.sin(o),u=Math.cos(o)),this.mode){case this.EQUIT:o=Math.abs(d)<=xe?0:Math.asin(i*h/d),t*=h,i=u*d;break;case this.OBLIQ:o=Math.abs(d)<=xe?this.lat0:Math.asin(u*this.sinph0+i*h*this.cosph0/d),t*=h*this.cosph0,i=(u-Math.sin(o)*this.sinph0)*d;break;case this.N_POLE:i=-i,o=me-o;break;case this.S_POLE:o-=me;break}n=i===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,i)}else{if(c=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,i*=this.dd,l=Math.sqrt(t*t+i*i),l<xe)return e.x=this.long0,e.y=this.lat0,e;a=2*Math.asin(.5*l/this.rq),s=Math.cos(a),t*=a=Math.sin(a),this.mode===this.OBLIQ?(c=s*this.sinb1+i*a*this.cosb1/l,r=this.qp*c,i=l*this.cosb1*s-i*this.sinb1*a):(c=i*a/l,r=this.qp*c,i=l*s)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),r=t*t+i*i,!r)return e.x=this.long0,e.y=this.lat0,e;c=1-r/this.qp,this.mode===this.S_POLE&&(c=-c)}n=Math.atan2(t,i),o=jx(Math.asin(c),this.apa)}return e.x=Oe(this.long0+n),e.y=o,e}var Sx=.3333333333333333,Tx=.17222222222222222,Ix=.10257936507936508,Ax=.06388888888888888,Dx=.0664021164021164,Bx=.016415012942191543;function Lx(e){var t,i=[];return i[0]=e*Sx,t=e*e,i[0]+=t*Tx,i[1]=t*Ax,t*=e,i[0]+=t*Ix,i[1]+=t*Dx,i[2]=t*Bx,i}function jx(e,t){var i=e+e;return e+t[0]*Math.sin(i)+t[1]*Math.sin(i+i)+t[2]*Math.sin(i+i+i)}var Fx=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],kx={init:Mx,forward:Ox,inverse:Px,names:Fx,S_POLE:wx,N_POLE:_x,EQUIT:xx,OBLIQ:Ex};function bn(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)}function Rx(){Math.abs(this.lat1+this.lat2)<xe||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Ji(this.e3,this.sin_po,this.cos_po),this.qs1=yn(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Ji(this.e3,this.sin_po,this.cos_po),this.qs2=yn(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=yn(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>xe?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function $x(e){var t=e.x,i=e.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=yn(this.e3,this.sin_phi),o=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,s=this.ns0*Oe(t-this.long0),a=o*Math.sin(s)+this.x0,r=this.rh-o*Math.cos(s)+this.y0;return e.x=a,e.y=r,e}function Nx(e){var t,i,n,o,s,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),o=0,t!==0&&(o=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,i)),s=Oe(o/this.ns0+this.long0),e.x=s,e.y=a,e}function Vx(e,t){var i,n,o,s,a,r=bn(.5*t);if(e<xe)return r;for(var l=e*e,c=1;c<=25;c++)if(i=Math.sin(r),n=Math.cos(r),o=e*i,s=1-o*o,a=.5*s*s/n*(t/(1-l)-i/s+.5/e*Math.log((1-o)/(1+o))),r=r+a,Math.abs(a)<=1e-7)return r;return null}var zx=["Albers_Conic_Equal_Area","Albers","aea"],Gx={init:Rx,forward:$x,inverse:Nx,names:zx,phi1z:Vx};function Ux(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Hx(e){var t,i,n,o,s,a,r,l,c=e.x,u=e.y;return n=Oe(c-this.long0),t=Math.sin(u),i=Math.cos(u),o=Math.cos(n),a=this.sin_p14*t+this.cos_p14*i*o,s=1,a>0||Math.abs(a)<=xe?(r=this.x0+this.a*s*i*Math.sin(n)/a,l=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*i*o)/a):(r=this.x0+this.infinity_dist*i*Math.sin(n),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*i*o)),e.x=r,e.y=l,e}function Wx(e){var t,i,n,o,s,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(o=Math.atan2(t,this.rc),i=Math.sin(o),n=Math.cos(o),a=bn(n*this.sin_p14+e.y*i*this.cos_p14/t),s=Math.atan2(e.x*i,t*this.cos_p14*n-e.y*this.sin_p14*i),s=Oe(this.long0+s)):(a=this.phic0,s=0),e.x=s,e.y=a,e}var qx=["gnom"],Qx={init:Ux,forward:Hx,inverse:Wx,names:qx};function Zx(e,t){var i=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-i)<1e-6)return t<0?-1*me:me;for(var n=Math.asin(.5*t),o,s,a,r,l=0;l<30;l++)if(s=Math.sin(n),a=Math.cos(n),r=e*s,o=Math.pow(1-r*r,2)/(2*a)*(t/(1-e*e)-s/(1-r*r)+.5/e*Math.log((1-r)/(1+r))),n+=o,Math.abs(o)<=1e-10)return n;return NaN}function Jx(){this.sphere||(this.k0=Ji(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Xx(e){var t=e.x,i=e.y,n,o,s=Oe(t-this.long0);if(this.sphere)n=this.x0+this.a*s*Math.cos(this.lat_ts),o=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var a=yn(this.e,Math.sin(i));n=this.x0+this.a*this.k0*s,o=this.y0+this.a*a*.5/this.k0}return e.x=n,e.y=o,e}function Yx(e){e.x-=this.x0,e.y-=this.y0;var t,i;return this.sphere?(t=Oe(this.long0+e.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(i=Zx(this.e,2*e.y*this.k0/this.a),t=Oe(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=i,e}var Kx=["cea"],eE={init:Jx,forward:Xx,inverse:Yx,names:Kx};function tE(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function iE(e){var t=e.x,i=e.y,n=Oe(t-this.long0),o=po(i-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*o,e}function nE(e){var t=e.x,i=e.y;return e.x=Oe(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=po(this.lat0+(i-this.y0)/this.a),e}var oE=["Equirectangular","Equidistant_Cylindrical","eqc"],aE={init:tE,forward:iE,inverse:nE,names:oE},wm=20;function sE(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ra(this.es),this.e1=la(this.es),this.e2=ca(this.es),this.e3=ua(this.es),this.ml0=this.a*ei(this.e0,this.e1,this.e2,this.e3,this.lat0)}function rE(e){var t=e.x,i=e.y,n,o,s,a=Oe(t-this.long0);if(s=a*Math.sin(i),this.sphere)Math.abs(i)<=xe?(n=this.a*a,o=-1*this.a*this.lat0):(n=this.a*Math.sin(s)/Math.tan(i),o=this.a*(po(i-this.lat0)+(1-Math.cos(s))/Math.tan(i)));else if(Math.abs(i)<=xe)n=this.a*a,o=-1*this.ml0;else{var r=mo(this.a,this.e,Math.sin(i))/Math.tan(i);n=r*Math.sin(s),o=this.a*ei(this.e0,this.e1,this.e2,this.e3,i)-this.ml0+r*(1-Math.cos(s))}return e.x=n+this.x0,e.y=o+this.y0,e}function lE(e){var t,i,n,o,s,a,r,l,c;if(n=e.x-this.x0,o=e.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=xe)t=Oe(n/this.a+this.long0),i=0;else{a=this.lat0+o/this.a,r=n*n/this.a/this.a+a*a,l=a;var u;for(s=wm;s;--s)if(u=Math.tan(l),c=-1*(a*(l*u+1)-l-.5*(l*l+r)*u)/((l-a)/u-1),l+=c,Math.abs(c)<=xe){i=l;break}t=Oe(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(i))}else if(Math.abs(o+this.ml0)<=xe)i=0,t=Oe(this.long0+n/this.a);else{a=(this.ml0+o)/this.a,r=n*n/this.a/this.a+a*a,l=a;var d,h,p,v,b;for(s=wm;s;--s)if(b=this.e*Math.sin(l),d=Math.sqrt(1-b*b)*Math.tan(l),h=this.a*ei(this.e0,this.e1,this.e2,this.e3,l),p=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),v=h/this.a,c=(a*(d*v+1)-v-.5*d*(v*v+r))/(this.es*Math.sin(2*l)*(v*v+r-2*a*v)/(4*d)+(a-v)*(d*p-2/Math.sin(2*l))-p),l-=c,Math.abs(c)<=xe){i=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),t=Oe(this.long0+Math.asin(n*d/this.a)/Math.sin(i))}return e.x=t,e.y=i,e}var cE=["Polyconic","poly"],uE={init:sE,forward:rE,inverse:lE,names:cE};function dE(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function hE(e){var t,i=e.x,n=e.y,o=n-this.lat0,s=i-this.long0,a=o/ea*1e-5,r=s,l=1,c=0;for(t=1;t<=10;t++)l=l*a,c=c+this.A[t]*l;var u=c,d=r,h=1,p=0,v,b,y=0,x=0;for(t=1;t<=6;t++)v=h*u-p*d,b=p*u+h*d,h=v,p=b,y=y+this.B_re[t]*h-this.B_im[t]*p,x=x+this.B_im[t]*h+this.B_re[t]*p;return e.x=x*this.a+this.x0,e.y=y*this.a+this.y0,e}function mE(e){var t,i=e.x,n=e.y,o=i-this.x0,s=n-this.y0,a=s/this.a,r=o/this.a,l=1,c=0,u,d,h=0,p=0;for(t=1;t<=6;t++)u=l*a-c*r,d=c*a+l*r,l=u,c=d,h=h+this.C_re[t]*l-this.C_im[t]*c,p=p+this.C_im[t]*l+this.C_re[t]*c;for(var v=0;v<this.iterations;v++){var b=h,y=p,x,M,g=a,w=r;for(t=2;t<=6;t++)x=b*h-y*p,M=y*h+b*p,b=x,y=M,g=g+(t-1)*(this.B_re[t]*b-this.B_im[t]*y),w=w+(t-1)*(this.B_im[t]*b+this.B_re[t]*y);b=1,y=0;var O=this.B_re[1],I=this.B_im[1];for(t=2;t<=6;t++)x=b*h-y*p,M=y*h+b*p,b=x,y=M,O=O+t*(this.B_re[t]*b-this.B_im[t]*y),I=I+t*(this.B_im[t]*b+this.B_re[t]*y);var R=O*O+I*I;h=(g*O+w*I)/R,p=(w*O-g*I)/R}var D=h,P=p,k=1,N=0;for(t=1;t<=9;t++)k=k*D,N=N+this.D[t]*k;var $=this.lat0+N*ea*1e5,m=this.long0+P;return e.x=m,e.y=$,e}var pE=["New_Zealand_Map_Grid","nzmg"],vE={init:dE,forward:hE,inverse:mE,names:pE};function fE(){}function gE(e){var t=e.x,i=e.y,n=Oe(t-this.long0),o=this.x0+this.a*n,s=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return e.x=o,e.y=s,e}function yE(e){e.x-=this.x0,e.y-=this.y0;var t=Oe(this.long0+e.x/this.a),i=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=i,e}var bE=["Miller_Cylindrical","mill"],CE={init:fE,forward:gE,inverse:yE,names:bE},wE=20;function _E(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=gm(this.es)}function xE(e){var t,i,n=e.x,o=e.y;if(n=Oe(n-this.long0),this.sphere){if(!this.m)o=this.n!==1?Math.asin(this.n*Math.sin(o)):o;else for(var s=this.n*Math.sin(o),a=wE;a;--a){var r=(this.m*o+Math.sin(o)-s)/(this.m+Math.cos(o));if(o-=r,Math.abs(r)<xe)break}t=this.a*this.C_x*n*(this.m+Math.cos(o)),i=this.a*this.C_y*o}else{var l=Math.sin(o),c=Math.cos(o);i=this.a*bs(o,l,c,this.en),t=this.a*n*c/Math.sqrt(1-this.es*l*l)}return e.x=t,e.y=i,e}function EE(e){var t,i,n,o;return e.x-=this.x0,n=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(t))),this.m?t=bn((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=bn(Math.sin(t)/this.n)),n=Oe(n+this.long0),t=po(t)):(t=ym(e.y/this.a,this.es,this.en),o=Math.abs(t),o<me?(o=Math.sin(t),i=this.long0+e.x*Math.sqrt(1-this.es*o*o)/(this.a*Math.cos(t)),n=Oe(i)):o-xe<me&&(n=this.long0)),e.x=n,e.y=t,e}var ME=["Sinusoidal","sinu"],OE={init:_E,forward:xE,inverse:EE,names:ME};function PE(){}function SE(e){for(var t=e.x,i=e.y,n=Oe(t-this.long0),o=i,s=Math.PI*Math.sin(i);;){var a=-(o+Math.sin(o)-s)/(1+Math.cos(o));if(o+=a,Math.abs(a)<xe)break}o/=2,Math.PI/2-Math.abs(i)<xe&&(n=0);var r=.900316316158*this.a*n*Math.cos(o)+this.x0,l=1.4142135623731*this.a*Math.sin(o)+this.y0;return e.x=r,e.y=l,e}function TE(e){var t,i;e.x-=this.x0,e.y-=this.y0,i=e.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),t=Math.asin(i);var n=Oe(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*t+Math.sin(2*t))/Math.PI,Math.abs(i)>1&&(i=1);var o=Math.asin(i);return e.x=n,e.y=o,e}var IE=["Mollweide","moll"],AE={init:PE,forward:SE,inverse:TE,names:IE};function DE(){Math.abs(this.lat1+this.lat2)<xe||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ra(this.es),this.e1=la(this.es),this.e2=ca(this.es),this.e3=ua(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=Ji(this.e,this.sinphi,this.cosphi),this.ml1=ei(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<xe?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Ji(this.e,this.sinphi,this.cosphi),this.ml2=ei(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=ei(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function BE(e){var t=e.x,i=e.y,n;if(this.sphere)n=this.a*(this.g-i);else{var o=ei(this.e0,this.e1,this.e2,this.e3,i);n=this.a*(this.g-o)}var s=this.ns*Oe(t-this.long0),a=this.x0+n*Math.sin(s),r=this.y0+this.rh-n*Math.cos(s);return e.x=a,e.y=r,e}function LE(e){e.x-=this.x0,e.y=this.rh-e.y+this.y0;var t,i,n,o;this.ns>=0?(i=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(i=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var s=0;if(i!==0&&(s=Math.atan2(t*e.x,t*e.y)),this.sphere)return o=Oe(this.long0+s/this.ns),n=po(this.g-i/this.a),e.x=o,e.y=n,e;var a=this.g-i/this.a;return n=_s(a,this.e0,this.e1,this.e2,this.e3),o=Oe(this.long0+s/this.ns),e.x=o,e.y=n,e}var jE=["Equidistant_Conic","eqdc"],FE={init:DE,forward:BE,inverse:LE,names:jE};function kE(){this.R=this.a}function RE(e){var t=e.x,i=e.y,n=Oe(t-this.long0),o,s;Math.abs(i)<=xe&&(o=this.x0+this.R*n,s=this.y0);var a=bn(2*Math.abs(i/Math.PI));(Math.abs(n)<=xe||Math.abs(Math.abs(i)-me)<=xe)&&(o=this.x0,i>=0?s=this.y0+Math.PI*this.R*Math.tan(.5*a):s=this.y0+Math.PI*this.R*-Math.tan(.5*a));var r=.5*Math.abs(Math.PI/n-n/Math.PI),l=r*r,c=Math.sin(a),u=Math.cos(a),d=u/(c+u-1),h=d*d,p=d*(2/c-1),v=p*p,b=Math.PI*this.R*(r*(d-v)+Math.sqrt(l*(d-v)*(d-v)-(v+l)*(h-v)))/(v+l);n<0&&(b=-b),o=this.x0+b;var y=l+d;return b=Math.PI*this.R*(p*y-r*Math.sqrt((v+l)*(l+1)-y*y))/(v+l),i>=0?s=this.y0+b:s=this.y0-b,e.x=o,e.y=s,e}function $E(e){var t,i,n,o,s,a,r,l,c,u,d,h,p;return e.x-=this.x0,e.y-=this.y0,d=Math.PI*this.R,n=e.x/d,o=e.y/d,s=n*n+o*o,a=-Math.abs(o)*(1+s),r=a-2*o*o+n*n,l=-2*a+1+2*o*o+s*s,p=o*o/l+(2*r*r*r/l/l/l-9*a*r/l/l)/27,c=(a-r*r/3/l)/l,u=2*Math.sqrt(-c/3),d=3*p/c/u,Math.abs(d)>1&&(d>=0?d=1:d=-1),h=Math.acos(d)/3,e.y>=0?i=(-u*Math.cos(h+Math.PI/3)-r/3/l)*Math.PI:i=-(-u*Math.cos(h+Math.PI/3)-r/3/l)*Math.PI,Math.abs(n)<xe?t=this.long0:t=Oe(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(n*n-o*o)+s*s))/2/n),e.x=t,e.y=i,e}var NE=["Van_der_Grinten_I","VanDerGrinten","vandg"],VE={init:kE,forward:RE,inverse:$E,names:NE};function zE(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function GE(e){var t=e.x,i=e.y,n=Math.sin(e.y),o=Math.cos(e.y),s=Oe(t-this.long0),a,r,l,c,u,d,h,p,v,b,y,x,M,g,w,O,I,R,D,P,k,N,$;return this.sphere?Math.abs(this.sin_p12-1)<=xe?(e.x=this.x0+this.a*(me-i)*Math.sin(s),e.y=this.y0-this.a*(me-i)*Math.cos(s),e):Math.abs(this.sin_p12+1)<=xe?(e.x=this.x0+this.a*(me+i)*Math.sin(s),e.y=this.y0+this.a*(me+i)*Math.cos(s),e):(R=this.sin_p12*n+this.cos_p12*o*Math.cos(s),O=Math.acos(R),I=O?O/Math.sin(O):1,e.x=this.x0+this.a*I*o*Math.sin(s),e.y=this.y0+this.a*I*(this.cos_p12*n-this.sin_p12*o*Math.cos(s)),e):(a=ra(this.es),r=la(this.es),l=ca(this.es),c=ua(this.es),Math.abs(this.sin_p12-1)<=xe?(u=this.a*ei(a,r,l,c,me),d=this.a*ei(a,r,l,c,i),e.x=this.x0+(u-d)*Math.sin(s),e.y=this.y0-(u-d)*Math.cos(s),e):Math.abs(this.sin_p12+1)<=xe?(u=this.a*ei(a,r,l,c,me),d=this.a*ei(a,r,l,c,i),e.x=this.x0+(u+d)*Math.sin(s),e.y=this.y0+(u+d)*Math.cos(s),e):(h=n/o,p=mo(this.a,this.e,this.sin_p12),v=mo(this.a,this.e,n),b=Math.atan((1-this.es)*h+this.es*p*this.sin_p12/(v*o)),y=Math.atan2(Math.sin(s),this.cos_p12*Math.tan(b)-this.sin_p12*Math.cos(s)),y===0?D=Math.asin(this.cos_p12*Math.sin(b)-this.sin_p12*Math.cos(b)):Math.abs(Math.abs(y)-Math.PI)<=xe?D=-Math.asin(this.cos_p12*Math.sin(b)-this.sin_p12*Math.cos(b)):D=Math.asin(Math.sin(s)*Math.cos(b)/Math.sin(y)),x=this.e*this.sin_p12/Math.sqrt(1-this.es),M=this.e*this.cos_p12*Math.cos(y)/Math.sqrt(1-this.es),g=x*M,w=M*M,P=D*D,k=P*D,N=k*D,$=N*D,O=p*D*(1-P*w*(1-w)/6+k/8*g*(1-2*w)+N/120*(w*(4-7*w)-3*x*x*(1-7*w))-$/48*g),e.x=this.x0+O*Math.sin(y),e.y=this.y0+O*Math.cos(y),e))}function UE(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,o,s,a,r,l,c,u,d,h,p,v,b,y,x,M,g,w,O,I,R,D;return this.sphere?(t=Math.sqrt(e.x*e.x+e.y*e.y),t>2*me*this.a?void 0:(i=t/this.a,n=Math.sin(i),o=Math.cos(i),s=this.long0,Math.abs(t)<=xe?a=this.lat0:(a=bn(o*this.sin_p12+e.y*n*this.cos_p12/t),r=Math.abs(this.lat0)-me,Math.abs(r)<=xe?this.lat0>=0?s=Oe(this.long0+Math.atan2(e.x,-e.y)):s=Oe(this.long0-Math.atan2(-e.x,e.y)):s=Oe(this.long0+Math.atan2(e.x*n,t*this.cos_p12*o-e.y*this.sin_p12*n))),e.x=s,e.y=a,e)):(l=ra(this.es),c=la(this.es),u=ca(this.es),d=ua(this.es),Math.abs(this.sin_p12-1)<=xe?(h=this.a*ei(l,c,u,d,me),t=Math.sqrt(e.x*e.x+e.y*e.y),p=h-t,a=_s(p/this.a,l,c,u,d),s=Oe(this.long0+Math.atan2(e.x,-1*e.y)),e.x=s,e.y=a,e):Math.abs(this.sin_p12+1)<=xe?(h=this.a*ei(l,c,u,d,me),t=Math.sqrt(e.x*e.x+e.y*e.y),p=t-h,a=_s(p/this.a,l,c,u,d),s=Oe(this.long0+Math.atan2(e.x,e.y)),e.x=s,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),y=Math.atan2(e.x,e.y),v=mo(this.a,this.e,this.sin_p12),x=Math.cos(y),M=this.e*this.cos_p12*x,g=-M*M/(1-this.es),w=3*this.es*(1-g)*this.sin_p12*this.cos_p12*x/(1-this.es),O=t/v,I=O-g*(1+g)*Math.pow(O,3)/6-w*(1+3*g)*Math.pow(O,4)/24,R=1-g*I*I/2-O*I*I*I/6,b=Math.asin(this.sin_p12*Math.cos(I)+this.cos_p12*Math.sin(I)*x),s=Oe(this.long0+Math.asin(Math.sin(y)*Math.sin(I)/Math.cos(b))),D=Math.sin(b),a=Math.atan2((D-this.es*R*this.sin_p12)*Math.tan(b),D*(1-this.es)),e.x=s,e.y=a,e))}var HE=["Azimuthal_Equidistant","aeqd"],WE={init:zE,forward:GE,inverse:UE,names:HE};function qE(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function QE(e){var t,i,n,o,s,a,r,l,c=e.x,u=e.y;return n=Oe(c-this.long0),t=Math.sin(u),i=Math.cos(u),o=Math.cos(n),a=this.sin_p14*t+this.cos_p14*i*o,s=1,(a>0||Math.abs(a)<=xe)&&(r=this.a*s*i*Math.sin(n),l=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*i*o)),e.x=r,e.y=l,e}function ZE(e){var t,i,n,o,s,a,r;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),i=bn(t/this.a),n=Math.sin(i),o=Math.cos(i),a=this.long0,Math.abs(t)<=xe?(r=this.lat0,e.x=a,e.y=r,e):(r=bn(o*this.sin_p14+e.y*n*this.cos_p14/t),s=Math.abs(this.lat0)-me,Math.abs(s)<=xe?(this.lat0>=0?a=Oe(this.long0+Math.atan2(e.x,-e.y)):a=Oe(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=r,e):(a=Oe(this.long0+Math.atan2(e.x*n,t*this.cos_p14*o-e.y*this.sin_p14*n)),e.x=a,e.y=r,e))}var JE=["ortho"],XE={init:qE,forward:QE,inverse:ZE,names:JE},pt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},qe={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function YE(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=me-We/2?this.face=pt.TOP:this.lat0<=-(me-We/2)?this.face=pt.BOTTOM:Math.abs(this.long0)<=We?this.face=pt.FRONT:Math.abs(this.long0)<=me+We?this.face=this.long0>0?pt.RIGHT:pt.LEFT:this.face=pt.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function KE(e){var t={x:0,y:0},i,n,o,s,a,r,l={value:0};if(e.x-=this.long0,this.es!==0?i=Math.atan(this.one_minus_f_squared*Math.tan(e.y)):i=e.y,n=e.x,this.face===pt.TOP)s=me-i,n>=We&&n<=me+We?(l.value=qe.AREA_0,o=n-me):n>me+We||n<=-(me+We)?(l.value=qe.AREA_1,o=n>0?n-Et:n+Et):n>-(me+We)&&n<=-We?(l.value=qe.AREA_2,o=n+me):(l.value=qe.AREA_3,o=n);else if(this.face===pt.BOTTOM)s=me+i,n>=We&&n<=me+We?(l.value=qe.AREA_0,o=-n+me):n<We&&n>=-We?(l.value=qe.AREA_1,o=-n):n<-We&&n>=-(me+We)?(l.value=qe.AREA_2,o=-n-me):(l.value=qe.AREA_3,o=n>0?-n+Et:-n-Et);else{var c,u,d,h,p,v,b;this.face===pt.RIGHT?n=vo(n,+me):this.face===pt.BACK?n=vo(n,+Et):this.face===pt.LEFT&&(n=vo(n,-me)),h=Math.sin(i),p=Math.cos(i),v=Math.sin(n),b=Math.cos(n),c=p*b,u=p*v,d=h,this.face===pt.FRONT?(s=Math.acos(c),o=xs(s,d,u,l)):this.face===pt.RIGHT?(s=Math.acos(u),o=xs(s,d,-c,l)):this.face===pt.BACK?(s=Math.acos(-c),o=xs(s,d,-u,l)):this.face===pt.LEFT?(s=Math.acos(-u),o=xs(s,d,c,l)):(s=o=0,l.value=qe.AREA_0)}return r=Math.atan(12/Et*(o+Math.acos(Math.sin(o)*Math.cos(We))-me)),a=Math.sqrt((1-Math.cos(s))/(Math.cos(r)*Math.cos(r))/(1-Math.cos(Math.atan(1/Math.cos(o))))),l.value===qe.AREA_1?r+=me:l.value===qe.AREA_2?r+=Et:l.value===qe.AREA_3&&(r+=1.5*Et),t.x=a*Math.cos(r),t.y=a*Math.sin(r),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,e.x=t.x,e.y=t.y,e}function e5(e){var t={lam:0,phi:0},i,n,o,s,a,r,l,c,u,d={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,n=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),i=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?d.value=qe.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(d.value=qe.AREA_1,i-=me):e.x<0&&-e.x>=Math.abs(e.y)?(d.value=qe.AREA_2,i=i<0?i+Et:i-Et):(d.value=qe.AREA_3,i+=me),u=Et/12*Math.tan(i),a=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),r=Math.atan(a),o=Math.cos(i),s=Math.tan(n),l=1-o*o*s*s*(1-Math.cos(Math.atan(1/Math.cos(r)))),l<-1?l=-1:l>1&&(l=1),this.face===pt.TOP)c=Math.acos(l),t.phi=me-c,d.value===qe.AREA_0?t.lam=r+me:d.value===qe.AREA_1?t.lam=r<0?r+Et:r-Et:d.value===qe.AREA_2?t.lam=r-me:t.lam=r;else if(this.face===pt.BOTTOM)c=Math.acos(l),t.phi=c-me,d.value===qe.AREA_0?t.lam=-r+me:d.value===qe.AREA_1?t.lam=-r:d.value===qe.AREA_2?t.lam=-r-me:t.lam=r<0?-r-Et:-r+Et;else{var h,p,v;h=l,u=h*h,u>=1?v=0:v=Math.sqrt(1-u)*Math.sin(r),u+=v*v,u>=1?p=0:p=Math.sqrt(1-u),d.value===qe.AREA_1?(u=p,p=-v,v=u):d.value===qe.AREA_2?(p=-p,v=-v):d.value===qe.AREA_3&&(u=p,p=v,v=-u),this.face===pt.RIGHT?(u=h,h=-p,p=u):this.face===pt.BACK?(h=-h,p=-p):this.face===pt.LEFT&&(u=h,h=p,p=-u),t.phi=Math.acos(-v)-me,t.lam=Math.atan2(p,h),this.face===pt.RIGHT?t.lam=vo(t.lam,-me):this.face===pt.BACK?t.lam=vo(t.lam,-Et):this.face===pt.LEFT&&(t.lam=vo(t.lam,+me))}if(this.es!==0){var b,y,x;b=t.phi<0?1:0,y=Math.tan(t.phi),x=this.b/Math.sqrt(y*y+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-x*x)/(this.one_minus_f*x)),b&&(t.phi=-t.phi)}return t.lam+=this.long0,e.x=t.lam,e.y=t.phi,e}function xs(e,t,i,n){var o;return e<xe?(n.value=qe.AREA_0,o=0):(o=Math.atan2(t,i),Math.abs(o)<=We?n.value=qe.AREA_0:o>We&&o<=me+We?(n.value=qe.AREA_1,o-=me):o>me+We||o<=-(me+We)?(n.value=qe.AREA_2,o=o>=0?o-Et:o+Et):(n.value=qe.AREA_3,o+=me)),o}function vo(e,t){var i=e+t;return i<-Et?i+=ta:i>+Et&&(i-=ta),i}var t5=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],i5={init:YE,forward:KE,inverse:e5,names:t5},rc=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],da=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],_m=.8487,xm=1.3523,Em=Qi/5,n5=1/Em,fo=18,Es=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},o5=function(e,t){return e[1]+t*(2*e[2]+t*3*e[3])};function a5(e,t,i,n){for(var o=t;n;--n){var s=e(o);if(o-=s,Math.abs(s)<i)break}return o}function s5(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function r5(e){var t=Oe(e.x-this.long0),i=Math.abs(e.y),n=Math.floor(i*Em);n<0?n=0:n>=fo&&(n=fo-1),i=Qi*(i-n5*n);var o={x:Es(rc[n],i)*t,y:Es(da[n],i)};return e.y<0&&(o.y=-o.y),o.x=o.x*this.a*_m+this.x0,o.y=o.y*this.a*xm+this.y0,o}function l5(e){var t={x:(e.x-this.x0)/(this.a*_m),y:Math.abs(e.y-this.y0)/(this.a*xm)};if(t.y>=1)t.x/=rc[fo][0],t.y=e.y<0?-me:me;else{var i=Math.floor(t.y*fo);for(i<0?i=0:i>=fo&&(i=fo-1);;)if(da[i][0]>t.y)--i;else if(da[i+1][0]<=t.y)++i;else break;var n=da[i],o=5*(t.y-n[0])/(da[i+1][0]-n[0]);o=a5(function(s){return(Es(n,s)-t.y)/o5(n,s)},o,xe,100),t.x/=Es(rc[i],o),t.y=(5*i+o)*Gt,e.y<0&&(t.y=-t.y)}return t.x=Oe(t.x+this.long0),t}var c5=["Robinson","robin"],u5={init:s5,forward:r5,inverse:l5,names:c5};function d5(){this.name="geocent"}function h5(e){var t=Xh(e,this.es,this.a);return t}function m5(e){var t=Yh(e,this.es,this.a,this.b);return t}var p5=["Geocentric","geocentric","geocent","Geocent"],v5={init:d5,forward:h5,inverse:m5,names:p5},Qt={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},ha={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function f5(){if(Object.keys(ha).forEach(function(i){if(typeof this[i]=="undefined")this[i]=ha[i].def;else{if(ha[i].num&&isNaN(this[i]))throw new Error("Invalid parameter value, must be numeric "+i+" = "+this[i]);ha[i].num&&(this[i]=parseFloat(this[i]))}ha[i].degrees&&(this[i]=this[i]*Gt)}.bind(this)),Math.abs(Math.abs(this.lat0)-me)<xe?this.mode=this.lat0<0?Qt.S_POLE:Qt.N_POLE:Math.abs(this.lat0)<xe?this.mode=Qt.EQUIT:(this.mode=Qt.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var e=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(e),this.sw=Math.sin(e)}function g5(e){e.x-=this.long0;var t=Math.sin(e.y),i=Math.cos(e.y),n=Math.cos(e.x),o,s;switch(this.mode){case Qt.OBLIQ:s=this.sinph0*t+this.cosph0*i*n;break;case Qt.EQUIT:s=i*n;break;case Qt.S_POLE:s=-t;break;case Qt.N_POLE:s=t;break}switch(s=this.pn1/(this.p-s),o=s*i*Math.sin(e.x),this.mode){case Qt.OBLIQ:s*=this.cosph0*t-this.sinph0*i*n;break;case Qt.EQUIT:s*=t;break;case Qt.N_POLE:s*=-(i*n);break;case Qt.S_POLE:s*=i*n;break}var a,r;return a=s*this.cg+o*this.sg,r=1/(a*this.sw*this.h1+this.cw),o=(o*this.cg-s*this.sg)*this.cw*r,s=a*r,e.x=o*this.a,e.y=s*this.a,e}function y5(e){e.x/=this.a,e.y/=this.a;var t={x:e.x,y:e.y},i,n,o;o=1/(this.pn1-e.y*this.sw),i=this.pn1*e.x*o,n=this.pn1*e.y*this.cw*o,e.x=i*this.cg+n*this.sg,e.y=n*this.cg-i*this.sg;var s=Ni(e.x,e.y);if(Math.abs(s)<xe)t.x=0,t.y=e.y;else{var a,r;switch(r=1-s*s*this.pfact,r=(this.p-Math.sqrt(r))/(this.pn1/s+s/this.pn1),a=Math.sqrt(1-r*r),this.mode){case Qt.OBLIQ:t.y=Math.asin(a*this.sinph0+e.y*r*this.cosph0/s),e.y=(a-this.sinph0*Math.sin(t.y))*s,e.x*=r*this.cosph0;break;case Qt.EQUIT:t.y=Math.asin(e.y*r/s),e.y=a*s,e.x*=r;break;case Qt.N_POLE:t.y=Math.asin(a),e.y=-e.y;break;case Qt.S_POLE:t.y=-Math.asin(a);break}t.x=Math.atan2(e.x,e.y)}return e.x=t.x+this.long0,e.y=t.y,e}var b5=["Tilted_Perspective","tpers"],C5={init:f5,forward:g5,inverse:y5,names:b5};function w5(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var e=1-this.es,t=1/e;this.radius_p=Math.sqrt(e),this.radius_p2=e,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function _5(e){var t=e.x,i=e.y,n,o,s,a;if(t=t-this.long0,this.shape==="ellipse"){i=Math.atan(this.radius_p2*Math.tan(i));var r=this.radius_p/Ni(this.radius_p*Math.cos(i),Math.sin(i));if(o=r*Math.cos(t)*Math.cos(i),s=r*Math.sin(t)*Math.cos(i),a=r*Math.sin(i),(this.radius_g-o)*o-s*s-a*a*this.radius_p_inv2<0)return e.x=Number.NaN,e.y=Number.NaN,e;n=this.radius_g-o,this.flip_axis?(e.x=this.radius_g_1*Math.atan(s/Ni(a,n)),e.y=this.radius_g_1*Math.atan(a/n)):(e.x=this.radius_g_1*Math.atan(s/n),e.y=this.radius_g_1*Math.atan(a/Ni(s,n)))}else this.shape==="sphere"&&(n=Math.cos(i),o=Math.cos(t)*n,s=Math.sin(t)*n,a=Math.sin(i),n=this.radius_g-o,this.flip_axis?(e.x=this.radius_g_1*Math.atan(s/Ni(a,n)),e.y=this.radius_g_1*Math.atan(a/n)):(e.x=this.radius_g_1*Math.atan(s/n),e.y=this.radius_g_1*Math.atan(a/Ni(s,n))));return e.x=e.x*this.a,e.y=e.y*this.a,e}function x5(e){var t=-1,i=0,n=0,o,s,a,r;if(e.x=e.x/this.a,e.y=e.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(e.y/this.radius_g_1),i=Math.tan(e.x/this.radius_g_1)*Ni(1,n)):(i=Math.tan(e.x/this.radius_g_1),n=Math.tan(e.y/this.radius_g_1)*Ni(1,i));var l=n/this.radius_p;if(o=i*i+l*l+t*t,s=2*this.radius_g*t,a=s*s-4*o*this.C,a<0)return e.x=Number.NaN,e.y=Number.NaN,e;r=(-s-Math.sqrt(a))/(2*o),t=this.radius_g+r*t,i*=r,n*=r,e.x=Math.atan2(i,t),e.y=Math.atan(n*Math.cos(e.x)/t),e.y=Math.atan(this.radius_p_inv2*Math.tan(e.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(e.y/this.radius_g_1),i=Math.tan(e.x/this.radius_g_1)*Math.sqrt(1+n*n)):(i=Math.tan(e.x/this.radius_g_1),n=Math.tan(e.y/this.radius_g_1)*Math.sqrt(1+i*i)),o=i*i+n*n+t*t,s=2*this.radius_g*t,a=s*s-4*o*this.C,a<0)return e.x=Number.NaN,e.y=Number.NaN,e;r=(-s-Math.sqrt(a))/(2*o),t=this.radius_g+r*t,i*=r,n*=r,e.x=Math.atan2(i,t),e.y=Math.atan(n*Math.cos(e.x)/t)}return e.x=e.x+this.long0,e}var E5=["Geostationary Satellite View","Geostationary_Satellite","geos"],M5={init:w5,forward:_5,inverse:x5,names:E5};function O5(e){e.Proj.projections.add(Cs),e.Proj.projections.add(ws),e.Proj.projections.add(D2),e.Proj.projections.add(z2),e.Proj.projections.add(Q2),e.Proj.projections.add(K2),e.Proj.projections.add(ax),e.Proj.projections.add(ux),e.Proj.projections.add(vx),e.Proj.projections.add(Cx),e.Proj.projections.add(kx),e.Proj.projections.add(Gx),e.Proj.projections.add(Qx),e.Proj.projections.add(eE),e.Proj.projections.add(aE),e.Proj.projections.add(uE),e.Proj.projections.add(vE),e.Proj.projections.add(CE),e.Proj.projections.add(OE),e.Proj.projections.add(AE),e.Proj.projections.add(FE),e.Proj.projections.add(VE),e.Proj.projections.add(WE),e.Proj.projections.add(XE),e.Proj.projections.add(i5),e.Proj.projections.add(u5),e.Proj.projections.add(v5),e.Proj.projections.add(C5),e.Proj.projections.add(M5)}fi.defaultDatum="WGS84",fi.Proj=Xi,fi.WGS84=new fi.Proj("WGS84"),fi.Point=uo,fi.toPoint=im,fi.defs=Kt,fi.nadgrid=L_,fi.transform=ys,fi.mgrs=J_,fi.version="__VERSION__",O5(fi);function P5(e,t,i,n,o){const s=1+Math.floor((e+180)/6),a=i+" +zone="+s+(t<0?" +south":""),r=fi(n,a,[e,t]);return{utmZone:s+(t<0?"S":"N"),north:r[1].toFixed(2)+o,east:r[0].toFixed(2)+o}}class S5{constructor(t){this.gridFileUrl=t,this.data=void 0,this.minimumHeight=-106.99,this.maximumHeight=85.39}isSupported(){return typeof Int16Array!="undefined"&&typeof Uint8Array!="undefined"}getHeight(t,i){return Mm(this).then(function(n){return Om(n,t,i)})}getHeights(t){return Mm(this).then(function(i){for(let n=0;n<t.length;++n){const o=t[n];o.height=Om(i,o.longitude,o.latitude)}return t})}}async function Mm(e){const{defined:t}=Cesium;t(e.data)||(e.data=T5(e.gridFileUrl));let i=e.data;if(e.data instanceof Promise&&(i=await e.data),!(e.data instanceof Int16Array)){const n=new Uint8Array(i);for(let o=0;o<n.length;o+=2){const s=n[o];n[o]=n[o+1],n[o+1]=s}e.data=new Int16Array(i)}return e.data}function Om(e,t,i){const{Math:n}=Cesium;let o=720*(n.PI_OVER_TWO-i)/Math.PI;o<0?o=0:o>720&&(o=720),t=n.zeroToTwoPi(t);let s=1440*t/n.TWO_PI;s<0?s=0:s>1440&&(s=1440);const a=s|0,r=o|0,l=s-a,c=o-r,u=1-l,d=1-c,h=Ms(e,r,a),p=Ms(e,r,a+1),v=Ms(e,r+1,a),b=Ms(e,r+1,a+1);return(h*u*d+p*l*d+v*u*c+b*l*c)/100}function Ms(e,t,i){return t>720?t=720:t<0&&(t=0),i>1439?i-=1440:i<0&&(i+=1440),e[t*1440+i]}function T5(e){const{Resource:t}=Cesium;return t.createIfNeeded(e).fetchArrayBuffer()}class I5{constructor(t){const{Cartographic:i,knockout:n}=Cesium,o=t.gridFileUrl;o&&(this.geoidModel=new S5(o)),this.proj4Projection=t.proj4Projection,this.projectionUnits=t.projectionUnits,this.proj4longlat=t.proj4longlat,this.lastHeightSamplePosition=new i,this.accurateSamplingDebounceTime=250,this.tileRequestInFlight=void 0,this.elevation="",this.utmZone="",this.latitude="",this.longitude="",this.north="",this.east="",this.useProjection=!1,this.debounceSampleAccurateHeight=Zb(this.sampleAccurateHeight,this.accurateSamplingDebounceTime),this.decimal=t.decimal||5,this.rangeType=t.rangeType||0,n.track(this,["elevation","utmZone","latitude","longitude","north","east","useProjection"])}toggleUseProjection(){this.useProjection=!this.useProjection}updateCoordinatesFromCesium(t,i){const{Cartographic:n,defined:o,EllipsoidTerrainProvider:s,Intersections2D:a,SceneMode:r}=Cesium,l=t.scene,c=l.camera.getPickRay(i),u=l.globe,d=u.pickTriangle(c,l);if(o(d)){const h=u.ellipsoid,p=h.cartesianToCartographic(d.v0),v=h.cartesianToCartographic(d.v1),b=h.cartesianToCartographic(d.v2),y=h.cartesianToCartographic(l.mode===r.SCENE3D?d.intersection:l.globe.pick(c,l));let x;if(u.terrainProvider instanceof s)y.height=void 0;else{const g=a.computeBarycentricCoordinates(y.longitude,y.latitude,p.longitude,p.latitude,v.longitude,v.latitude,b.longitude,b.latitude);if(g.x>=-1e-15&&g.y>=-1e-15&&g.z>=-1e-15){const k=g.x*p.height+g.y*v.height+g.z*b.height;y.height=k}const w=u.terrainProvider.getLevelMaximumGeometricError(d.tile.level),O=y.height,I=Math.max(d.tile.data.tileBoundingRegion.minimumHeight,O-w),R=Math.min(d.tile.data.tileBoundingRegion.maximumHeight,O+w),D=I-(this.geoidModel?this.geoidModel.minimumHeight:0),P=R+(this.geoidModel?this.geoidModel.maximumHeight:0);x=Math.max(Math.abs(O-D),Math.abs(P-O))}n.clone(y,this.lastHeightSamplePosition);const M=u.terrainProvider;this.cartographicToFields(y,x),M instanceof s||this.debounceSampleAccurateHeight(M,y)}else this.elevation="",this.utmZone="",this.latitude="",this.longitude="",this.north="",this.east=""}cartographicToFields(t,i){const{Math:n}=Cesium,o=n.toDegrees(t.latitude),s=n.toDegrees(t.longitude);if(this.useProjection){const r=P5(s,o,this.proj4Projection,this.proj4longlat,this.projectionUnits);this.utmZone=r.utmZone,this.north=r.north,this.east=r.east}const a=Qw(s,o,{height:t.height,errorBar:i,decimal:this.decimal,rangeType:this.rangeType});this.latitude=a.latitude,this.longitude=a.longitude,this.elevation=a.elevation}sampleAccurateHeight(t,i){const{Cartographic:n,sampleTerrainMostDetailed:o}=Cesium;if(this.tileRequestInFlight){this.debounceSampleAccurateHeight.cancel(),this.debounceSampleAccurateHeight(t,i);return}const s=n.clone(i),a=this.geoidModel?this.geoidModel.getHeight(i.longitude,i.latitude):void 0,r=o(t,[s]);this.tileRequestInFlight=Promise.all([a,r]).then(l=>{const c=l[0]||0;this.tileRequestInFlight=void 0,n.equals(i,this.lastHeightSamplePosition)&&(i.height=s.height-c,this.cartographicToFields(i))}).catch(()=>{this.tileRequestInFlight=void 0})}}const A5=[],D5={start:0,stop:0},B5={},L5={},j5={};function F5(){const{Globe:e,GlobeSurfaceTile:t,BoundingSphere:i,defaultValue:n,Cartesian3:o,defined:s,DeveloperError:a,IntersectionTests:r,SceneMode:l}=Cesium;e.prototype.pickTriangle=e.prototype.pickTriangle||function(c,u,d,h){if(!s(c))throw new a("ray is required");if(!s(u))throw new a("scene is required");d=n(d,!0);const p=u.mode,v=u.mapProjection,b=A5;b.length=0;const y=this._surface._tilesToRender;let x=y.length,M,g;for(g=0;g<x;++g){M=y[g];const O=M.data;if(!s(O))continue;const I=O.pickBoundingSphere;p!==l.SCENE3D?(i.fromRectangleWithHeights2D(M.rectangle,v,O.minimumHeight,O.maximumHeight,I),o.fromElements(I.center.z,I.center.x,I.center.y,I.center)):i.clone(O.boundingSphere3D,I);const R=r.raySphere(c,I,D5);s(R)&&b.push(M)}b.sort(k5(c.origin));let w;for(x=b.length,g=0;g<x;++g)if(w=b[g].data.pickTriangle(c,u.mode,u.mapProjection,d,h),s(w)){w.tile=b[g];break}return w},t.prototype.pickTriangle=t.prototype.pickTriangle||function(c,u,d,h){const p=this.renderedMesh;if(!s(p))return;const v=p.vertices,b=p.indices,y=p.encoding,x=b.length;for(let M=0;M<x;M+=3){const g=b[M],w=b[M+1],O=b[M+2],I=lc(y,u,d,v,g,B5),R=lc(y,u,d,v,w,L5),D=lc(y,u,d,v,O,j5),P=r.rayTriangle(c,I,R,D,h,new o);if(s(P))return{intersection:P,v0:I,v1:R,v2:D}}}}function k5(e){const{BoundingSphere:t}=Cesium;return function(i,n){const o=t.distanceSquaredTo(i.data.pickBoundingSphere,e),s=t.distanceSquaredTo(n.data.pickBoundingSphere,e);return o-s}}function lc(e,t,i,n,o,s){e.decodePosition(n,o,s);const{Cartesian3:a,defined:r,SceneMode:l}=Cesium;if(r(t)&&t!==l.SCENE3D){const c=i.ellipsoid.cartesianToCartographic(s);i.project(c,s),a.fromElements(s.z,s.x,s.y,s)}return s}var Pm={gridFileUrl:{type:String,default:"https://zouyaoji.top/vue-cesium/SampleData/WW15MGH.DAC"},proj4Projection:{type:String,default:"+proj=utm +ellps=GRS80 +units=m +no_defs"},projectionUnits:{type:String,default:"m"},proj4longlat:{type:String,default:"+proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees +no_defs"},position:{type:String,default:"bottom-right",validator:e=>["top-right","top-left","bottom-right","bottom-left","top","right","bottom","left"].includes(e)},offset:{type:Array,validator:e=>e.length===2},color:{type:String,default:"#fff"},decimal:{type:Number,default:6},rangeType:{type:Number,default:0},background:{type:String,default:"#3f4854"},showCameraInfo:{type:Boolean,default:!0},showMouseInfo:{type:Boolean,default:!0},showPerformanceInfo:{type:Boolean,default:!0},useProjection:{type:Boolean,default:!0},tooltip:{type:[Boolean,Object],default:()=>({delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0})},customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}};const R5={...Ce,statusBarEvt:e=>!0},Sm=Pm;var cc=K({name:"VcStatusBar",props:Sm,emits:R5,setup(e,t){var i;const n=oe();n.cesiumClass="VcStatusBar",n.cesiumEvents=[];const o=Ne(e,t,n);if(o===void 0)return;const s=Pt(n),{$services:a}=o,r=ee(null),l=ee(null),{t:c}=Ct();let u=-1,d=-1;const h=Ee({heading:"NaN",pitch:"NaN",roll:"NaN",height:"NaN",level:"NaN"}),p=Ee({fps:"NaN",ms:"NaN"}),v=ee(),b=vi(e),y=((i=s.proxy)==null?void 0:i.$options.name)==="VcNavigation",x=ee(y),M=Ee({});let g=!1;de(()=>e,P=>{Be(()=>{n.mounted&&w()})},{deep:!0}),n.createCesiumObject=async()=>{const{viewer:P}=a,k=P._element;return e.showMouseInfo&&(v.value=new I5({gridFileUrl:e.gridFileUrl,proj4Projection:e.proj4Projection,projectionUnits:e.projectionUnits,proj4longlat:e.proj4longlat,decimal:e.decimal,rangeType:e.rangeType}),k.addEventListener("wheel",R,!1),k.addEventListener("mousemove",R,!1),k.addEventListener("touchmove",R,!1),F5()),e.showCameraInfo&&(P.camera.changed.addEventListener(I),I()),e.showPerformanceInfo&&(g=P.scene.debugShowFramesPerSecond,P.scene.debugShowFramesPerSecond=!0,P.scene.postRender.addEventListener(O)),r},n.mount=async()=>{var P,k;x.value=!0,Be(()=>{w()});const{viewer:N}=a;return(k=N.viewerWidgetResized)==null||k.raiseEvent({type:n.cesiumClass,status:"mounted",target:(P=fe(r))==null?void 0:P.$el}),!0},n.unmount=async()=>{var P,k;x.value=!1;const{viewer:N}=a,$=N._element;return e.showMouseInfo&&(v.value=void 0,$.removeEventListener("wheel",R),$.removeEventListener("mousemove",R),$.removeEventListener("touchmove",R)),e.showCameraInfo&&N.camera.changed.removeEventListener(I),e.showPerformanceInfo&&(g?N.scene._performanceDisplay._container.style.display="block":N.scene.debugShowFramesPerSecond=!1,N.scene.postRender.removeEventListener(O)),(k=N.viewerWidgetResized)==null||k.raiseEvent({type:n.cesiumClass,status:"unmounted",target:(P=fe(r))==null?void 0:P.$el}),!0};const w=()=>{const P=b.style.value;if(M.left=P.left,M.top=P.top,M.transform=P.transform,P.background=e.background,P.color=e.color,typeof e.teleportToViewer=="undefined"||e.teleportToViewer){const k=b.attach.value;(k.bottom||k.top)&&!k.left&&!k.right&&(P.left="50%",P.transform="translate(-50%, 0)"),(k.left||k.right)&&!k.top&&!k.bottom&&(P.top="50%",P.transform="translate(0, -50%)")}Object.assign(M,P)},O=el(P=>{var k,N;p.fps=(k=P._performanceDisplay)==null?void 0:k._fpsText.nodeValue,p.ms=(N=P._performanceDisplay)==null?void 0:N._msText.nodeValue,P._performanceDisplay._container.style.display="none"},250),I=()=>{const{viewer:P}=a,k=P.scene,N=k.screenSpaceCameraController;if(k.mode===Cesium.SceneMode.MORPHING||!N.enableInputs)return;const{Math:$}=Cesium;h.heading=$.toDegrees(P.camera.heading).toFixed(1),h.pitch=$.toDegrees(P.camera.pitch).toFixed(1),h.roll=$.toDegrees(P.camera.roll).toFixed(1),h.height=P.camera.positionCartographic.height.toFixed(2),h.level=tr(Number(h.height)).toFixed(0)},R=P=>{var k;const{Cartesian2:N,SceneMode:$}=Cesium,{viewer:m}=a;if(m.scene.mode===$.MORPHING)return;const f=P.type==="mousemove"||P.type==="wheel"?P.clientX:P.changedTouches[0].clientX,C=P.type==="mousemove"||P.type==="wheel"?P.clientY:P.changedTouches[0].clientY;if(f===u&&C===d)return;u=f,d=C;const T=m._element;if(m){if(e.showMouseInfo){const _=T.getBoundingClientRect(),E=new N(f-_.left,C-_.top);(k=v.value)==null||k.updateCoordinatesFromCesium(m,E)}Pe(n,"statusBarEvt")&&t.emit("statusBarEvt",{type:"statusBar",mouseCoordsInfo:v.value,cameraInfo:h,performanceInfo:p})}},D=()=>{var P,k;e.useProjection&&((P=fe(l))==null||P.hide(),e.showMouseInfo&&((k=v.value)==null||k.toggleUseProjection()))};return Object.assign(n.proxy,{getMouseCoordsInfo:()=>v.value,getCameraInfo:()=>h,getPerformanceInfo:()=>p}),()=>{var P,k,N,$,m,f,C,T;if(x.value){const _=[];e.showMouseInfo?((P=v.value)!=null&&P.useProjection?_.push(S("div",{class:"vc-section-short ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.zone")),S("span",null,($=v.value)==null?void 0:$.utmZone)]),S("div",{class:"vc-section ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.e")),S("span",null,(m=v.value)==null?void 0:m.east)]),S("div",{class:"vc-section ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.n")),S("span",null,(f=v.value)==null?void 0:f.north)])):_.push(S("div",{class:"vc-section ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.lng")),S("span",{},(k=v.value)==null?void 0:k.longitude)]),S("div",{class:"vc-section ellipsis"},[S("span",{},c("vc.navigation.statusBar.lat")),S("span",{},(N=v.value)==null?void 0:N.latitude)])),(C=v.value)!=null&&C.elevation?_.push(S("div",{class:"vc-section ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.elev")),S("span",{},(T=v.value)==null?void 0:T.elevation)])):_.push(ie("v-if"))):_.push(ie("v-if")),e.showCameraInfo?_.push(S("div",{class:"vc-section-short-mini ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.level")),S("span",null,h.level)]),S("div",{class:"vc-section-short ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.heading")),S("span",null,`${h.heading}\xB0`)]),S("div",{class:"vc-section-short ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.pitch")),S("span",null,`${h.pitch}\xB0`)]),S("div",{class:"vc-section-short ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.roll")),S("span",null,`${h.roll}\xB0`)]),S("div",{class:"vc-section ellipsis"},[S("span",{...t.attrs},c("vc.navigation.statusBar.cameraHeight")),S("span",null,`${h.height}m`)])):_.push(ie("v-if")),e.showPerformanceInfo?_.push(S("div",{class:"vc-section-short-mini ellipsis"},[S("span",null,p.ms)]),S("div",{class:"vc-section-short-mini ellipsis"},[S("span",null,p.fps)])):_.push(ie("v-if")),ot(e.tooltip)&&e.showMouseInfo&&e.useProjection?_.push(S(At,{ref:l,...e.tooltip},()=>S("strong",null,ot(e.tooltip)&&e.tooltip.tip||c("vc.navigation.statusBar.tip")))):_.push(ie("v-if"));const E=S(ai,{ref:r,class:`vc-status-bar ${b.classes.value} ${e.customClass}`,style:M,noCaps:!0,onClick:D},()=>_);return!y&&e.teleportToViewer?S(tn,{to:a.viewer._element},E):E}else return ie("v-if")}}}),Tm={position:{type:String,default:"bottom-right",validator:e=>["top-right","top-left","bottom-right","bottom-left","top","right","bottom","left"].includes(e)},offset:{type:Array,validator:e=>e.length===2},color:{type:String,default:"#fff"},background:{type:String,default:"#3f4854"},width:{type:Number,default:100},barBackground:{type:String,default:"#fff"},customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}};const $5={...Ce,distanceLegendEvt:e=>!0},Im=Tm;var uc=K({name:"VcDistanceLegend",props:Im,emits:$5,setup(e,t){var i;const n=oe();n.cesiumClass="VcDistanceLegend",n.cesiumEvents=[];const o=Ne(e,t,n);if(o===void 0)return;const s=Pt(n),{$services:a}=o,r=ee(null),l=ee(""),c=vi(e),u=((i=s.proxy)==null?void 0:i.$options.name)==="VcNavigation",d=ee(u),h=Ee({});let p=0;const v=ee(0);let b=0;de(()=>e,g=>{Be(()=>{n.mounted&&x()})},{deep:!0});const y=ae(()=>({width:`${v.value}px`,left:`${5+(e.width+15-v.value)/2}px`,height:"2px",background:e.barBackground}));n.createCesiumObject=async()=>(l.value="",r),n.mount=async()=>{var g,w;d.value=!0,Be(()=>{x()});const{viewer:O}=a;return O.scene.postRender.addEventListener(M),(w=O.viewerWidgetResized)==null||w.raiseEvent({type:n.cesiumClass,status:"mounted",target:(g=fe(r))==null?void 0:g.$el}),!0},n.unmount=async()=>{var g,w;d.value=!1;const{viewer:O}=a;return O.scene.postRender.removeEventListener(M),(w=O.viewerWidgetResized)==null||w.raiseEvent({type:n.cesiumClass,status:"unmounted",target:(g=fe(r))==null?void 0:g.$el}),!0};const x=()=>{const g=c.style.value;if(h.left=g.left,h.top=g.top,h.transform=g.transform,g.background=e.background,g.color=e.color,typeof e.teleportToViewer=="undefined"||e.teleportToViewer){const w=c.attach.value;(w.bottom||w.top)&&!w.left&&!w.right&&(g.left="50%",g.transform="translate(-50%, 0)"),(w.left||w.right)&&!w.top&&!w.bottom&&(g.top="50%",g.transform="translate(0, -50%)")}g.width=`${e.width}px`,Object.assign(h,g)},M=el(g=>{const{Cartesian2:w,defined:O,getTimestamp:I,EllipsoidGeodesic:R}=Cesium,D=I();if(D<p+250)return;p=D;const P=new R,k=g.canvas.clientWidth,N=g.canvas.clientHeight,$=g.camera.getPickRay(new w(k/2|0,N-1)),m=g.camera.getPickRay(new w(1+k/2|0,N-1)),f=g.globe,C=f.pick($,g),T=f.pick(m,g);if(!O(C)||!O(T)){v.value=0,l.value="";return}const _=f.ellipsoid.cartesianToCartographic(C),E=f.ellipsoid.cartesianToCartographic(T);P.setEndPoints(_,E);const A=P.surfaceDistance,L=e.width-10;let B;for(let F=dc.length-1;!O(B)&&F>=0;--F)dc[F]/A<L&&(B=dc[F],b!==B&&(b=B,Pe(n,"distanceLegendEvt")&&t.emit("distanceLegendEvt",{type:"distanceLegend",distance:b,status:"changed"})));if(O(B)){let F;b>=1e3?F=(B/1e3).toString()+" km":F=B.toString()+" m",v.value=B/A|0,l.value=F}else v.value=0,l.value=""},500);return()=>{if(d.value&&l.value!==void 0){const g=S(ai,{ref:r,class:`vc-distance-legend ${c.classes.value} ${e.customClass}`,style:h,stack:!0,noCaps:!0},()=>[S("label",null,l.value),S("div",{style:y.value,class:"vc-bar"})]);return!u&&e.teleportToViewer?S(tn,{to:a.viewer._element},g):g}else return ie("v-if")}}});const dc=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7],Am={...vn,compassOpts:{type:[Object,Boolean],default:()=>bi(Nl,["position","offset"])},zoomOpts:{type:[Object,Boolean],default:()=>bi(Hl,["position","offset"])},printOpts:{type:[Object,Boolean],default:()=>bi(Lh,["position","offset"])},locationOpts:{type:[Object,Boolean],default:()=>bi(Fh,["position","offset"])},otherOpts:{type:[Object,Boolean],default:()=>({position:"bottom-right",offset:[2,3],statusBarOpts:bi(Pm,["position","offset"]),distancelegendOpts:bi(Tm,["position","offset"])})},customClass:{type:String,default:""},teleportToViewer:{type:Boolean,default:!0}},ma=bi(Am),N5={...Ce,zoomEvt:e=>!0,compassEvt:e=>!0,locationEvt:e=>!0,printEvt:e=>!0,statusBarEvt:e=>!0,distanceLegendEvt:e=>!0},Dm=Am;var Bm=K({name:"VcNavigation",inheritAttrs:!1,props:Dm,emits:N5,setup(e,t){const i=oe();i.cesiumClass="VcNavigation";const n=Ne(e,t,i);if(n===void 0)return;const o=ee(!1),{$services:s}=n,a=vi(e),r=vi(e.otherOpts||{position:"bottom-right"}),l=ee(null),c=ee(null),u=ee(null),d=ee(null),h=ee(null),p=ee(null),v=ee(null),b=ee(null),y=Ee({}),x=Ee({}),{emit:M}=t;de(()=>e,()=>{Be(()=>{var T,_,E,A,L,B;C(),(T=fe(u))==null||T.reload(),(_=fe(d))==null||_.reload(),(E=fe(p))==null||E.reload(),(A=fe(h))==null||A.reload(),(L=fe(v))==null||L.reload(),(B=fe(b))==null||B.reload()})},{deep:!0});const g=ae(()=>Object.assign({},ma.compassOpts,e.compassOpts)),w=ae(()=>Object.assign({},ma.zoomOpts,e.zoomOpts)),O=ae(()=>Object.assign({},ma.printOpts,e.printOpts)),I=ae(()=>Object.assign({},ma.locationOpts,e.locationOpts)),R=ae(()=>Object.assign({},ma.otherOpts,e.otherOpts)),D=T=>{Pe(i,"compassEvt")&&M("compassEvt",T)},P=T=>{Pe(i,"zoomEvt")&&M("zoomEvt",T)},k=T=>{Pe(i,"printEvt")&&M("printEvt",T)},N=T=>{Pe(i,"locationEvt")&&M("locationEvt",T)},$=T=>{Pe(i,"statusBarEvt")&&M("statusBarEvt",T)},m=T=>{Pe(i,"distanceLegendEvt")&&M("distanceLegendEvt",T)};i.createCesiumObject=async()=>{var T;const{viewer:_}=s;return(T=_.viewerWidgetResized)==null||T.addEventListener(f),[l,c]},i.mount=async()=>{var T;o.value=!0,Be(()=>{C()});const{viewer:_}=s;return(T=_.viewerWidgetResized)==null||T.raiseEvent({type:i.cesiumClass,status:"mounted",target:fe(l)}),!0},i.unmount=async()=>{var T,_;o.value=!1;const{viewer:E}=s;return(T=E.viewerWidgetResized)==null||T.removeEventListener(f),(_=E.viewerWidgetResized)==null||_.raiseEvent({type:i.cesiumClass,status:"unmounted",target:fe(l)}),!0};const f=()=>{Be(()=>{C()})},C=()=>{var T,_,E,A,L;const B=(T=fe(u))==null?void 0:T.$el;let F=0,q=0;if(B!==void 0&&B.nodeName!=="#comment"){const Q=getComputedStyle(B.parentNode).margin;q=parseInt(Q),F+=B.getBoundingClientRect().height+q*2}const Z=(_=fe(d))==null?void 0:_.$el;Z!==void 0&&Z.nodeName!=="#comment"&&(F+=Z.getBoundingClientRect().height+q*2);const H=(E=fe(h))==null?void 0:E.$el;H!==void 0&&H.nodeName!=="#comment"&&(F+=H.getBoundingClientRect().height+q*2);const V=(A=fe(p))==null?void 0:A.$el;V!==void 0&&V.nodeName!=="#comment"&&(F+=V.getBoundingClientRect().height+q*2);const j=a.style.value,G=a.attach.value;y.left=j.left,y.top=j.top,y.transform=j.transform,(typeof e.teleportToViewer=="undefined"||e.teleportToViewer)&&((G.bottom||G.top)&&!G.left&&!G.right&&(j.left="50%",j.transform="translate(-50%, 0)"),(G.left||G.right)&&!G.top&&!G.bottom&&(j.top="50%",j.transform="translate(0, -50%)")),Object.assign(y,j,{height:`${F}px`});const J=r.style.value,U=r.attach.value;x.left=J.left,x.top=J.top,x.transform=J.transform,(typeof e.teleportToViewer=="undefined"||e.teleportToViewer)&&((U.bottom||U.top)&&!U.left&&!U.right&&(J.left="50%",J.transform="translate(-50%, 0)"),(U.left||U.right)&&!U.top&&!U.bottom&&(J.top="50%",J.transform="translate(0, -50%)"));let z=0;const Y=(L=fe(v))==null?void 0:L.$el;Y!==void 0&&Y.nodeName!=="#comment"&&(z+=Y.getBoundingClientRect().height),Object.assign(x,J,{height:`${z}px`})};return()=>{if(o.value){const T=[];g.value&&e.compassOpts!==!1?T.push(S("div",{class:"vc-navigation-control"},[S(Ul,{ref:u,...g.value,onCompassEvt:D})])):T.push(ie("v-if")),w.value&&e.zoomOpts!==!1?T.push(S("div",{class:"vc-navigation-control"},[S(ql,{ref:d,...w.value,onZoomEvt:P})])):T.push(ie("v-if")),O.value&&e.printOpts!==!1?T.push(S("div",{class:"vc-navigation-control"},[S(Ql,{ref:h,...O.value,onPrintEvt:k})])):T.push(ie("v-if")),I.value&&e.locationOpts!==!1?T.push(S("div",{class:"vc-navigation-control"},[S(Jl,{ref:p,...I.value,onLocationEvt:N})])):T.push(ie("v-if"));let _=[S("div",{class:"vc-navigation-controls"},T)];_=Ei(t.slots.default,_);const E=[],A=S("div",{ref:l,class:`vc-navigation ${a.classes.value} ${e.customClass}`,style:y},_);if(e.teleportToViewer?E.push(S(tn,{to:s.viewer._element},A)):E.push(A),e.otherOpts!==!1){const L=S("div",{ref:c,class:"vc-location-other-controls "+r.classes.value,style:x},[S(cc,{ref:v,...R.value.statusBarOpts,onStatusBarEvt:$}),S(uc,{ref:b,...R.value.distancelegendOpts,onDistanceLegendEvt:m})]);e.teleportToViewer?E.push(S(tn,{to:s.viewer._element},L)):E.push(L)}return E}else return ie("v-if")}}});function V5(e,{emit:t},i){const n={},o={},s={},a={};let r,l,c,u;const d=ee(0);let h,p,v=0,b={},y=0,x,M,g,w={},O=0;const I=ee(56),R=ee(3);let D;const P=ee(null),k=A=>{var L;A.stopPropagation&&A.stopPropagation(),A.preventDefault&&A.preventDefault(),(L=fe(P))==null||L.hide();const{Cartesian2:B,SceneMode:F,Math:q}=Cesium;if(i.viewer.scene.mode===F.MORPHING)return!0;const Z=A.currentTarget,H=A.currentTarget.getBoundingClientRect(),V=new B((H.right-H.left)/2,(H.bottom-H.top)/2);let j;A instanceof MouseEvent?(j=new B(A.clientX-H.left,A.clientY-H.top),D=new B(A.clientX,A.clientY)):A instanceof TouchEvent&&(j=new B(A.changedTouches[0].clientX-H.left,A.changedTouches[0].clientY-H.top),D=new B(A.changedTouches[0].clientX,A.changedTouches[0].clientY));const G=B.subtract(j,V,n),J=B.magnitude(G);if(J>30&&J<45)C(Z,G);else if(!(J>50&&J<70))f(Z,G);else{const U=q.PI_OVER_TWO-Math.atan2(-G.y,G.x);U>=0&&U<=q.PI_OVER_TWO&&T(Z,G)}},N=A=>{const{Cartesian2:L,Math:B}=Cesium,F=A.currentTarget.getBoundingClientRect(),q=new L((F.right-F.left)/2,(F.bottom-F.top)/2),Z=A.type==="mouseup"?new L(A.clientX-F.left,A.clientY-F.top):new L(A.changedTouches[0].clientX-F.left,A.changedTouches[0].clientY-F.top),H=L.subtract(Z,q,n),V=L.magnitude(H);if(V>30&&V<45){const j=B.toDegrees(Math.atan2(-H.y,H.x)),G=A.type==="mouseup"?new L(A.clientX,A.clientY):new L(A.changedTouches[0].clientX,A.changedTouches[0].clientY),J=G.x-D.x,U=G.y-D.y;if(Math.sqrt(J*J+U*U)>5)return;const z=B.toDegrees(d.value),Y=Math.abs(j-z),Q=i.viewer.scene;(j>0&&z>0&&z<90&&Y>80&&Y<100||Y>260&&Y<280)&&Q.camera.flyTo({destination:Q.camera.position,orientation:{heading:0,pitch:Q.camera.pitch}})}},$=A=>{const{Cartesian2:L,Cartesian3:B,defined:F,Matrix4:q,Ray:Z,SceneMode:H,Transforms:V}=Cesium,{viewer:j}=i,G=j.scene,J=G.camera,U=G.screenSpaceCameraController;if(G.mode===H.MORPHING||!U.enableInputs)return!0;if(G.mode===H.COLUMBUS_VIEW&&!U.enableTranslate||(G.mode===H.SCENE3D||G.mode===H.COLUMBUS_VIEW)&&(!U.enableLook||G.mode===H.SCENE3D&&!U.enableRotate))return;const z=new L;z.x=G.canvas.clientWidth/2,z.y=G.canvas.clientHeight/2;const Y=new Z,Q=J.getPickRay(z,Y),te=G.globe.pick(Q,G,a);if(!F(te)){j.camera.flyHome();return}const X=Pe(i,"compassEvt");X&&t("compassEvt",{type:"reset",camera:j.camera,status:"start",target:A.currentTarget});const ne=V.eastNorthUpToFixedFrame(te||new B,j.scene.globe.ellipsoid),re=B.subtract(te||new B,J.position,new B),pe=Ph.createTween(G,{destination:q.multiplyByPoint(ne,new B(0,0,B.magnitude(re)),new B),direction:q.multiplyByPointAsVector(ne,new B(0,0,-1),new B),up:q.multiplyByPointAsVector(ne,new B(0,1,0),new B),duration:e.duration,complete:()=>{X&&t("compassEvt",{type:"reset",camera:j.camera,status:"end",target:A.currentTarget})},cancel:()=>{X&&t("compassEvt",{type:"reset",camera:j.camera,status:"cancel",target:A.currentTarget})}});G.tweens.add(pe)},m=()=>{const{defined:A}=Cesium;A(i.viewer)?(r&&(r(),r=void 0),r=i.viewer.scene.postRender.addEventListener(function(){d.value!==i.viewer.scene.camera.heading&&(d.value=i.viewer.scene.camera.heading)})):r&&(r(),r=void 0)},f=(A,L)=>{const{defined:B,getTimestamp:F,SceneMode:q,Math:Z,ScreenSpaceEventType:H}=Cesium,V=i.viewer.scene,j=V.screenSpaceCameraController;if(V.mode===q.MORPHING||!j.enableInputs)return;switch(V.mode){case q.COLUMBUS_VIEW:if(j.enableLook)break;if(!j.enableTranslate||!j.enableTilt)return;break;case q.SCENE3D:if(j.enableLook)break;if(!j.enableTilt||!j.enableRotate)return;break;case Cesium.SceneMode.SCENE2D:if(!j.enableTranslate)return;break}x.removeInputAction(H.LEFT_UP),B(u)&&i.viewer.clock.onTick.removeEventListener(u),c=void 0,u=void 0,F();let G=Z.PI_OVER_TWO-Math.atan2(-L.y,L.x);const J=Math.PI/4;let U=0;const z={LEFT:1,RIGHT:2,UP:3,DOWN:4};U=G>=-J&&J>=G?z.DOWN:G>=J&&3*J>=G?z.RIGHT:G>=3*J&&5*J>=G?z.UP:z.LEFT;const Y=Pe(i,"compassEvt");let Q="rotateEast";switch(U){case z.LEFT:Q="rotateWest";break;case z.RIGHT:Q="rotateEast";break;case z.UP:Q="rotateNorth";break;case z.DOWN:Q="rotateSouth"}Y&&t("compassEvt",{type:Q,camera:V.camera,status:"start",target:A}),u=function(te){const X=i.viewer.scene,ne=X.camera;switch(F(),G=20*Math.abs(ne.positionCartographic.height/6378317)*5e-4,U){case z.LEFT:ne.rotateLeft(G);break;case z.RIGHT:ne.rotateRight(G);break;case z.UP:ne.rotate(ne.right,-G);break;case z.DOWN:ne.rotate(ne.right,G)}Y&&t("compassEvt",{type:Q,camera:X.camera,status:"changing",target:A})},c=function(te){x.removeInputAction(H.LEFT_UP),B(u)&&i.viewer.clock.onTick.removeEventListener(u),c=void 0,u=void 0,Y&&t("compassEvt",{type:Q,camera:V.camera,status:"end",target:A})},x.setInputAction(c,H.LEFT_UP),l=i.viewer.clock.onTick.addEventListener(u)},C=(A,L)=>{if(!e.enableCompassOuterRing)return;const B=i.viewer.scene;let F=B.camera;const q=B.screenSpaceCameraController;if(B.mode===Cesium.SceneMode.MORPHING||B.mode===Cesium.SceneMode.SCENE2D||!q.enableInputs||!q.enableLook&&(B.mode===Cesium.SceneMode.COLUMBUS_VIEW||B.mode===Cesium.SceneMode.SCENE3D&&!q.enableRotate))return;document.removeEventListener("mousemove",p,!1),document.removeEventListener("touchmove",p,!1),document.removeEventListener("mouseup",h,!1),document.removeEventListener("touchend",h,!1);const{Cartesian2:Z,Cartesian3:H,defined:V,Math:j,Matrix4:G,Ray:J,Transforms:U}=Cesium;p=void 0,h=void 0;const z=Pe(i,"compassEvt");z&&t("compassEvt",{type:"rotate",camera:B.camera,status:"start",target:A}),v=Math.atan2(-L.y,L.x);const Y=new Z;Y.x=B.canvas.clientWidth/2,Y.y=B.canvas.clientHeight/2;const Q=new J,te=F.getPickRay(Y,Q),X=B.globe.pick(te,B,a);V(X)?b=U.eastNorthUpToFixedFrame(X||new H,B.globe.ellipsoid,s):b=U.eastNorthUpToFixedFrame(F.positionWC,B.globe.ellipsoid,s);let ne=G.clone(F.transform,o);F.lookAtTransform(b),y=Math.atan2(F.position.y,F.position.x),H.magnitude(new H(F.position.x,F.position.y,0)),F.lookAtTransform(ne),p=function(re){const pe=A.getBoundingClientRect(),be=new Z((pe.right-pe.left)/2,(pe.bottom-pe.top)/2);let he;re instanceof MouseEvent?he=new Z(re.clientX-pe.left,re.clientY-pe.top):re instanceof TouchEvent&&(he=new Z(re.changedTouches[0].clientX-pe.left,re.changedTouches[0].clientY-pe.top));const ye=Z.subtract(he,be,n),we=Math.atan2(-ye.y,ye.x)-v,ge=j.zeroToTwoPi(y-we);F=i.viewer.scene.camera,ne=G.clone(F.transform,o),F.lookAtTransform(b);const ve=Math.atan2(F.position.y,F.position.x);F.rotateRight(ge-ve),F.lookAtTransform(ne),z&&t("compassEvt",{type:"rotate",camera:B.camera,status:"changing",target:A})},h=function(re){document.removeEventListener("mousemove",p,!1),document.removeEventListener("touchmove",p,!1),document.removeEventListener("mouseup",h,!1),document.removeEventListener("touchend",h,!1),p=void 0,h=void 0,z&&t("compassEvt",{type:"rotate",camera:B.camera,status:"end",target:A})},document.addEventListener("mousemove",p,!1),document.addEventListener("touchmove",p,!1),document.addEventListener("mouseup",h,!1),document.addEventListener("touchend",h,!1)},T=(A,L)=>{const{Cartesian2:B,defined:F,Math:q,Matrix4:Z,ScreenSpaceEventType:H,Transforms:V}=Cesium;x.removeInputAction(H.MOUSE_MOVE),x.removeInputAction(H.LEFT_UP),M=void 0,g=void 0,O=q.PI_OVER_TWO-Math.atan2(-L.y,L.x),O=O<0?0:O,O=O>q.PI_OVER_TWO?q.PI_OVER_TWO:O;const j=i.viewer.scene,G=j.camera,J=new B;J.x=j.canvas.clientWidth/2,J.y=j.canvas.clientHeight/2;let U=G.pickEllipsoid(J,j.globe.ellipsoid);if(!F(U))for(;J.y<j.canvas.clientHeight;)J.y+=5,U=G.pickEllipsoid(J,j.globe.ellipsoid);const z=Pe(i,"compassEvt");z&&t("compassEvt",{type:"tilt",camera:j.camera,status:"start",target:A}),Ii(U)&&F(U)&&(w=V.eastNorthUpToFixedFrame(U,j.globe.ellipsoid)),M=Y=>{const Q=A.getBoundingClientRect(),te=new Cesium.Cartesian2((Q.right-Q.left)/2,(Q.bottom-Q.top)/2),X=B.clone(Y.endPosition),ne=B.subtract(X,te,n);let re=q.PI_OVER_TWO-Math.atan2(-ne.y,ne.x);re=re<0?0:re,re=re>q.PI_OVER_TWO?q.PI_OVER_TWO:re;const pe=i.viewer.scene.camera,be=Z.clone(pe.transform,o);pe.lookAtTransform(w);const he=re-O;pe.rotateUp(he),O=re,pe.lookAtTransform(be);let ye=Math.ceil(re/(Math.PI/40));ye=ye>19?19:ye;const we=hc()[ye];I.value=we.x,R.value=we.y,z&&t("compassEvt",{type:"tilt",camera:j.camera,status:"changing",target:A})},g=function(Y){x.removeInputAction(H.MOUSE_MOVE),x.removeInputAction(H.LEFT_UP),M=void 0,g=void 0,z&&t("compassEvt",{type:"tilt",camera:j.camera,status:"end",target:A})},x.setInputAction(M,H.MOUSE_MOVE),x.setInputAction(g,H.LEFT_UP)},_=A=>{p!==void 0&&(A.cancel=!0)},E=()=>{const{Math:A}=Cesium,L=A.PI_OVER_TWO+i.viewer.scene.camera.pitch,B=Math.PI/2/20;let F=Math.floor(L/B);F=F>19?19:F,F=F<0?0:F,I.value=hc()[F].x,R.value=hc()[F].y};return{heading:d,handleDoubleClick:$,handleMouseDown:k,handleMouseUp:N,onTooltipBeforeShow:_,viewerChange:m,load:async(A,L)=>(i.viewer=A,d.value=A.scene.camera.heading,m(),x=new Cesium.ScreenSpaceEventHandler(L),E(),!0),unload:async()=>(document.removeEventListener("mousemove",p,!1),document.removeEventListener("touchmove",p,!1),document.removeEventListener("mouseup",h,!1),document.removeEventListener("touchend",h,!1),l&&l(),r&&r(),x==null||x.destroy(),!0),tiltbarLeft:I,tiltbarTop:R,tooltipRef:P}}function hc(){return[{x:56,y:3},{x:59,y:4},{x:64,y:5},{x:69,y:6},{x:74,y:7},{x:79,y:9},{x:84,y:12},{x:89,y:15},{x:92,y:19},{x:94,y:20},{x:99,y:25},{x:104,y:34},{x:106,y:40},{x:107,y:44},{x:107,y:46},{x:107,y:48},{x:107,y:50},{x:107,y:52},{x:107,y:54},{x:107,y:56}]}const Lm={enableCompassOuterRing:{type:Boolean,default:!0},duration:{type:Number,default:1.5},tooltip:{type:[Boolean,Object],default:()=>({delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0})},autoHidden:{type:Boolean,default:!0},...vn},z5={...Ce,compassEvt:e=>!0};var mc=K({name:"VcCompassSm",props:Lm,emits:z5,setup(e,t){var i;const n=oe();n.cesiumClass="VcCompassSm";const o=Ne(e,t,n);if(o===void 0)return;const{t:s}=Ct(),a=Pt(n),{$services:r}=o,l=V5(e,t,n),c=vi(e),u=ee(null),d=ee(null),h=((i=a.proxy)==null?void 0:i.$options.name)==="VcNavigationSm",p=ee(h),v=Ee({});de(()=>e,g=>{Be(()=>{n.mounted&&M()})},{deep:!0});const b=ae(()=>({left:l.tiltbarLeft.value+"px",top:l.tiltbarTop.value+"px",visibility:e.autoHidden?"hidden":"visible"})),y=ae(()=>({visibility:e.autoHidden?"hidden":"visible"})),x=ae(()=>({transform:"rotate(-"+l.heading.value+"rad)",WebkitTransform:"rotate(-"+l.heading.value+"rad)"}));n.createCesiumObject=async()=>{p.value=!0;const{viewer:g}=r;return new Promise((w,O)=>{Be(()=>{h||g._element.appendChild(fe(u)),w(fe(u))})})},n.mount=async()=>{var g;M();const{viewer:w}=r;return(g=w.viewerWidgetResized)==null||g.raiseEvent({type:n.cesiumClass,status:"mounted",target:fe(u)}),l.load(r.viewer,fe(u))},n.unmount=async()=>{var g;const{viewer:w}=r,O=w._element;return h||O.contains(fe(u))&&O.removeChild(fe(u)),(g=w.viewerWidgetResized)==null||g.raiseEvent({type:n.cesiumClass,status:"unmounted",target:fe(u)}),l.unload()};const M=()=>{const g=c.style.value;v.left=g.left,v.top=g.top,v.transform=g.transform;const w=c.attach.value,O=fe(d);if(O!==void 0){const I=O==null?void 0:O.getBoundingClientRect();g.width=`${I==null?void 0:I.width}px`,g.height=`${I==null?void 0:I.height}px`,(w.bottom||w.top)&&!w.left&&!w.right&&(g.left="50%",g.transform="translate(-50%, 0)"),(w.left||w.right)&&!w.top&&!w.bottom&&(g.top="50%",g.transform="translate(0, -50%)")}Object.assign(v,g)};return()=>{if(p.value){let g=[];return g=Ei(t.slots.default,g),g.push(S("div",{class:"vc-compass-tilt-sm",style:y.value})),g.push(S("div",{class:"vc-compass-tiltbar-sm",style:b.value})),g.push(S("div",{class:"vc-compass-arrows-sm",style:y.value})),g.push(S("div",{ref:d,class:"vc-compass-outer-ring-sm",style:x.value},e.tooltip?S(At,{ref:l.tooltipRef,...e.tooltip,onBeforeShow:l.onTooltipBeforeShow},()=>S("strong",{},e.tooltip.tip||s("vc.navigationSm.compass.outerTip"))):ie("v-if"))),g.push(S("div",{class:"vc-arrows-e-sm",style:y.value})),g.push(S("div",{class:"vc-arrows-n-sm",style:y.value})),g.push(S("div",{class:"vc-arrows-s-sm",style:y.value})),g.push(S("div",{class:"vc-arrows-w-sm",style:y.value})),S("div",{ref:u,class:"vc-compass-sm "+c.classes.value,style:v,onDblclick:l.handleDoubleClick,onMousedown:l.handleMouseDown,onMouseup:l.handleMouseUp,onTouchend:l.handleMouseUp,onTouchstart:l.handleMouseDown},g)}else return ie("v-if")}}});function G5(e,{emit:t},i,n){const o=ee(65),s=ee(null),a=ee(null),r=ee(null);let l,c,u,d,h,p,v,b,y,x,M,g;const w=P=>{var k,N,$;const{defined:m,getTimestamp:f,SceneMode:C,ScreenSpaceEventType:T}=Cesium,{viewer:_}=n;(k=fe(s))==null||k.hide(),(N=fe(a))==null||N.hide(),($=fe(r))==null||$.hide(),l.removeInputAction(T.LEFT_UP),m(c)&&_.clock.onTick.removeEventListener(c),u=void 0,c=void 0,f();const E=_.scene.camera;c=()=>{_.scene.mode===C.COLUMBUS_VIEW||_.scene.mode===C.SCENE2D?E.zoomIn():R(1)},u=()=>{l.removeInputAction(T.LEFT_UP),m(c)&&_.clock.onTick.removeEventListener(c),u=void 0,c=void 0},l.setInputAction(u,T.LEFT_UP),d=_.clock.onTick.addEventListener(c)},O=P=>{var k,N,$;(k=fe(s))==null||k.hide(),(N=fe(a))==null||N.hide(),($=fe(r))==null||$.hide();const{defined:m,getTimestamp:f,SceneMode:C,ScreenSpaceEventType:T}=Cesium,{viewer:_}=n;l.removeInputAction(T.LEFT_UP),m(h)&&_.clock.onTick.removeEventListener(h),p=void 0,h=void 0,f();const E=_.scene.camera;h=()=>{_.scene.mode===C.COLUMBUS_VIEW||_.scene.mode===C.SCENE2D?E.zoomOut():R(-1)},p=()=>{l.removeInputAction(T.LEFT_UP),m(h)&&_.clock.onTick.removeEventListener(h),p=void 0,h=void 0},l.setInputAction(p,T.LEFT_UP),v=_.clock.onTick.addEventListener(h)},I=P=>{var k,N,$;(k=fe(s))==null||k.hide(),(N=fe(a))==null||N.hide(),($=fe(r))==null||$.hide();const{Cartesian2:m,defined:f,SceneMode:C}=Cesium,{viewer:T}=n;document.removeEventListener("mousemove",b,!1),document.removeEventListener("touchmove",b,!1),document.removeEventListener("mouseup",y,!1),document.removeEventListener("touchend",y,!1),f(x)&&T.clock.onTick.removeEventListener(x),y=void 0,x=void 0;const _=T.scene.camera;x=()=>{const E=o.value-65;E>0?T.scene.mode===C.COLUMBUS_VIEW||T.scene.mode===C.SCENE2D?_.zoomOut():R(-1):E<0&&(T.scene.mode===C.COLUMBUS_VIEW||T.scene.mode===C.SCENE2D?_.zoomIn():R(1))},b=E=>{const A=o.value,L=E.target.parentElement.getBoundingClientRect(),B=g.getBoundingClientRect(),F=new Cesium.Cartesian2;F.x=E.type==="touchmove"?E.changedTouches[0].clientX-B.left:E.clientX-B.left,F.y=E.type==="touchmove"?E.changedTouches[0].clientY-B.top:E.clientY-B.top;let q=new m(L.width-F.x,L.height-F.y).y-16;q=q<0?0:q,q=q>120?120:q,o.value=120-q,o.value-A>0?T.scene.mode===C.COLUMBUS_VIEW||T.scene.mode===C.SCENE2D?_.zoomOut():R(-1):T.scene.mode===C.COLUMBUS_VIEW||T.scene.mode===C.SCENE2D?_.zoomIn():R(1)},y=()=>{document.removeEventListener("mousemove",b,!1),document.removeEventListener("touchmove",b,!1),document.removeEventListener("mouseup",y,!1),document.removeEventListener("touchend",y,!1),f(x)&&T.clock.onTick.removeEventListener(x),y=void 0,b=void 0,x=void 0,o.value=65},document.addEventListener("mousemove",b,!1),document.addEventListener("touchmove",b,!1),document.addEventListener("mouseup",y,!1),document.addEventListener("touchend",y,!1),M=T.clock.onTick.addEventListener(x)},R=P=>{const{Cartesian2:k,Cartesian3:N,defined:$,Ellipsoid:m,Math:f}=Cesium,{viewer:C}=n,T=C.scene,_=T.camera,E=T.canvas,A=new k;A.x=E.clientWidth/2,A.y=E.clientHeight/2;const L=D(A);if($(L)){const B=N.distance(_.position,L);let F=.0618*P*.2;F=B>300?F:2*F;const q=B*F,Z=new N;N.subtract(L,_.position,Z);const H=N.clone(_.right),V=N.dot(Z,H),j=new N;N.multiplyByScalar(H,V,j),N.subtract(Z,j,Z),N.normalize(Z,Z),_.move(Z,q);const G=new N;N.normalize(L,G);const J=_.pickEllipsoid(A,C.scene.globe.ellipsoid);if(Ii(J)&&$(J)&&!isNaN(J.x)&&!isNaN(J.y)&&!isNaN(J.z)&&!(_.positionCartographic.height<0)){N.normalize(J,J);const U=N.angleBetween(G,J);if(!f.equalsEpsilon(U,0,f.EPSILON10)){const z=N.cross(G,J,new N);_.rotate(z,U),Pe(i,"zoomEvt")&&t("zoomEvt",{type:P===1?"zoomIn":"zoomOut",camera:C.camera,status:"end"})}}}},D=P=>{const{defined:k,Cartesian3:N}=Cesium,{viewer:$}=n,m=$.scene,f=m.globe,C=m.camera;if(k(f)){let T;m.pickPositionSupported&&(T=m.pickPositionWorldCoordinates(P));const _=C.getPickRay(P),E=f.pick(_,m),A=k(T)?N.distance(T,C.positionWC):Number.POSITIVE_INFINITY;return(Ii(E)&&k(E)?N.distance(E,C.positionWC):Number.POSITIVE_INFINITY)>A?T:E}};return{handleZoomInMouseDown:w,handleZoomOutMouseDown:O,handleZoomBarScrollMouseDown:I,load:P=>(g=P,l=new Cesium.ScreenSpaceEventHandler(P),!0),unload:()=>(document.removeEventListener("mousemove",b,!1),document.removeEventListener("touchmove",b,!1),document.removeEventListener("mouseup",y,!1),document.removeEventListener("touchend",y,!1),d==null||d(),v==null||v(),M==null||M(),l==null||l.destroy(),!0),zoombarTop:o,zoomInTooltipRef:s,zoomOutTooltipRef:a,zoomBarTooltipRef:r,onTooltipBeforeShow:P=>{(b!==void 0||c!==void 0||h!==void 0)&&(P.cancel=!0)}}}const jm={...vn,autoHidden:{type:Boolean,default:!1},tooltip:{type:Object,default:()=>({delay:1e3,anchor:"bottom middle",offset:[0,20],zoomInTip:void 0,zoomOutTip:void 0,zoomBarTip:void 0})}},U5={...Ce,zoomEvt:e=>!0};var pc=K({name:"VcZoomControlSm",props:jm,emits:U5,setup(e,t){var i;const n=oe();n.cesiumClass="VcZoomControlSm",n.cesiumEvents=[];const o=ee(),s=ee(),a=ee(),r=ee(),l=((i=Pt(n).proxy)==null?void 0:i.$options.name)==="VcNavigationSm",c=ee(l),u=Ee({}),d=Ne(e,t,n);if(d===void 0)return;const{t:h}=Ct(),{$services:p}=d,v=vi(e),b=G5(e,t,n,p);de(()=>e,M=>{Be(()=>{n.mounted&&x()})},{deep:!0});const y=ae(()=>({top:b.zoombarTop.value+"px"}));n.createCesiumObject=async()=>new Promise((M,g)=>{c.value=!0,Be(()=>{const w=fe(o),{viewer:O}=p;if(l)M(w);else{const I=O._element;Ii(w)&&(I==null||I.appendChild(w)),M(w)}})}),n.mount=async()=>{var M;x();const{viewer:g}=p;return(M=g.viewerWidgetResized)==null||M.raiseEvent({type:n.cesiumClass,status:"mounted",target:fe(o)}),b.load(fe(o))},n.unmount=async()=>{var M;const{viewer:g}=p;if(!l){const w=g._element,O=fe(o);Ii(O)&&w!=null&&w.contains(O)&&w.removeChild(O)}return(M=g.viewerWidgetResized)==null||M.raiseEvent({type:n.cesiumClass,status:"unmounted",target:fe(o)}),b.unload()};const x=()=>{const M=v.style.value;if(u.left=M.left,u.top=M.top,u.transform=M.transform,u.visibility=e.autoHidden?"hidden":"visible",!l){const g=v.attach.value;(g.bottom||g.top)&&!g.left&&!g.right&&(M.left="50%",M.transform="translate(-50%, 0)"),(g.left||g.right)&&!g.top&&!g.bottom&&(M.top="50%",M.transform="translate(0, -50%)")}Object.assign(u,M)};return()=>{if(c.value){let M=[];return M=Ei(t.slots.default,M),M.push(S("div",{ref:s,class:"vc-zoomin-sm",onMousedown:b.handleZoomInMouseDown,onTouchstart:b.handleZoomInMouseDown},e.tooltip?S(At,{ref:b.zoomInTooltipRef,...e.tooltip,onBeforeShow:b.onTooltipBeforeShow},()=>S("strong",{},e.tooltip.zoomInTip||h("vc.navigationSm.zoomCotrol.zoomInTip"))):ie("v-if"))),M.push(S("div",{ref:r,class:"vc-zoomout-sm",onMousedown:b.handleZoomOutMouseDown,onTouchstart:b.handleZoomOutMouseDown},e.tooltip?S(At,{ref:b.zoomInTooltipRef,...e.tooltip,onBeforeShow:b.onTooltipBeforeShow},()=>S("strong",{},e.tooltip.zoomOutTip||h("vc.navigationSm.zoomCotrol.zoomOutTip"))):ie("v-if"))),M.push(S("div",{ref:a,class:"vc-zoombar-sm",style:y.value,onMousedown:b.handleZoomBarScrollMouseDown,onTouchstart:b.handleZoomBarScrollMouseDown},e.tooltip?S(At,{ref:b.zoomInTooltipRef,...e.tooltip,onBeforeShow:b.onTooltipBeforeShow},()=>S("strong",{},e.tooltip.zoomBarTip||h("vc.navigationSm.zoomCotrol.zoomBarTip"))):ie("v-if"))),S("div",{ref:o,class:"vc-zoom-control-sm "+v.classes.value,style:u},M)}else return ie("v-if")}}});const Fm={enableCompassOuterRing:!0,duration:1.5,autoHidden:!0,tooltip:{delay:1e3,anchor:"bottom middle",offset:[0,20],tip:void 0}},km={autoHidden:!0,tooltip:{delay:1e3,anchor:"bottom middle",offset:[0,20],tip:void 0}},Rm={...vn,compassOpts:{type:[Boolean,Object],default:()=>Fm},zoomOpts:{type:[Boolean,Object],default:()=>km}},H5={...Ce,zoomEvt:e=>!0,compassEvt:e=>!0};var $m=K({name:"VcNavigationSm",inheritAttrs:!1,props:Rm,emits:H5,setup(e,t){const i=oe();i.cesiumClass="VcNavigationSm";const n=Ne(e,t,i);if(n===void 0)return;const o=ee(!1),{$services:s}=n,a=vi(e),r=ee(null),l=ee(null),c=ee(null),u=Ee({}),{emit:d}=t;de(()=>e,()=>{Be(()=>{var M,g;x(),(M=fe(l))==null||M.reload(),(g=fe(c))==null||g.reload()})},{deep:!0});const h=ae(()=>Object.assign({},Fm,e.compassOpts)),p=ae(()=>Object.assign({},km,e.zoomOpts)),v=M=>{Pe(i,"compassEvt")&&d("compassEvt",M)},b=M=>{Pe(i,"zoomEvt")&&d("zoomEvt",M)};i.createCesiumObject=async()=>{var M;o.value=!0;const{viewer:g}=s;return(M=g.viewerWidgetResized)==null||M.addEventListener(y),new Promise((w,O)=>{Be(()=>{g._element.appendChild(fe(r)),w(fe(r))})})},i.mount=async()=>{var M;x();const{viewer:g}=s;return(M=g.viewerWidgetResized)==null||M.raiseEvent({type:i.cesiumClass,status:"mounted",target:fe(r)}),!0},i.unmount=async()=>{var M,g;const{viewer:w}=s,O=w._element;return O.contains(fe(r))&&O.removeChild(fe(r)),(M=w.viewerWidgetResized)==null||M.removeEventListener(y),(g=w.viewerWidgetResized)==null||g.raiseEvent({type:i.cesiumClass,status:"unmounted",target:fe(r)}),!0};const y=()=>{Be(()=>{x()})},x=()=>{const M=a.style.value,g=a.attach.value;u.left=M.left,u.top=M.top,u.transform=M.transform,(g.bottom||g.top)&&!g.left&&!g.right&&(M.left="50%",M.transform="translate(-50%, 0)"),(g.left||g.right)&&!g.top&&!g.bottom&&(M.top="50%",M.transform="translate(0, -50%)"),Object.assign(u,M)};return()=>{if(o.value){let M=[];return M=Ei(t.slots.default,M),h.value&&e.compassOpts!==!1&&M.push(S(mc,{ref:l,onCompassEvt:v,...h.value})),p.value&&e.zoomOpts!==!1&&M.push(S(pc,{ref:c,onZoomEvt:b,...p.value})),S("div",{ref:r,class:"vc-navigation-sm "+a.classes.value,style:u},M)}else return ie("v-if")}}});const Nm={position:{type:String,default:"bottom-right",validator:e=>["top-right","top-left","bottom-right","bottom-left"].includes(e)},offset:{type:Array,validator:e=>e.length===2},width:{type:String,default:"150px"},height:{type:String,default:"150px"},border:{type:String,default:"solid 4px rgb(255, 255, 255)"},borderRadius:{type:String},toggleOpts:{type:Object},viewerOpts:{type:Object},centerRectColor:{type:[Object,Array,String],default:"#ff000080"},widthFactor:{type:Number,default:2},heightFactor:{type:Number,default:2},modelValue:{type:Boolean,default:!0}};var Vm=K({name:"VcOverviewMap",props:Nm,emits:{...Ce,"update:modelValue":e=>!0},setup(e,t){const i=oe();i.cesiumClass="VcOverviewMap",i.cesiumEvents=[];const n=Ne(e,t,i);if(n===void 0)return;const{t:o}=Ct(),{$services:s}=n,a=ee(null),r=ee(null),l=Ee({}),c=ee(null),u=ee(null),d=vi(e),h=ee(e.modelValue);let p=[],v,b;const y=ae(()=>Object.assign({},{color:"#fff",background:"#3f4854",icon:"vc-icons-overview-toggle",size:"15px",tooltip:{delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0}},e.toggleOpts)),x=ae(()=>Object.assign({},{removeCesiumScript:!1,showCredit:!1,sceneMode:2,containerId:"vc-overview-map"},e.viewerOpts));i.createCesiumObject=async()=>{const{viewer:D}=s;return D._element.appendChild(fe(a)),[fe(a),fe(u)]},i.mount=async()=>{w();const{viewer:D}=s;return D.clock.onTick.addEventListener(M),!0},i.unmount=async()=>{const{viewer:D}=s,P=D._element;return D.clock.onTick.removeEventListener(M),P.contains(fe(a))&&P.removeChild(fe(a)),!0};const M=()=>{if(v){const{viewer:D}=s,P=D.camera.computeViewRectangle(),{defined:k}=Cesium;if(!k(P))return;const N=P.expand(e.widthFactor,e.heightFactor);v.camera.flyTo({destination:N.clone(),orientation:{heading:D.camera.heading,pitch:D.camera.pitch,roll:D.camera.roll},duration:0});const{Cartesian3:$,SceneTransforms:m}=Cesium,f=$.fromRadians(P.west,P.north),C=$.fromRadians(P.east,P.north),T=$.fromRadians(P.west,P.south),_=$.fromRadians(P.east,P.south),E=v.scene,A=m.wgs84ToWindowCoordinates(E,f),L=m.wgs84ToWindowCoordinates(E,C),B=m.wgs84ToWindowCoordinates(E,T),F=m.wgs84ToWindowCoordinates(E,_);if(!k(A)||!k(L)||!k(B)||!k(F))return;const q=L.x-A.x,Z=B.y-A.y,H=(A.x+L.x)/2-q/2,V=(A.y+B.y)/2-Z/2;if(q<=0||Z<=0)return;const j=new Cesium.BoundingRectangle(H,V,q,Z);b.rectangle=j,b.material.uniforms.color=Te(e.centerRectColor),b.show=!0}},g=D=>{const{viewer:P}=D;v=P;const k=P.scene.screenSpaceCameraController;k.enableRotate=!1,k.enableTranslate=!1,k.enableZoom=!1,k.enableTilt=!1,k.enableLook=!1,v.scene.highDynamicRange=!1,v.scene.globe.enableLighting=!1,v.scene.globe.showWaterEffect=!1,v.scene.globe.depthTestAgainstTerrain=!1,v.scene.skyAtmosphere.show=!1,v.scene.fog.enabled=!1,v.scene.skyBox.show=!1,v.scene.sun.show=!1,v.scene.moon.show=!1,v.scene.highDynamicRange=!1,v.scene.globe.showGroundAtmosphere=!1,b=new Cesium.ViewportQuad(new Cesium.BoundingRectangle(150,100,100,50)),b.show=!1,v.scene.primitives.add(b)},w=()=>{var D;const P=d.style.value;if(l.left=P.left,l.top=P.top,l.transform=P.transform,l["pointer-events"]="none",P.borderRadius=e.borderRadius,P.border=e.border,h.value)P.width=e.width,P.height=e.height;else{const k=/(\d+)/g.exec(e.border),N=k!=null&&k.length?parseFloat(k[0]):0,$=getComputedStyle((D=fe(r))==null?void 0:D.$el);P.width=`${parseFloat($.width)+parseFloat($.padding)+N}px`,P.height=`${parseFloat($.height)+parseFloat($.padding)+N}px`}Object.assign(l,P)},O=()=>{h.value?I():R(),h.value=!h.value,t.emit("update:modelValue",h.value)},I=()=>{var D;const P=/(\d+)/g.exec(e.border),k=P!=null&&P.length?parseFloat(P[0]):0,N=getComputedStyle((D=fe(r))==null?void 0:D.$el);l.width=`${parseFloat(N.width)+parseFloat(N.padding)+k}px`,l.height=`${parseFloat(N.height)+parseFloat(N.padding)+k}px`},R=()=>{l.width=e.width,l.height=e.height};return nt(()=>{p.forEach(D=>D()),p=[]}),()=>{const D=[];return D.push(S(ai,{ref:r,class:"toggle toggle-"+e.position+(h.value?"":" minimized "),flat:!0,dense:!0,icon:y.value.icon,size:y.value.size,style:{color:y.value.color,background:y.value.background,"pointer-events":"auto"},onClick:O},()=>y.value.tooltip?S(At,{ref:c,...y.value.tooltip},()=>S("strong",{},y.value.tooltip.tip||o(`vc.overview.${h.value?"hidden":"show"}`))):ie("v-if"))),D.push(S(Mh,{ref:u,...x.value,onReady:g},()=>Je(t.slots.default))),S("div",{ref:a,class:"vc-overview-map "+d.classes.value,style:l},D)}}});class Ki{constructor(t){this.id=t.id||Cesium.createGuid()}static getBoundingSphere(t,i){var n,o,s,a;const{Primitive:r,ClassificationPrimitive:l,GroundPolylinePrimitive:c,GroundPrimitive:u,Polyline:d}=Cesium;let h;return t instanceof l||t instanceof c?h=(o=(n=t._primitive)==null?void 0:n._boundingSphereWC)==null?void 0:o[0]:t instanceof r?h=(s=t._boundingSphereWC)==null?void 0:s[0]:t instanceof u?h=(a=t._boundingVolumes)==null?void 0:a[0]:t instanceof d?h=t._boundingVolumeWC:t instanceof Cesium.Entity&&(h=new Cesium.BoundingSphere,i.dataSourceDisplay.getBoundingSphere(t,!0,h)),h}static fromPickedFeature(t,i,n,o){var s,a,r,l,c;const u=new Ki({id:t.id});if(t.position)u.position=t.position;else if(t instanceof Cesium.Model)u.position=Cesium.Matrix4.getTranslation(t.modelMatrix,new Cesium.Cartesian3);else if(t instanceof Cesium.Cesium3DTileset){let d=i.content.tile.boundingSphere.center,h=(s=i==null?void 0:i.getProperty)==null?void 0:s.call(i,"position");Cesium.defined(h)&&(typeof h=="string"&&(h=JSON.parse(h)),d=tt(h)),u.position=d}else u.position=(a=Ki.getBoundingSphere(t,n))==null?void 0:a.center;return u.cesiumObject=t,u.pickedFeature=i,u.windowPosition=o,u.description=(t==null?void 0:t.description)||((r=t==null?void 0:t.description)==null?void 0:r.getValue()),u.properties=(t==null?void 0:t.properties)||((l=t==null?void 0:t.properties)==null?void 0:l.getValue())||((c=t==null?void 0:t.feature)==null?void 0:c.properties),u}static fromImageryLayerFeature(t,i){const n=new Ki({id:t.name});return n.name=t.name,n.description=t.description,n.properties=t.properties,n.data=t.data,n.imageryLayer=t.imageryLayer,n.position=i.scene.globe.ellipsoid.cartographicToCartesian(t.position),n.coords=t.coords,n}}class W5{constructor(){const{knockout:t}=Cesium;this.allFeaturesAvailablePromise=void 0,this.isLoading=!0,this.pickPosition=void 0,this.features=[],this.error=void 0,this.providerCoords=void 0,t.track(this,["isLoading","features","error"])}}function q5(e,t,i,n){const{defined:o,Rectangle:s,Math:a}=Cesium,r=e.globe._surface._tilesToRender;let l;for(let u=0;!o(l)&&u<r.length;++u){const d=r[u];s.contains(d.rectangle,t)&&(l=d)}if(!o(l))return;const c=l.data.imagery;for(let u=c.length-1;u>=0;--u){const d=c[u],h=d.readyImagery;if(!o(h))continue;const p=h.imageryLayer.imageryProvider;if(i&&!o(p.pickFeatures)||!s.contains(h.rectangle,t))continue;const v=new s,b=1/1024;v.west=a.lerp(l.rectangle.west,l.rectangle.east,d.textureCoordinateRectangle.x-b),v.east=a.lerp(l.rectangle.west,l.rectangle.east,d.textureCoordinateRectangle.z+b),v.south=a.lerp(l.rectangle.south,l.rectangle.north,d.textureCoordinateRectangle.y-b),v.north=a.lerp(l.rectangle.south,l.rectangle.north,d.textureCoordinateRectangle.w+b),s.contains(v,t)&&n(h)}}function Q5(e,t,i=[],n=[]){const{defined:o}=Cesium,s=t.globe.pick(e,t);if(!o(s))return;const a=t.globe.ellipsoid.cartesianToCartographic(s),r=[],l=[];if(q5(t,a,!0,function(c){if(n.indexOf(c.imageryLayer.vcId)!==-1||i.length&&i.indexOf(c.imageryLayer.vcId)===-1)return;const u=c.imageryLayer.imageryProvider.pickFeatures(c.x,c.y,c.level,a.longitude,a.latitude);o(u)&&(r.push(u),l.push(c.imageryLayer))}),r.length!==0)return Promise.all(r).then(function(c){const u=[];for(let d=0;d<c.length;++d){const h=c[d],p=l[d];if(o(h)&&h.length>0)for(let v=0;v<h.length;++v){const b=h[v];b.imageryLayer=p,o(b.position)||(b.position=a),u.push(b)}}return u})}function Z5(e,t,i){const n="-1000px",o=ee(n),s=ee(n),a="",r=1,l=ee(),c=ee();let u,d;const h=ee(null),p=ee(null);let v=[],b=!1;const y=Ee({top:s.value,left:o.value,transform:a,opacity:r});v.push(de(p,N=>{var $,m,f;const C=N,{defined:T}=Cesium;if(T(C)&&T(C==null?void 0:C.position)){const{viewer:_}=i;l.value=(C==null?void 0:C.position)instanceof Cesium.Cartesian3?C==null?void 0:C.position:($=C==null?void 0:C.position)==null?void 0:$.getValue(_.clock.currentTime),D(),(m=e.proxy)==null||m.$emit("pickEvt",C)}else P(),(f=e.proxy)==null||f.$emit("pickEvt",C);R()})),v.push(de(h,N=>{const{defined:$,Entity:m}=Cesium,f=N;if(!$(f))p.value=void 0;else{const C=new m({id:"__Vc__Pick__Location__"});C.position=f.pickPosition,p.value=C}Be(()=>{$(f.allFeaturesAvailablePromise)&&f.allFeaturesAvailablePromise.then(()=>{var C,T,_;const E=f.features.filter(A=>$(A));p.value=E.filter(x)[0],!$(p.value)&&E.length>0&&(p.value=E[0],b&&p.value instanceof Ki&&(_=(T=(C=p.value)==null?void 0:C.pickedFeature)==null?void 0:T.primitive)!=null&&_.position&&(p.value.position=p.value.pickedFeature.primitive.position))})})}));const x=N=>{const{defined:$}=Cesium;return $(N.properties)||$(N.description)},M=N=>{const{defined:$}=Cesium,{viewer:m}=i,f=m.scene,C=f.camera.getPickRay(N);let T=f.globe.pick(C,f);if(!$(T)&&(T=f.pickPosition(N),!$(T)))return;const _=f.globe.ellipsoid.cartesianToCartographic(T||new Cesium.Cartesian3),E=w(N),A=O(),L=t.allowFeatureInfoRequests?Q5(C,f,t.includeImageryIds,t.excludeImageryIds):Promise.resolve(),B=g(A,T,E,[L],void 0,_.height,!1,m);h.value=B},g=(N,$,m,f,C,T,_,E)=>{const{defined:A,defaultValue:L}=Cesium;_=L(_,!1);const B=new W5;return B.providerCoords=N,B.pickPosition=$,B.allFeaturesAvailablePromise=Promise.all(f).then(function(F){B.isLoading=!1,B.features=F.reduce(function(q,Z,H){if(!A(Z))return q;const V=Z.map(function(j){return A(C)&&(j.imageryLayer=C[H]),A(j.position)||(j.position=E.scene.globe.ellipsoid.cartesianToCartographic($)),(!A(j.position.height)||j.position.height===0)&&(j.position.height=T),Ki.fromImageryLayerFeature(j,E)}.bind(this));return q.concat(V)}.bind(this),L(m,[]))}).catch(function(){B.isLoading=!1,B.error="An unknown error occurred while picking features."}),B},w=N=>{var $,m;const f=[],{defined:C}=Cesium,{viewer:T}=i,_=T.scene.drillPick(N,t.limit);for(let E=0;E<_.length;++E){const A=_[E];let L=A.id;!C(L)&&C(A.primitive)&&(L=A.primitive);const B=(m=($=A==null?void 0:A.primitive)==null?void 0:$._catalogItem)!=null?m:L==null?void 0:L._catalogItem;if(typeof(B==null?void 0:B.getFeaturesFromPickResult)=="function"){const F=B.getFeaturesFromPickResult.bind(B)(N,A);F&&(Array.isArray(F)?f.push(...F):f.push(F))}else{const F=A;if(F.id)if(et(F.id)&&F.id[0]instanceof Cesium.Entity){b=!0,F.id.forEach(q=>{const Z=Ki.fromPickedFeature(q,F,T,N);f.push(Z)});continue}else if(F.id instanceof Cesium.Entity){const q=Ki.fromPickedFeature(F.id,F,T,N);f.push(q),b=!1;continue}else b=!1;if(F.primitive){const q=Ki.fromPickedFeature(F.primitive,F,T,N);f.push(q)}else if(F.collection){const q=Ki.fromPickedFeature(F.collection,F,T,N);f.push(q)}}}return f},O=()=>{const N={},{viewer:$}=i,m=$.scene,f=function(C,T,_,E,A,L,B){if(T){const F=T.call(C,_,E,A,L,B);return C.url&&(N[C.url]={x:_,y:E,level:A}),C.pickFeatures=T,F}return Promise.reject(!1)};for(let C=0;C<m.imageryLayers.length;C++){const T=m.imageryLayers.get(C).imageryProvider;T.pickFeatures=f.bind(void 0,T,T.pickFeatures)}return N},I=(N,$)=>{const{viewer:m}=i;return Cesium.SceneTransforms.wgs84ToWindowCoordinates(m.scene,N,$)},R=()=>{const{defined:N,Cartesian2:$}=Cesium;if(t.show&&N(l.value)){const m=I(l.value,new $);if(N(m)){const{viewer:f}=i,C=f.container,T=C.clientWidth,_=C.clientHeight,E=t.width,A=E*.5;m.x=Math.min(Math.max(m.x,-E),T+E)-A,m.y=Math.min(Math.max(m.y,-E),_+E)-A,y.left=Math.floor(m.x+.25)+"px",y.top=Math.floor(m.y+.25)+"px"}}},D=()=>{const{viewer:N}=i,{defined:$,EasingFunction:m}=Cesium;if($(u)){if(d)return;u.cancelTween(),u=void 0}d=!0,u=N.scene.tweens.add({startObject:{scale:2,opacity:0,rotate:-180},stopObject:{scale:1,opacity:1,rotate:0},duration:.8,easingFunction:m.EXPONENTIAL_OUT,update:function(f){y.opacity=f.opacity,y.transform="scale("+f.scale+") rotate("+f.rotate+"deg)"},complete:function(){u=void 0},cancel:function(){u=void 0}})},P=()=>{const{viewer:N}=i,{defined:$,EasingFunction:m}=Cesium;if($(u)){if(!d)return;u.cancelTween(),u=void 0}d=!1,u=N.scene.tweens.add({startObject:{scale:1,opacity:1},stopObject:{scale:1.5,opacity:0},duration:.8,easingFunction:m.EXPONENTIAL_OUT,update:function(f){y.opacity=f.opacity,y.transform="scale("+f.scale+") rotate(0deg)"},complete:function(){u=void 0},cancel:function(){u=void 0}})},k=()=>{R()};return nt(()=>{v.forEach(N=>N()),v=[]}),Object.assign(e.proxy,{selectedFeature:p,position:l,computeScreenSpacePosition:I,update:R,animateAppear:D,animateDepart:P,getPickedFeatures:()=>h}),{pickFromScreenPosition:M,rootRef:c,rootStyle:y,onPostRender:k}}const zm={show:{type:Boolean,default:!0},width:{type:Number,default:50},height:{type:Number,default:50},allowFeatureInfoRequests:{type:Boolean,default:!0},includeImageryIds:{type:Array,default:()=>[]},excludeImageryIds:{type:Array,default:()=>[]},limit:{type:Number,default:25}},J5={...Ce,pickEvt:e=>!0};var Gm=K({name:"VcSelectionIndicator",props:zm,emits:J5,setup(e,t){const i=oe();i.cesiumClass="VcSelectionIndicator",i.cesiumEvents=[];const n=Ne(e,t,i);if(n===void 0)return;const{$services:o}=n;let s;const a=Z5(i,e,o);return i.createCesiumObject=async()=>{const{viewer:r}=o;return r._element.appendChild(fe(a.rootRef)),fe(a.rootRef)},i.mount=async()=>{const{viewer:r}=o,{ScreenSpaceEventHandler:l,ScreenSpaceEventType:c}=Cesium;return s=new l(r.canvas),s.setInputAction(u=>{a.pickFromScreenPosition(u.position)},c.LEFT_CLICK),r.scene.postRender.addEventListener(a.onPostRender),!0},i.unmount=async()=>{const{viewer:r}=o,l=r._element;return l.contains(fe(a.rootRef))&&l.removeChild(fe(a.rootRef)),r.scene.postRender.removeEventListener(a.onPostRender),s.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK),s.destroy(),s=void 0,!0},()=>S("div",{ref:a.rootRef,class:"vc-selection-indicator",style:a.rootStyle},S("img",{src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxNzZweCIgaGVpZ2h0PSIxNzZweCIgdmlld0JveD0iMCAwIDE3NiAxNzYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPg0KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggMy4xLjEgKDg3NjEpIC0gaHR0cDovL3d3dy5ib2hlbWlhbmNvZGluZy5jb20vc2tldGNoIC0tPg0KICAgIDx0aXRsZT5Mb2NhdGlvblRhcmdldCArIFBhdGg8L3RpdGxlPg0KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPg0KICAgIDxkZWZzPg0KICAgICAgICA8ZmlsdGVyIHg9Ii01MCUiIHk9Ii01MCUiIHdpZHRoPSIyMDAlIiBoZWlnaHQ9IjIwMCUiIGZpbHRlclVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgaWQ9ImZpbHRlci0xIj4NCiAgICAgICAgICAgIDxmZU9mZnNldCBkeD0iMCIgZHk9IjAiIGluPSJTb3VyY2VBbHBoYSIgcmVzdWx0PSJzaGFkb3dPZmZzZXRPdXRlcjEiPjwvZmVPZmZzZXQ+DQogICAgICAgICAgICA8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIyIiBpbj0ic2hhZG93T2Zmc2V0T3V0ZXIxIiByZXN1bHQ9InNoYWRvd0JsdXJPdXRlcjEiPjwvZmVHYXVzc2lhbkJsdXI+DQogICAgICAgICAgICA8ZmVDb2xvck1hdHJpeCB2YWx1ZXM9IjAgMCAwIDAgMCAgIDAgMCAwIDAgMCAgIDAgMCAwIDAgMCAgMCAwIDAgMC41MjY0NDY0NDUgMCIgaW49InNoYWRvd0JsdXJPdXRlcjEiIHR5cGU9Im1hdHJpeCIgcmVzdWx0PSJzaGFkb3dNYXRyaXhPdXRlcjEiPjwvZmVDb2xvck1hdHJpeD4NCiAgICAgICAgICAgIDxmZU1lcmdlPg0KICAgICAgICAgICAgICAgIDxmZU1lcmdlTm9kZSBpbj0ic2hhZG93TWF0cml4T3V0ZXIxIj48L2ZlTWVyZ2VOb2RlPg0KICAgICAgICAgICAgICAgIDxmZU1lcmdlTm9kZSBpbj0iU291cmNlR3JhcGhpYyI+PC9mZU1lcmdlTm9kZT4NCiAgICAgICAgICAgIDwvZmVNZXJnZT4NCiAgICAgICAgPC9maWx0ZXI+DQogICAgICAgIDxmaWx0ZXIgeD0iLTUwJSIgeT0iLTUwJSIgd2lkdGg9IjIwMCUiIGhlaWdodD0iMjAwJSIgZmlsdGVyVW5pdHM9Im9iamVjdEJvdW5kaW5nQm94IiBpZD0iZmlsdGVyLTIiPg0KICAgICAgICAgICAgPGZlT2Zmc2V0IGR4PSIwIiBkeT0iMCIgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSI+PC9mZU9mZnNldD4NCiAgICAgICAgICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSI+PC9mZUdhdXNzaWFuQmx1cj4NCiAgICAgICAgICAgIDxmZUNvbG9yTWF0cml4IHZhbHVlcz0iMCAwIDAgMCAwICAgMCAwIDAgMCAwICAgMCAwIDAgMCAwICAwIDAgMCAwLjUyNjQ0NjQ0NSAwIiBpbj0ic2hhZG93Qmx1ck91dGVyMSIgdHlwZT0ibWF0cml4IiByZXN1bHQ9InNoYWRvd01hdHJpeE91dGVyMSI+PC9mZUNvbG9yTWF0cml4Pg0KICAgICAgICAgICAgPGZlTWVyZ2U+DQogICAgICAgICAgICAgICAgPGZlTWVyZ2VOb2RlIGluPSJzaGFkb3dNYXRyaXhPdXRlcjEiPjwvZmVNZXJnZU5vZGU+DQogICAgICAgICAgICAgICAgPGZlTWVyZ2VOb2RlIGluPSJTb3VyY2VHcmFwaGljIj48L2ZlTWVyZ2VOb2RlPg0KICAgICAgICAgICAgPC9mZU1lcmdlPg0KICAgICAgICA8L2ZpbHRlcj4NCiAgICA8L2RlZnM+DQogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+DQogICAgICAgIDxnIGlkPSJBcnRib2FyZC0xIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNjkxLjAwMDAwMCwgLTQ5OC4wMDAwMDApIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZT0iI0ZGRkZGRiI+DQogICAgICAgICAgICA8ZyBpZD0iTG9jYXRpb25UYXJnZXQtKy1QYXRoIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg2OTkuMDAwMDAwLCA1MDYuMDAwMDAwKSI+DQogICAgICAgICAgICAgICAgPHBhdGggZD0iTTgwLDE0NCBDMTE1LjM0NjIyNCwxNDQgMTQ0LDExNS4zNDYyMjQgMTQ0LDgwIEMxNDQsNDQuNjUzNzc2IDExNS4zNDYyMjQsMTYgODAsMTYgQzQ0LjY1Mzc3NiwxNiAxNiw0NC42NTM3NzYgMTYsODAgQzE2LDExNS4zNDYyMjQgNDQuNjUzNzc2LDE0NCA4MCwxNDQgWiBNMTYwLDgwIEwxNDQsODAgTTE2LDgwIEwwLDgwIE03OS42LC0wLjQgTDc5LjYsMTUuNiBNNzguOCwxNDQgTDc4LjgsMTYwIiBpZD0iTG9jYXRpb25UYXJnZXQiIHN0cm9rZS13aWR0aD0iNyIgZmlsdGVyPSJ1cmwoI2ZpbHRlci0xKSI+PC9wYXRoPg0KICAgICAgICAgICAgICAgIDxjaXJjbGUgaWQ9IlBhdGgiIHN0cm9rZS13aWR0aD0iMiIgb3BhY2l0eT0iMC4yNTIyMTU0ODUiIGZpbHRlcj0idXJsKCNmaWx0ZXItMikiIGN4PSI4MCIgY3k9IjgwIiByPSI2Ij48L2NpcmNsZT4NCiAgICAgICAgICAgIDwvZz4NCiAgICAgICAgPC9nPg0KICAgIDwvZz4NCjwvc3ZnPg==",width:e.width,height:e.height}))}});const X5=[Ul,ql,Ql,Jl,cc,uc,Bm,mc,pc,$m,Vm,Gm];X5.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Um=Ul,Hm=ql,Wm=Ql,qm=Jl,Qm=cc,Zm=uc,Jm=Bm,Xm=mc,Ym=pc,Km=$m,ep=Vm,tp=Gm,gt={externalLabel:!1,label:"",labelPosition:"right",hideLabel:!1,tabindex:void 0,disable:!1,outline:!1,push:!1,flat:!1,unelevated:!1,color:"primary",textColor:void 0,glossy:!1,labelClass:void 0,labelStyle:void 0,square:!1,tooltip:{delay:500,anchor:"bottom middle",offset:[0,20],tip:void 0}},Un={show:!0,enableMouseEvent:!0,asynchronous:!1,classificationType:2,appearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"Color",uniforms:{color:"#51ff00"}}}}},depthFailAppearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"PolylineDash",uniforms:{color:[255,0,0,127]}}}}}},Cn={show:!0,color:"rgb(255,229,0)",pixelSize:8,outlineColor:"black",outlineWidth:1,disableDepthTestDistance:Number.POSITIVE_INFINITY},Y5={show:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY,verticalOrigin:1,image:""},go={width:2,arcType:0,ellipsoid:void 0},K5={show:!0,enableMouseEvent:!0,asynchronous:!1,classificationType:2,appearance:{type:"MaterialAppearance",options:{material:{fabric:{type:"Color",uniforms:{color:[255,165,0,125]}}},faceForward:!0,renderState:{cull:{enabled:!1},depthTest:{enabled:!1}}}}},yt={show:!0,font:"16px Arial Microsoft YaHei sans-serif",scale:1,fillColor:"white",showBackground:!0,backgroundColor:{x:.165,y:.165,z:.165,w:.8},backgroundPadding:[7,5],horizontalOrigin:0,verticalOrigin:1,pixelOffset:[0,-9],disableDepthTestDistance:Number.POSITIVE_INFINITY},Mt={icon:"vc-icons-move",size:"24px",color:"#1296db",background:"#fff",round:!0,flat:!1,label:void 0,stack:!1,dense:!0,tooltip:{delay:1e3,anchor:"bottom middle",offset:[0,20]}},Os={show:!0,drawtip:{show:!0,pixelOffset:[32,32]},pointOpts:Cn,editorOpts:{delay:1e3,hideDelay:1e3,pixelOffset:[16,-8],move:Object.assign({},Mt),remove:Object.assign({},Mt,{icon:"vc-icons-remove"})},heightReference:1,disableDepthTest:!1,showLabel:!1,labelOpts:Object.assign({},yt,{horizontalOrigin:1,verticalOrigin:0,pixelOffset:[10,0]})},vc={show:!0,showComponentLines:!1,drawtip:{show:!0,pixelOffset:[32,32]},pointOpts:Cn,polylineOpts:go,primitiveOpts:Un,editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},Mt),removeAll:Object.assign({},Mt,{icon:"vc-icons-delete"})},disableDepthTest:!1},ip={show:!0,drawtip:{show:!0,pixelOffset:[32,32]},pointOpts:Cn,polylineOpts:go,primitiveOpts:Un,editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},Mt),insert:Object.assign({},Mt,{icon:"vc-icons-insert"}),remove:Object.assign({},Mt,{icon:"vc-icons-remove"}),removeAll:Object.assign({},Mt,{icon:"vc-icons-delete"})},loop:!1,disableDepthTest:!1,showLabel:!1,showAngleLabel:!1,showDistanceLabel:!1,labelOpts:yt,labelsOpts:Object.assign({},yt,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]})},Ps={show:!0,drawtip:{show:!0,pixelOffset:[32,32]},pointOpts:Cn,polylineOpts:go,primitiveOpts:Object.assign({},Un,{depthFailAppearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"Color",uniforms:{color:"#51ff00"}}}}}}),polygonOpts:K5,editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},Mt),insert:Object.assign({},Mt,{icon:"vc-icons-insert"}),remove:Object.assign({},Mt,{icon:"vc-icons-remove"}),removeAll:Object.assign({},Mt,{icon:"vc-icons-delete"})},loop:!0,disableDepthTest:!1,showDistanceLabel:!1,showLabel:!1,showAngleLabel:!1,labelOpts:yt,labelsOpts:Object.assign({},yt,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]})},fc=Object.assign({},Ps,{pointOpts:Object.assign({},Cn,{show:!1}),editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},Mt),removeAll:Object.assign({},Mt,{icon:"vc-icons-delete"})},edge:4,loop:!1,disableDepthTest:!1,showLabel:!1,showAngleLabel:!1,showDistanceLabel:!1,labelOpts:yt,labelsOpts:Object.assign({},yt,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]})}),eM=Object.assign({},fc,{edge:360}),tM=Object.assign({},fc,{edge:6,loop:!0}),iM=Object.assign({},gt,{icon:"vc-icons-clear",color:"red"}),np=Object.assign({},gt,{icon:"vc-icons-drawing-regular"}),op=Object.assign({},gt,{icon:"vc-icons-drawing-circle"}),Ut={...Qe,show:Boolean,editable:Boolean,drawtip:Object,pointOpts:Object,editorOpts:Object,mode:Number,preRenderDatas:Array,disableDepthTest:Boolean},gc={...Ie,position:{type:String,default:"bottom-left",validator:e=>["top-right","top-left","bottom-right","bottom-left","top","right","bottom","left"].includes(e)},offset:{type:Array,validator:e=>e.length===2},mode:{type:Number,default:1},activeColor:{type:String,default:"positive"},editable:{type:Boolean},clampToGround:{type:Boolean},clearActionOpts:{type:Object,default:()=>iM}},nM=Object.assign({},gt,{icon:"vc-icons-measure-distance"}),ap=Object.assign({},vc,{labelOpts:Object.assign({},yt,{horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[10,10]}),measureUnits:new mt,decimals:{distance:2,angle:2},locale:void 0,autoUpdateLabelPosition:!0}),oM=Object.assign({},gt,{icon:"vc-icons-measure-component-distance"}),aM=Object.assign({},ap,{showComponentLines:!0,xLabelOpts:yt,xAngleLabelOpts:Object.assign({},yt,{horizontalOrigin:1,verticalOrigin:0,pixelOffset:[9,0]}),yLabelOpts:Object.assign({},yt,{horizontalOrigin:-1,pixelOffset:[-9,0]}),yAngleLabelOpts:Object.assign({},yt,{verticalOrigin:-1,pixelOffset:[0,9]})}),sM=Object.assign({},gt,{icon:"vc-icons-measure-polyline-distance"}),sp=Object.assign({},ip,{measureUnits:new mt,labelOpts:yt,labelsOpts:Object.assign({},yt,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]}),decimals:{distance:2,angle:2},showLabel:!0,showAngleLabel:!0,showDistanceLabel:!0,locale:void 0,loop:!1,autoUpdateLabelPosition:!0}),rM=Object.assign({},gt,{icon:"vc-icons-measure-horizontal-distance"}),lM=Object.assign({},sp,{dashLineOpts:{width:2},dashLinePrimitiveOpts:Object.assign({},Un,{appearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"PolylineDash",uniforms:{color:[255,255,0,255]}}}}},depthFailAppearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"PolylineDash",uniforms:{color:[255,255,0,255]}}}}}}),labelOpts:Object.assign({},yt,{horizontalOrigin:1,verticalOrigin:1,pixelOffset:[10,-10]}),labelsOpts:Object.assign({},yt,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]}),showDashedLine:!0}),cM=Object.assign({},gt,{icon:"vc-icons-measure-vertical-distance"}),uM=Object.assign({},vc,{labelOpts:Object.assign({},yt,{horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[10,10]}),measureUnits:new mt,decimals:{distance:2,angle:2},locale:void 0,autoUpdateLabelPosition:!0}),dM=Object.assign({},gt,{icon:"vc-icons-measure-height-from-terrain"}),hM=Object.assign({},Os,{polylineOpts:go,labelOpts:Object.assign({},yt,{horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[10,10]}),editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},Mt),removeAll:Object.assign({},Mt,{icon:"vc-icons-delete"})},measureUnits:new mt,decimals:{distance:2},locale:void 0,primitiveOpts:Un}),mM=Object.assign({},gt,{icon:"vc-icons-measure-area"}),rp=Object.assign({},Ps,{labelOpts:yt,labelsOpts:Object.assign({},yt,{scale:.8,horizontalOrigin:1,verticalOrigin:-1,pixelOffset:[5,5]}),showDistanceLabel:!0,showAngleLabel:!0,showLabel:!0,measureUnits:new mt,decimals:{area:2,distance:2,angle:2},loop:!0,locale:void 0,autoUpdateLabelPosition:!0}),pM=Object.assign({},gt,{icon:"vc-icons-measure-point-coordinates"}),vM=Object.assign({},Os,{heightReference:1,measureUnits:new mt,drawtip:{show:!0,pixelOffset:[32,48]},labelOpts:Object.assign({},yt,{horizontalOrigin:1,verticalOrigin:0,pixelOffset:[10,0]}),decimals:{lng:6,lat:6,height:2,slope:3},locale:void 0,showLabel:!0}),fM=Object.assign({},gt,{icon:"vc-icons-drawing-rectangle"}),yc=Object.assign({},rp,{pointOpts:Object.assign({},Cn,{show:!1}),drawtip:{show:!0,pixelOffset:[32,32]},editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},Mt),removeAll:Object.assign({},Mt,{icon:"vc-icons-delete"})},edge:4,loop:!1,showAngleLabel:!1}),gM=Object.assign({},yc,{edge:6,loop:!0}),yM=Object.assign({},yc,{edge:360,loop:!0,showDistanceLabel:!1,showAngleLabel:!1}),bM=Object.assign({},{}),CM=Object.assign({},gt,{direction:"right",icon:"vc-icons-measurement-button",activeIcon:"vc-icons-measurement-button",verticalActionsAlign:"center",hideIcon:!1,persistent:!1,modelValue:!0,hideActionOnClick:!1,color:"info"}),lp=["distance","component-distance","polyline","horizontal","vertical","height","area","point","rectangle","regular","circle"],wM=e=>{let t=!0;return e.forEach(i=>{lp.includes(i)||(console.error(`VueCesium: unknown measurement type: ${i}`),t=!1)}),t},bc={...gc,measurements:{type:Array,default:()=>lp,validator:wM},mainFabOpts:{type:Object,default:()=>CM},fabActionOpts:{type:Object,default:()=>bM},distanceActionOpts:{type:Object,default:()=>nM},distanceMeasurementOpts:{type:Object,default:()=>ap},componentDistanceActionOpts:{type:Object,default:()=>oM},componentDistanceMeasurementOpts:{type:Object,default:()=>aM},polylineActionOpts:{type:Object,default:()=>sM},polylineMeasurementOpts:{type:Object,default:()=>sp},horizontalActionOpts:{type:Object,default:()=>rM},horizontalMeasurementOpts:{type:Object,default:()=>lM},verticalActionOpts:{type:Object,default:()=>cM},verticalMeasurementOpts:{type:Object,default:()=>uM},heightActionOpts:{type:Object,default:()=>dM},heightMeasurementOpts:{type:Object,default:()=>hM},areaActionOpts:{type:Object,default:()=>mM},areaMeasurementOpts:{type:Object,default:()=>rp},pointActionOpts:{type:Object,default:()=>pM},pointMeasurementOpts:{type:Object,default:()=>vM},rectangleActionOpts:{type:Object,default:()=>fM},rectangleMeasurementOpts:{type:Object,default:()=>yc},regularActionOpts:{type:Object,default:()=>np},regularMeasurementOpts:{type:Object,default:()=>gM},circleActionOpts:{type:Object,default:()=>op},circleMeasurementOpts:{type:Object,default:()=>yM}},it=bi(bc),cp={...Sn,...Zn,...Ie,autoHidden:{type:Boolean,default:!0},customClass:String,teleport:Object},_M={...Ce,mouseenter:e=>!0,mouseleave:e=>!0,click:e=>!0};var Cc=K({name:"VcOverlayHtml",props:cp,emits:_M,setup(e,t){const i=oe();i.cesiumClass="VcOverlayHtml",i.cesiumEvents=[];const n=Ne(e,t,i);if(n===void 0)return;const{$services:o}=n,s=ee(!1),a=ee(null),r=Ee({}),l=ee(null),c=ee(null),u=ee(null);let d=[];d.push(de(()=>e.position,O=>{c.value=tt(O,o.viewer.scene.globe.ellipsoid)})),d.push(de(()=>e.pixelOffset,O=>{l.value=ht(O)})),d.push(de(()=>e.show,O=>{r.display=O?"block":"none"})),i.createCesiumObject=async()=>fe(a),i.mount=async()=>{const{viewer:O}=o;return s.value=!0,M(),l.value=ht(e.pixelOffset),c.value=tt(e.position,O.scene.globe.ellipsoid),O.scene.preRender.addEventListener(h),!0},i.unmount=async()=>{const{viewer:O}=o;return O.scene.preRender.removeEventListener(h),s.value=!1,g(),!0};const h=()=>{const{viewer:O}=o;if(c.value){const I=O.scene.cartesianToCanvasCoordinates(c.value,{});if(Cesium.defined(I)&&!Cesium.Cartesian2.equals(u.value,I))if(r.left=I.x+l.value.x+"px",r.top=I.y+l.value.y+"px",e.autoHidden&&O.scene.mode!==Cesium.SceneMode.SCENE2D&&O.scene.mode!==Cesium.SceneMode.MORPHING){const R=O.camera.position,D=O.scene.globe.ellipsoid.cartesianToCartographic(R);if(Cesium.defined(D)){let P=D.height;P+=1*O.scene.globe.ellipsoid.maximumRadius,Cesium.Cartesian3.distance(R,c.value)>P||!e.show?r.display="none":r.display="block"}}else r.display="block";else Cesium.defined(I)||(r.display="none");u.value=I}};nt(()=>{d.forEach(O=>O()),d=[]});const p=()=>s.value?S("div",{ref:a,class:`vc-html-container${e.customClass?" "+e.customClass:""}`,style:r,onMouseenter:b,onMouseleave:y,onClick:v},Je(t.slots.default)):ie("v-if"),v=O=>{t.emit("click",O)},b=O=>{t.emit("mouseenter",O)},y=O=>{t.emit("mouseleave",O)},x=()=>p(),{showPortal:M,hidePortal:g,renderPortal:w}=Ud(i,a,x);return e.teleport&&e.teleport.to&&!e.teleport.disabled?w:()=>p()}}),wc={exports:{}};wc.exports,function(e){(function(t,i,n){e.exports?e.exports=n():i[t]=n()})("h337",fn,function(){var t={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},i=function(){var c=function(h){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=h.xField||h.defaultXField,this._yField=h.yField||h.defaultYField,this._valueField=h.valueField||h.defaultValueField,h.radius&&(this._cfgRadius=h.radius)},u=t.defaultRadius;return c.prototype={_organiseData:function(d,h){var p=d[this._xField],v=d[this._yField],b=this._radi,y=this._data,x=this._max,M=this._min,g=d[this._valueField]||1,w=d.radius||this._cfgRadius||u;y[p]||(y[p]=[],b[p]=[]),y[p][v]?y[p][v]+=g:(y[p][v]=g,b[p][v]=w);var O=y[p][v];return O>x?(h?this.setDataMax(O):this._max=O,!1):O<M?(h?this.setDataMin(O):this._min=O,!1):{x:p,y:v,value:g,radius:w,min:M,max:x}},_unOrganizeData:function(){var d=[],h=this._data,p=this._radi;for(var v in h)for(var b in h[v])d.push({x:v,y:b,radius:p[v][b],value:h[v][b]});return{min:this._min,max:this._max,data:d}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var d=arguments[0],h=d.length;h--;)this.addData.call(this,d[h]);else{var p=this._organiseData(arguments[0],!0);p&&(this._data.length===0&&(this._min=this._max=p.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[p]}))}return this},setData:function(d){var h=d.data,p=h.length;this._data=[],this._radi=[];for(var v=0;v<p;v++)this._organiseData(h[v],!1);return this._max=d.max,this._min=d.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(d){return this._max=d,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(d){return this._min=d,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(d){this._coordinator=d},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},c}(),n=function(){var c=function(p){var v=p.gradient||p.defaultGradient,b=document.createElement("canvas"),y=b.getContext("2d");b.width=256,b.height=1;var x=y.createLinearGradient(0,0,256,1);for(var M in v)x.addColorStop(M,v[M]);return y.fillStyle=x,y.fillRect(0,0,256,1),y.getImageData(0,0,256,1).data},u=function(p,v){var b=document.createElement("canvas"),y=b.getContext("2d"),x=p,M=p;if(b.width=b.height=p*2,v==1)y.beginPath(),y.arc(x,M,p,0,2*Math.PI,!1),y.fillStyle="rgba(0,0,0,1)",y.fill();else{var g=y.createRadialGradient(x,M,p*v,x,M,p);g.addColorStop(0,"rgba(0,0,0,1)"),g.addColorStop(1,"rgba(0,0,0,0)"),y.fillStyle=g,y.fillRect(0,0,2*p,2*p)}return b},d=function(M){for(var v=[],b=M.min,y=M.max,x=M.radi,M=M.data,g=Object.keys(M),w=g.length;w--;)for(var O=g[w],I=Object.keys(M[O]),R=I.length;R--;){var D=I[R],P=M[O][D],k=x[O][D];v.push({x:O,y:D,value:P,radius:k})}return{min:b,max:y,data:v}};function h(p){var v=p.container,b=this.shadowCanvas=document.createElement("canvas"),y=this.canvas=p.canvas||document.createElement("canvas");this._renderBoundaries=[1e4,1e4,0,0];var x=getComputedStyle(p.container)||{};y.className="heatmap-canvas",this._width=y.width=b.width=p.width||+x.width.replace(/px/,""),this._height=y.height=b.height=p.height||+x.height.replace(/px/,""),this.shadowCtx=b.getContext("2d"),this.ctx=y.getContext("2d"),y.style.cssText=b.style.cssText="position:absolute;left:0;top:0;",v.style.position="relative",v.appendChild(y),this._palette=c(p),this._templates={},this._setStyles(p)}return h.prototype={renderPartial:function(p){p.data.length>0&&(this._drawAlpha(p),this._colorize())},renderAll:function(p){this._clear(),p.data.length>0&&(this._drawAlpha(d(p)),this._colorize())},_updateGradient:function(p){this._palette=c(p)},updateConfig:function(p){p.gradient&&this._updateGradient(p),this._setStyles(p)},setDimensions:function(p,v){this._width=p,this._height=v,this.canvas.width=this.shadowCanvas.width=p,this.canvas.height=this.shadowCanvas.height=v},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(p){this._blur=p.blur==0?0:p.blur||p.defaultBlur,p.backgroundColor&&(this.canvas.style.backgroundColor=p.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=p.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=p.height||this._height,this._opacity=(p.opacity||0)*255,this._maxOpacity=(p.maxOpacity||p.defaultMaxOpacity)*255,this._minOpacity=(p.minOpacity||p.defaultMinOpacity)*255,this._useGradientOpacity=!!p.useGradientOpacity},_drawAlpha:function(y){for(var v=this._min=y.min,b=this._max=y.max,y=y.data||[],x=y.length,M=1-this._blur;x--;){var g=y[x],w=g.x,O=g.y,I=g.radius,R=Math.min(g.value,b),D=w-I,P=O-I,k=this.shadowCtx,N;this._templates[I]?N=this._templates[I]:this._templates[I]=N=u(I,M);var $=(R-v)/(b-v);k.globalAlpha=$<.01?.01:$,k.drawImage(N,D,P),D<this._renderBoundaries[0]&&(this._renderBoundaries[0]=D),P<this._renderBoundaries[1]&&(this._renderBoundaries[1]=P),D+2*I>this._renderBoundaries[2]&&(this._renderBoundaries[2]=D+2*I),P+2*I>this._renderBoundaries[3]&&(this._renderBoundaries[3]=P+2*I)}},_colorize:function(){var p=this._renderBoundaries[0],v=this._renderBoundaries[1],b=this._renderBoundaries[2]-p,y=this._renderBoundaries[3]-v,x=this._width,M=this._height,g=this._opacity,w=this._maxOpacity,O=this._minOpacity,I=this._useGradientOpacity;p<0&&(p=0),v<0&&(v=0),p+b>x&&(b=x-p),v+y>M&&(y=M-v);for(var R=this.shadowCtx.getImageData(p,v,b,y),D=R.data,P=D.length,k=this._palette,N=3;N<P;N+=4){var $=D[N],m=$*4;if(m){var f;g>0?f=g:$<w?$<O?f=O:f=$:f=w,D[N-3]=k[m],D[N-2]=k[m+1],D[N-1]=k[m+2],D[N]=I?k[m+3]:f}}this.ctx.putImageData(R,p,v),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(p){var v,b=this.shadowCtx,y=b.getImageData(p.x,p.y,1,1),x=y.data[3],M=this._max,g=this._min;return v=Math.abs(M-g)*(x/255)>>0,v},getDataURL:function(){return this.canvas.toDataURL()}},h}(),o=function(){var c=!1;return t.defaultRenderer==="canvas2d"&&(c=n),c}(),s={merge:function(){for(var l={},c=arguments.length,u=0;u<c;u++){var d=arguments[u];for(var h in d)l[h]=d[h]}return l}},a=function(){var c=function(){function p(){this.cStore={}}return p.prototype={on:function(v,b,y){var x=this.cStore;x[v]||(x[v]=[]),x[v].push(function(M){return b.call(y,M)})},emit:function(v,b){var y=this.cStore;if(y[v])for(var x=y[v].length,M=0;M<x;M++){var g=y[v][M];g(b)}}},p}(),u=function(h){var p=h._renderer,v=h._coordinator,b=h._store;v.on("renderpartial",p.renderPartial,p),v.on("renderall",p.renderAll,p),v.on("extremachange",function(y){h._config.onExtremaChange&&h._config.onExtremaChange({min:y.min,max:y.max,gradient:h._config.gradient||h._config.defaultGradient})}),b.setCoordinator(v)};function d(){var h=this._config=s.merge(t,arguments[0]||{});if(this._coordinator=new c,h.plugin){var p=h.plugin;if(t.plugins[p]){var v=t.plugins[p];this._renderer=new v.renderer(h),this._store=new v.store(h)}else throw new Error("Plugin '"+p+"' not found. Maybe it was not registered.")}else this._renderer=new o(h),this._store=new i(h);u(this)}return d.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(h){return this._config=s.merge(this._config,h),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(h){return this._store.getValueAt?this._store.getValueAt(h):this._renderer.getValueAt?this._renderer.getValueAt(h):null}},d}(),r={create:function(l){return new a(l)},register:function(l,c){t.plugins[l]=c}};return r})}(wc);var xM=wc.exports,EM=Zl(xM);const up={id:String,name:String,availability:Object,...Ie,description:[String,Object],...Sn,orientation:Object,...xu,parent:Object,billboard:Object,box:Object,corridor:Object,cylinder:Object,ellipse:Object,ellipsoid:Object,label:Object,model:Object,tileset:Object,path:Object,plane:Object,point:Object,polygon:Object,polyline:Object,properties:Object,polylineVolume:Object,rectangle:Object,wall:Object,...Qe},MM={...Ce,...Jo,definitionChanged:e=>!0,"update:billboard":e=>!0,"update:box":e=>!0,"update:corridor":e=>!0,"update:cylinder":e=>!0,"update:ellipse":e=>!0,"update:ellipsoid":e=>!0,"update:label":e=>!0,"update:model":e=>!0,"update:path":e=>!0,"update:plane":e=>!0,"update:point":e=>!0,"update:polygon":e=>!0,"update:polyline":e=>!0,"update:polylineVolume":e=>!0,"update:rectangle":e=>!0,"update:tileset":e=>!0,"update:wall":e=>!0};var Ss=K({name:"VcEntity",props:up,emits:MM,setup(e,t){const i=oe();i.cesiumClass="Entity",i.cesiumEvents=["definitionChanged"];const n=Ne(e,t,i);if(n===void 0)return;const{$services:o}=n,{emit:s}=t;i.mount=async()=>{var r;const l=(r=o==null?void 0:o.entities)==null?void 0:r.add(i.cesiumObject);return o==null?void 0:o.entities.contains(l)},i.unmount=async()=>{var r;return(r=o==null?void 0:o.entities)==null?void 0:r.remove(i.cesiumObject)};const a=(r,l)=>(Pe(i,l)?s(l,r):i.cesiumObject&&(i.cesiumObject[l.substring(7)]=r),r&&(r._vcParent=i.cesiumObject),!0);return Object.assign(i.proxy,{__updateGraphics:a}),()=>{var r,l;return t.slots.default?S("i",{class:se(((r=i.proxy)==null?void 0:r.$options.name)||""),style:{display:"none !important"}},Je(t.slots.default)):ie(se(((l=i.proxy)==null?void 0:l.$options.name)||""))}}});Ss.install=e=>{e.component(Ss.name,Ss)};const _c=Ss,OM=_c;var PM={imageryProvider:Object,...Dt,alpha:{type:[Number,Function],default:1},nightAlpha:{type:[Number,Function],default:1},dayAlpha:{type:[Number,Function],default:1},brightness:{type:[Number,Function],default:1},contrast:{type:[Number,Function],default:1},hue:{type:[Number,Function],default:0},saturation:{type:[Number,Function],default:1},gamma:{type:[Number,Function],default:1},splitDirection:{type:[Number,Function],default:0},minificationFilter:Number,magnificationFilter:Number,...Ie,maximumAnisotropy:Number,minimumTerrainLevel:Number,maximumTerrainLevel:Number,...Bu,...Lu,colorToAlphaThreshold:{type:Number,default:.004},sortOrder:Number,vcId:String};const SM={...Ce,"update:imageryProvider":e=>!0,readyEvent:e=>!0,errorEvent:e=>!0},dp=PM;var Ts=K({name:"VcLayerImagery",props:dp,emits:SM,setup(e,t){const i=oe();i.cesiumClass="ImageryLayer",i.cesiumEvents=["readyEvent","errorEvent"];const n=Ne(e,t,i);if(n===void 0)return;const{$services:o}=n,{emit:s}=t;i.createCesiumObject=async()=>{const r=n.transformProps(e);if(nn(Cesium.VERSION,"1.104")){const l=e.imageryProvider||Cesium.BingMapsImageryProvider.fromUrl(void 0,{key:""}),c=Cesium.ImageryLayer.fromProviderAsync(l,r);return c.errorEvent.addEventListener(u=>{}),c}else{const l=e.imageryProvider||{};return new Cesium.ImageryLayer(l,r)}},i.mount=async()=>{const{viewer:r}=o,l=i.cesiumObject;return l.sortOrder=e.sortOrder,l.vcId=e.vcId||Cesium.createGuid(),r.imageryLayers.add(l),!r.isDestroyed()&&r.imageryLayers.contains(l)},i.unmount=async()=>{const{viewer:r}=o,l=i.cesiumObject;return!r.isDestroyed()&&r.imageryLayers.remove(l)};const a=r=>{var l;if(ui(r))return(l=i.unmount)==null?void 0:l.call(i);{const c=i.cesiumObject;c._imageryProvider=r,Pe(i,"update:imageryProvider")&&s("update:imageryProvider",r)}return!0};return Object.assign(i.proxy,{__updateProvider:a}),()=>{var r,l;return t.slots.default?S("i",{class:se(((r=i.proxy)==null?void 0:r.$options.name)||""),style:{display:"none !important"}},Je(t.slots.default)):ie(se(((l=i.proxy)==null?void 0:l.$options.name)||"v-if"))}}});Ts.install=e=>{e.component(Ts.name,Ts)};const xc=Ts,TM=xc,hp={...$o,...eo,...Ie,...Za,...Ro,...No,...ko,...jn,...Fn,...Fi,...Ri,...Qa,...Qe};var mp=K({name:"VcPrimitiveClassification",props:hp,emits:pi,setup(e,t){var i;const n=oe();n.cesiumClass="ClassificationPrimitive",mi(e,t,n);const o=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(o),style:{display:"none !important"}},Je(t.slots.default)):ie(se(o))}});const pp={...$o,...eo,...Ie,...Za,...Ro,...No,...ko,...jn,...Fn,...Fi,...Ri,...Qa,...Qe};var vp=K({name:"VcPrimitiveGround",props:pp,emits:pi,setup(e,t){var i;const n=oe();n.cesiumClass="GroundPrimitive",mi(e,t,n);const o=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(o),style:{display:"none !important"}},Je(t.slots.default)):ie(se(o))}});const fp={...$o,...eo,...Ie,...Ro,...No,...ko,...jn,...Fn,...Fi,...Ri,...Qa,...Qe};var gp=K({name:"VcPrimitiveGroundPolyline",props:fp,emits:pi,setup(e,t){var i;const n=oe();n.cesiumClass="GroundPolylinePrimitive",mi(e,t,n);const o=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(o),style:{display:"none !important"}},Je(t.slots.default)):ie(se(o))}});const yp={...wi,basePath:String,...Ie,..._i,...In,...hr,...mr,...dn,...jn,...pr,...Fn,...vr,...Nt,...Ri,...Fr,...Zt,...Vo,...ft,...on,...yr,...br,...fr,...gr,...Bo,dequantizeInShader:{type:Boolean,default:!0},...za,...Cr,...Vr,...zr,...Gr,...St,...Ur,showOutline:{type:Boolean,default:!0},...Qe};var bp=K({name:"VcPrimitiveModel",props:yp,emits:{...pi,readyEvent:e=>!0,texturesReadyEvent:e=>!0,errorEvent:e=>!0},setup(e,t){const i=oe();i.cesiumClass="Model",i.cesiumEvents=["readyEvent","texturesReadyEvent","errorEvent"];const n=mi(e,t,i);return i.createCesiumObject=async()=>{const o=n==null?void 0:n.transformProps(e);return nn(Cesium.VERSION,"1.104")?await Cesium.Model.fromGltfAsync(o):Cesium.Model.fromGltf(o)},()=>{var o;return ie(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const Cp={...$o,...eo,...Lr,...Ie,..._i,...Za,...Ro,...No,...ko,...jn,cull:{type:Boolean,default:!0},...Fn,...Ri,...Nt,...Qe};var wp=K({name:"VcPrimitive",props:Cp,emits:pi,setup(e,t){var i;const n=oe();n.cesiumClass="Primitive",mi(e,t,n);const o=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>{var s;return t.slots.default?S("i",{class:se(o),style:{display:"none !important"}},Je(t.slots.default)):ie(se(((s=n.proxy)==null?void 0:s.$options.name)||""))}}});const IM={...pi,allTilesLoaded:()=>!0,initialTilesLoaded:()=>!0,loadProgress:(e,t)=>!0,tileFailed:(e,t)=>!0,tileLoad:e=>!0,tileUnload:e=>!0,tileVisible:e=>!0},_p={url:[String,Object],...Ie,..._i,modelUpAxis:{type:Number},modelForwardAxis:{type:Number},...Nt,...Er,maximumMemoryUsage:{type:Number},cacheBytes:{type:Number,default:536870912},maximumCacheOverflowBytes:{type:Number,default:536870912},cullWithChildrenBounds:{type:Boolean,default:!0},cullRequestsWhileMoving:{type:Boolean,default:!0},cullRequestsWhileMovingMultiplier:{type:Number,default:60},preloadWhenHidden:{type:Boolean,default:!1},preloadFlightDestinations:{type:Boolean,default:!0},preferLeaves:{type:Boolean,default:!1},dynamicScreenSpaceError:{type:Boolean,default:!1},dynamicScreenSpaceErrorDensity:{type:Number,default:.00278},dynamicScreenSpaceErrorFactor:{type:Number,default:4},dynamicScreenSpaceErrorHeightFalloff:{type:Number,default:.25},progressiveResolutionHeightFraction:{type:Number,default:.3},foveatedScreenSpaceError:{type:Boolean,default:!0},foveatedConeSize:{type:Number,default:.1},foveatedMinimumScreenSpaceErrorRelaxation:{type:Number,default:0},foveatedInterpolationCallback:Function,foveatedTimeDelay:{type:Number,default:.2},skipLevelOfDetail:{type:Boolean,default:!1},baseScreenSpaceError:{type:Number,default:1024},skipScreenSpaceErrorFactor:{type:Number,default:16},skipLevels:{type:Number,default:1},immediatelyLoadDesiredLevelOfDetail:{type:Boolean,default:!1},loadSiblings:{type:Boolean,default:!1},...Bo,...Fi,...$e,pointCloudShading:Object,...za,...zu,...Vr,...zr,...Gr,...Gu,...Ur,enableShowOutline:{type:Boolean,default:!0},showOutline:{type:Boolean,default:!0},...qt,vectorClassificationOnly:{type:Boolean,default:!1},vectorKeepDecodedPositions:{type:Boolean,default:!1},featureIdIndex:{type:Number,default:0},instanceFeatureIdIndex:{type:Number,default:0},featureIdLabel:{type:[String,Number]},instanceFeatureIdLabel:{type:[String,Number]},splitDirection:{type:Number,default:0},projectTo2D:{type:Boolean,default:!1},showCreditsOnScreen:{type:Boolean,default:!1},debugHeatmapTilePropertyName:String,debugFreezeFrame:{type:Boolean,default:!1},debugColorizeTiles:{type:Boolean,default:!1},...Fr,...Ri,debugShowContentBoundingVolume:{type:Boolean,default:!1},debugShowViewerRequestVolume:{type:Boolean,default:!1},debugShowGeometricError:{type:Boolean,default:!1},debugShowRenderingStatistics:{type:Boolean,default:!1},debugShowMemoryUsage:{type:Boolean,default:!1},debugShowUrl:{type:Boolean,default:!1},...Qe,enableModelExperimental:{type:Boolean,default:!1},...Dr,properties:{type:Array},fragmentShader:String,replaceFS:Boolean,assetId:Number};var xp=K({name:"VcPrimitiveTileset",props:_p,emits:IM,setup(e,t){const i=oe();i.cesiumClass="Cesium3DTileset",i.cesiumEvents=["allTilesLoaded","initialTilesLoaded","loadProgress","tileFailed","tileLoad","tileUnload","tileVisible"];const n=mi(e,t,i);i.proxy.creatingPromise.then(s=>{const a=s.cesiumObject;i.removeCallbacks.push(a.tileVisible.addEventListener(o))});const o=s=>{const a=s.content,r=a._model;for(let l=0;l<a.featuresLength;l++){const c=a.getFeature(l);e.properties&&e.properties.length&&e.properties.forEach(u=>{c.hasProperty(u.key)&&c.getProperty(u.key)===u.keyValue&&c.setProperty(u.propertyName,u.propertyValue)})}e.fragmentShader&&r&&r._sourcePrograms&&r._rendererResources&&(Object.keys(r._sourcePrograms).forEach(l=>{var c;const u=r._sourcePrograms[l],d=r._rendererResources.sourceShaders;if(e.replaceFS)d[u.fragmentShader]=e.fragmentShader;else{const h=d[u.fragmentShader],p=(c=n.$services.viewer.scene.context)==null?void 0:c.webgl2;d[u.fragmentShader]=h.replace(`${p?"out_FragColor":"gl_FragColor"} = vec4(color, 1.0);
}`,`${p?"out_FragColor":"gl_FragColor"} = vec4(color, 1.0);
${e.fragmentShader}
}
`)}}),r._shouldRegenerateShaders=!0)};return()=>{var s;return ie(se(((s=i.proxy)==null?void 0:s.$options.name)||""))}}});const Ep={...Fu,...Br,enableShowOutline:{type:Boolean,default:!0},showOutline:{type:Boolean,default:!0},...Qe};var Mp=K({name:"VcPrimitiveOsmBuildings",props:Ep,emits:{...pi},setup(e,t){const i=oe();i.cesiumClass="VcPrimitiveOsmBuildings";const n=mi(e,t,i);return i.createCesiumObject=async()=>{const o=n==null?void 0:n.transformProps(e);return o.style=o.tileStyle,delete o.tileStyle,nn(Cesium.VERSION,"1.104")?await Cesium.createOsmBuildingsAsync(o):Cesium.createOsmBuildings(o)},()=>{var o;return ie(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const AM={...pi,complete:e=>!0},Op={...Ie,updateCallback:Function,emitter:Object,..._i,emitterModelMatrix:Object,emissionRate:{type:Number,default:5},bursts:Array,loop:{type:Boolean,default:!0},scale:{type:Number,default:1},startScale:Number,endScale:Number,...on,...ku,...Ru,...Oa,...Vu,...$u,...Nu,...Pa,speed:{type:Number,default:1},minimumSpeed:Number,maximumSpeed:Number,lifetime:{type:Number,default:Number.MAX_VALUE},particleLife:{type:Number,default:5},minimumParticleLife:Number,maximumParticleLife:Number,mass:{type:Number,default:1},minimumMass:Number,maximumMass:Number,...Qe};var Pp=K({name:"VcPrimitiveParticle",props:Op,emits:AM,setup(e,t){const i=oe();return i.cesiumClass="ParticleSystem",i.cesiumEvents=["complete"],mi(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}}),DM=`
uniform sampler2D colorTexture;
uniform vec4 u_color1;
uniform vec4 u_color2;
uniform float u_isShed;
uniform sampler2D shadowMap_depthTexture;
uniform mat4 shadowMap_matrix;
uniform vec4 shadowMap_lightPositionEC;
uniform vec3 shadowMap_lightDirectionEC;
uniform float u_radius;
uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;
uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;
uniform float czzj;
uniform float dis;
uniform float spzj;
uniform float mixNum;
uniform vec3 shadowMap_lightUp;
uniform vec3 shadowMap_lightDir;
uniform vec3 shadowMap_lightRight;
in vec2 v_textureCoordinates;
vec4 toEye(in vec2 uv, in float depth){
vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));
vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);
posInCamera =posInCamera / posInCamera.w;
return posInCamera;
}
float getDepth(in vec4 depth){
float z_window = czm_unpackDepth(depth);
z_window = czm_reverseLogDepth(z_window);
float n_range = czm_depthRange.near;
float f_range = czm_depthRange.far;
return (2.0 * z_window - n_range - f_range) / (f_range - n_range);
}
float _czm_sampleShadowMap(sampler2D shadowMap, vec2 uv){
return texture(shadowMap, uv).r;
}
float _czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth){
return step(depth, _czm_sampleShadowMap(shadowMap, uv));
}
float _czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters){
float depthBias = shadowParameters.depthBias;
float depth = shadowParameters.depth;
float nDotL = shadowParameters.nDotL;
float normalShadingSmooth = shadowParameters.normalShadingSmooth;
float darkness = shadowParameters.darkness;
vec2 uv = shadowParameters.texCoords;
depth -= depthBias;
vec2 texelStepSize = shadowParameters.texelStepSize;
float radius = 1.0;
float dx0 = -texelStepSize.x * radius;
float dy0 = -texelStepSize.y * radius;
float dx1 = texelStepSize.x * radius;
float dy1 = texelStepSize.y * radius;
float visibility =
(
_czm_shadowDepthCompare(shadowMap, uv, depth)
+_czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)
) * (1.0 / 9.0)
;
return visibility;
}
vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point){
vec3 v01 = point -planeOrigin;
float d = dot(planeNormal, v01) ;
return (point - planeNormal * d);
}
float ptm(vec3 pt){
return sqrt(pt.x*pt.x + pt.y*pt.y + pt.z*pt.z);
}
void main()
{
const float PI = 3.141592653589793;
vec4 color = texture(colorTexture, v_textureCoordinates);
out_FragColor = color;
if ( u_isShed < 0.5 )
return;
vec4 currD = texture(czm_globeDepthTexture, v_textureCoordinates);
if( currD.r >= 1.0 )
return;
float depth = getDepth(currD);
vec4 positionEC = toEye(v_textureCoordinates, depth);
vec3 normalEC = vec3(1.0);
czm_shadowParameters shadowParameters;
shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;
shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;
shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;
shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;
shadowParameters.depthBias *= max(depth * 0.01, 1.0);
vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);
float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);
vec4 shadowPosition = shadowMap_matrix * positionEC;
shadowPosition /= shadowPosition.w;
if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))
return;
vec4 lw = czm_inverseView* vec4(shadowMap_lightPositionEC.xyz, 1.0);
vec4 vw = czm_inverseView* vec4(positionEC.xyz, 1.0);
if(distance(lw.xyz,vw.xyz)> u_radius)
return;
shadowParameters.texCoords = shadowPosition.xy;
shadowParameters.depth = shadowPosition.z;
shadowParameters.nDotL = nDotL;
float visibility = _czm_shadowVisibility(shadowMap_depthTexture, shadowParameters);
if(visibility > 0.3 ){
out_FragColor = mix(color,vec4(u_color1.rgb, 1.0),mixNum);
}
else{
if(abs(shadowPosition.z-0.0)<0.01){
return;
}
out_FragColor = mix(color,vec4(u_color2.rgb, 1.0),mixNum);
}
}
`;const Sp={...Vo,fovH:{type:Number,default:90},fovV:{type:Number,default:60},offsetHeight:{type:Number,default:1.8},visibleColor:{type:[Object,Array,String],default:"#00ff00"},invisibleColor:{type:[Object,Array,String],default:"#ff0000"},showGridLine:{type:Boolean,default:!0},lineColor:{type:[Object,Array,String],default:"rgba(255,255,255,0.4)"},faceColor:{type:[Object,Array,String],default:"rgba(255,255,255,0.1)"},show:{type:Boolean,default:!0},startPosition:{type:Object},endPosition:{type:Object},fragmentShader:{type:String},uniforms:Object};var BM=K({name:"VcViewshed",props:Sp,emits:Ce,setup(e,t){const i=oe();i.cesiumClass="VcViewshed";const n=Ne(e,t,i);if(n===void 0)return;const o=[];let s;o.push(de([()=>e.startPosition,()=>e.endPosition],([r,l])=>{i.mounted&&a(r,l)},{deep:!0})),o.push(de(()=>e.fovH,r=>{if(!i.mounted)return;const l=i.cesiumObject;l.fovH=r})),o.push(de(()=>e.fovV,r=>{if(!i.mounted)return;const l=i.cesiumObject;l.fovV=r})),o.push(de(()=>e.fovV,r=>{if(!i.mounted)return;const l=i.cesiumObject;l.fovV=r})),o.push(de(()=>e.offsetHeight,r=>{if(!i.mounted)return;const l=i.cesiumObject;l.offsetHeight=r})),o.push(de(()=>e.visibleColor,r=>{if(!i.mounted)return;const l=i.cesiumObject;l.visibleColor=Te(r)})),o.push(de(()=>e.invisibleColor,r=>{if(!i.mounted)return;const l=i.cesiumObject;l.invisibleColor=Te(r)})),o.push(de(()=>e.showGridLine,r=>{if(!i.mounted)return;const l=i.cesiumObject;l.showGridLine=r})),o.push(de(()=>e.show,r=>{if(!i.mounted)return;const l=i.cesiumObject;l.enabled=r})),nt(()=>{o.forEach(r=>r()),o.length=0}),i.createCesiumObject=async()=>{const r=n.$services.viewer,l=new Id(r.scene,{fovH:120,fovV:60,offsetHeight:1.8,visibleColor:Te(e.visibleColor),invisibleColor:Te(e.invisibleColor),showGridLine:e.showGridLine});return l._viewshedShadowMap.cascadesEnabled=!1,l._viewshedShadowMap.softShadows=!1,l._viewshedShadowMap.normalOffset=!1,l._viewshedShadowMap.fromLightSource=!1,l._viewshedShadowMap.enabled=!1,l.fovH=Cesium.Math.toRadians(e.fovH),l.fovV=Cesium.Math.toRadians(e.fovV),l.offsetHeight=e.offsetHeight,l.showGridLine=e.showGridLine,l.enabled=e.show,l.lineColor=Te(e.lineColor),l.faceColor=Te(e.faceColor),l},i.mount=async()=>{var r;const l=n.$services.viewer,c=i.cesiumObject,{Cartesian4:u,PostProcessStage:d,Cartesian2:h}=Cesium,p=(r=n.$services.viewer.scene.context)==null?void 0:r.webgl2;let v=DM;p||(v=v.replace("in vec2 v_textureCoordinates;","varying vec2 v_textureCoordinates;"),v=v.replace(/texture\(/g,"texture2D("),v=v.replace(/out_FragColor/g,"gl_FragColor")),a(e.startPosition,e.endPosition),s=new d({fragmentShader:e.fragmentShader||v,uniforms:e.uniforms||{u_color1:function(){return c.visibleColor},u_color2:function(){return c.invisibleColor},u_isShed:function(){return c.shadowMap.enabled},u_radius:function(){return c.lightCamera.frustum.far},shadowMap_depthTexture:function(){return c.shadowMap.enabled?c.shadowMap._shadowMapTexture:l.scene.context.defaultTexture},shadowMap_matrix:function(){return c.shadowMap._shadowMapMatrix},shadowMap_cascadeSplits:function(){return c.shadowMap._cascadeSplits},shadowMap_cascadeMatrices:function(){return c.shadowMap._cascadeMatrices},shadowMap_lightDirectionEC:function(){return c.shadowMap._lightDirectionEC},shadowMap_lightPositionEC:function(){return c.shadowMap._lightPositionEC},shadowMap_cascadeDistances:function(){return c.shadowMap._cascadeDistances},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){const y=c.shadowMap._pointBias;return u.fromElements(y.normalOffsetScale,c.shadowMap._distance,c.shadowMap.maximumDistance,0,new u)},shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:function(){const y=c.shadowMap._pointBias,x=new h;return x.x=1/c.shadowMap._textureSize.x,x.y=1/c.shadowMap._textureSize.y,u.fromElements(x.x,x.y,y.depthBias,y.normalShadingSmooth,new u)},czzj:function(){return c.lightCamera.frustum.fov},spzj:function(){return c.lightCamera.frustum.fov},mixNum:function(){return .5},shadowMap_lightUp:function(){return c.lightCamera.up},shadowMap_lightDir:function(){return c.lightCamera.direction},shadowMap_lightRight:function(){return c.lightCamera.right}}}),l.scene.postProcessStages.add(s);const b=n.$services.primitives;return b&&b.add(c)},i.unmount=async()=>{const r=n.$services.viewer;s&&r.scene.postProcessStages.remove(s);const l=n.$services.primitives,c=i.cesiumObject;return l&&l.remove(c)};const a=(r,l)=>{const c=i.cesiumObject,{Cartesian3:u}=Cesium;let d=u.subtract(l,r,new u);const h=u.magnitudeSquared(d),p=u.distance(l,r);if(h<.01||c.frustum.near>p)c.enabled=!1;else{c.enabled=!0,d=u.normalize(d,d);const v=u.normalize(l,new u);c.setView({destination:r,orientation:{direction:d,up:v}}),c.frustum.far=Math.max(p,1.1)}};return()=>{var r;return ie(se(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const Tp={...Fo,intervals:Object,...Ie,..._i,...Nt,...ju,shading:Object,...Br,...Bo,...Qe};var Ip=K({name:"VcPrimitiveTimeDynamicPointCloud",props:Tp,emits:{...pi,frameChanged:e=>!0,frameFailed:e=>!0},setup(e,t){const i=oe();i.cesiumClass="VcPrimitiveTimeDynamicPointCloud",i.cesiumEvents=["frameChanged","frameFailed"];const n=mi(e,t,i);return i.createCesiumObject=async()=>{const o=n==null?void 0:n.transformProps(e);return o.style=o.tileStyle,delete o.tileStyle,new Cesium.TimeDynamicPointCloud(o)},()=>{var o;return ie(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const Ap={...wi,name:String,...Ie,geoidTiledTerrainProvider:{type:Object},traceFetches:{type:Boolean,default:!1},cesium3dTilesetOptions:{type:Object},...Qe};var Dp=K({name:"VcPrimitiveI3sDataProvider",props:Ap,emits:pi,setup(e,t){const i=oe();return i.cesiumClass="I3SDataProvider",mi(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Bp={provider:{type:Object},..._i,...Dr,...Fo,...Qe};var Lp=K({name:"VcPrimitiveVoxel",props:Bp,emits:pi,setup(e,t){const i=oe();return i.cesiumClass="VoxelPrimitive",mi(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const jp={...Ie,enabled:{type:Boolean,default:!0},pixelRange:{type:Number,default:80},minimumClusterSize:{type:Number,default:2},clusterBillboards:{type:Boolean,default:!0},clusterLabels:{type:Boolean,default:!0},clusterPoints:{type:Boolean,default:!0},billboards:{type:Array,default:()=>[]},labels:{type:Array,default:()=>[]},points:{type:Array,default:()=>[]},...Qe};var Fp=K({name:"VcPrimitiveCluster",props:jp,emits:{...pi,clusterEvent:(e,t)=>!0},setup(e,t){var i;const n=oe();n.cesiumClass="VcPrimitiveCluster",n.cesiumEvents=["clusterEvent"];const o=mi(e,t,n),s=[];s.push(de(()=>e.show,u=>{const d=n.cesiumObject;d.show=u})),s.push(de(()=>e.enabled,u=>{const d=n.cesiumObject;d.enabled=u})),s.push(de(()=>e.minimumClusterSize,u=>{const d=n.cesiumObject;d.minimumClusterSize=u})),s.push(de(()=>e.clusterBillboards,u=>{const d=n.cesiumObject;d.clusterBillboards=u,n.proxy.reload()})),s.push(de(()=>e.clusterLabels,u=>{const d=n.cesiumObject;d.clusterLabels=u,n.proxy.reload()})),s.push(de(()=>e.clusterBillboards,u=>{const d=n.cesiumObject;d.clusterPoints=u,n.proxy.reload()})),s.push(de(()=>Ve(e.billboards),(u,d)=>{if(!n.mounted)return;const h=n.cesiumObject._billboardCollection;if(u.length===d.length){const p=[];for(let v=0;v<u.length;v++){const b=u[v],y=d[v];JSON.stringify(b)!==JSON.stringify(y)&&p.push({newOptions:b,oldOptions:y})}p.forEach(v=>{const b=h._billboards.find(y=>(y==null?void 0:y.id)===v.oldOptions.id);b&&Object.keys(v.newOptions).forEach(y=>{v.oldOptions[y]!==v.newOptions[y]&&(b[y]=o==null?void 0:o.transformProp(y,v.newOptions[y]))})})}else{const p=lt(u,d,"id"),v=lt(d,u,"id"),b=[];for(let y=0;y<v.length;y++){const x=h._billboards.find(M=>M.id===v[y].id);x&&b.push(x)}b.forEach(y=>{h.remove(y)}),r(h,p),setTimeout(()=>{o.$services.viewer.scene.camera.changed.raiseEvent()})}},{deep:!0})),s.push(de(()=>Ve(e.labels),(u,d)=>{if(!n.mounted)return;const h=n.cesiumObject._labelCollection;if(u.length===d.length){const p=[];for(let v=0;v<u.length;v++){const b=u[v],y=d[v];JSON.stringify(b)!==JSON.stringify(y)&&p.push({newOptions:b,oldOptions:y})}p.forEach(v=>{const b=h._labels.find(y=>y.id===v.oldOptions.id);b&&Object.keys(v.newOptions).forEach(y=>{v.oldOptions[y]!==v.newOptions[y]&&(b[y]=o.transformProp(y,v.newOptions[y]))})})}else{const p=lt(u,d,"id"),v=lt(d,u,"id"),b=[];for(let y=0;y<v.length;y++){const x=h._labels.find(M=>M.id===v[y].id);x&&b.push(x)}b.forEach(y=>{h.remove(y)}),l(h,p),setTimeout(()=>{o.$services.viewer.scene.camera.changed.raiseEvent()})}},{deep:!0})),s.push(de(()=>Ve(e.points),(u,d)=>{if(!n.mounted)return;const h=n.cesiumObject._pointCollection;if(u.length===d.length){const p=[];for(let v=0;v<u.length;v++){const b=u[v],y=d[v];JSON.stringify(b)!==JSON.stringify(y)&&p.push({newOptions:b,oldOptions:y})}p.forEach(v=>{const b=h._pointPrimitives.find(y=>y&&y.id===v.oldOptions.id);b&&Object.keys(v.newOptions).forEach(y=>{v.oldOptions[y]!==v.newOptions[y]&&(b[y]=o.transformProp(y,v.newOptions[y]))})})}else{const p=lt(u,d,"id"),v=lt(d,u,"id"),b=[];for(let y=0;y<v.length;y++){const x=h._pointPrimitives.find(M=>M.id===v[y].id);x&&b.push(x)}b.forEach(y=>{h.remove(y)}),a(h,p),setTimeout(()=>{o.$services.viewer.scene.camera.changed.raiseEvent()})}},{deep:!0})),n.createCesiumObject=async()=>{const u=new xd({show:e.show,enabled:e.enabled,pixelRange:e.pixelRange,minimumClusterSize:e.minimumClusterSize,clusterBillboards:e.clusterBillboards,clusterLabels:e.clusterLabels,clusterPoints:e.clusterPoints}),d=new Cesium.BillboardCollection;r(d,e.billboards);const h=new Cesium.LabelCollection;l(h,e.labels);const p=new Cesium.PointPrimitiveCollection;return a(p,e.points),u._billboardCollection=d,u._labelCollection=h,u._pointCollection=p,u._initialize(o.$services.viewer.scene),setTimeout(()=>{o.$services.viewer.scene.camera.changed.raiseEvent()}),u};const a=(u,d)=>{for(let h=0;h<d.length;h++){const p=d[h];p.id=Cesium.defined(p.id)?p.id:Cesium.createGuid();const v=o.transformProps(p),b=u.add(v);Ai(b,v)}},r=(u,d)=>{for(let h=0;h<d.length;h++){const p=d[h];p.id=Cesium.defined(p.id)?p.id:Cesium.createGuid();const v=o.transformProps(p),b=u.add(v);Ai(b,v)}},l=(u,d)=>{for(let h=0;h<d.length;h++){const p=d[h];p.id=Cesium.defined(p.id)?p.id:Cesium.createGuid();const v=o.transformProps(p),b=u.add(v);Ai(b,v)}};nt(()=>{s.forEach(u=>u()),s.length=0});const c=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(c),style:{display:"none !important"}},Je(t.slots.default)):ie(se(c))}});const LM=[mp,vp,gp,bp,wp,xp,Mp,Dp,Lp,Ip,Pp,Fp];LM.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Ec=mp,Mc=vp,Is=gp,kp=bp,wn=wp,Rp=xp,$p=Mp,Np=Pp,Vp=BM,zp=Ip,Gp=Dp,Up=Lp,Hp=Fp,Wp={...Ie,...Dt,min:{type:Number,default:0},max:{type:Number,default:100},data:Array,options:Object,type:{type:String,default:"primitive"},segments:{type:Array,default:()=>[]},projection:{type:String,default:"3857"}};var qp=K({name:"VcOverlayHeatmap",props:Wp,emits:Ce,setup(e,t){var i;const n=oe();n.cesiumClass="VcOverlayHeatmap",n.cesiumEvents=[];const o=Ne(e,t,n);if(o===void 0)return;const s=ee(null),a=ee(null),r={minCanvasSize:700,maxCanvasSize:2e3,radiusFactor:60,spacingFactor:1.5,maxOpacity:.8,minOpacity:.1,blur:.85,gradient:{".3":"blue",".65":"yellow",".8":"orange",".95":"red"},xField:"x",yField:"y",valueField:"value",container:void 0},l=ee(),c=ee(),u=ee(),d=ee(),h=ee(),p=ee(!1),v=ee();(i=Pt(n).proxy.creatingPromise)==null||i.then(()=>{p.value=!0});const b=ae(()=>Object.assign({},r,e.options));let y=[];y.push(de(()=>u,w=>{c.value.fabric.uniforms.image=w.value,h.value.options.material.fabric.uniforms.image=w.value},{deep:!0})),y.push(de(()=>e.data,(w,O)=>{if(!n.mounted)return;const I=n.cesiumObject;Array.isArray(w)&&Array.isArray(O)?(g(w,I),u.value=I.getDataURL()):o.reload()},{deep:!0})),y.push(de(()=>[e.max,e.min],w=>{const O=n.cesiumObject;O.setDataMax(w[0]||0),O.setDataMin(w[1]||0),u.value=O.getDataURL()})),y.push(de(()=>[e.type,e.projection,e.rectangle],w=>{o.reload()})),y.push(de(()=>e.options,w=>{const O=n.cesiumObject;O.configure(w),u.value=O.getDataURL()},{deep:!0})),n.createCesiumObject=async()=>{const{WebMercatorProjection:w,GeographicProjection:O}=Cesium;a.value=e.projection==="3857"?new w:new O;const I=x();v.value=M(e.rectangle);const R=document.createElement("div");if(Cesium.defined(I)&&R.setAttribute("id",I),R.setAttribute("style","width: "+v.value.width+"px; height: "+v.value.height+"px; margin: 0px; display: none;"),document.body.appendChild(R),b.value.container=R,e.segments.length){b.value.gradient={};const P=e.max-e.min;for(let k=0;k<e.segments.length;k++)b.value.gradient[`${(e.segments[k][0]-e.min)/P}`]=Te(e.segments[k][1]).toCssColorString()}const D=EM.create(b.value);return R.children[0].setAttribute("id",I+"-hm"),Array.isArray(e.data)&&(g(e.data,D),c.value={fabric:{type:"Image",uniforms:{image:u.value,transparent:!0}}},h.value={type:"MaterialAppearance",options:{material:{fabric:{type:"Image",uniforms:{image:u.value}}}}}),D},n.unmount=async()=>(document.body.removeChild(n.cesiumObject._config.container),!0);const x=w=>{let O="";const I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let R=0;R<(w||8);R++)O+=I.charAt(Math.floor(Math.random()*I.length));return O},M=w=>{const O=Pn(w),I=a.value.project(new Cesium.Cartographic(O.west,O.south)),R=a.value.project(new Cesium.Cartographic(O.east,O.north)),D={north:R.y,east:R.x,south:I.y,west:I.x};let P=D.east>0&&D.west<0?D.east+Math.abs(D.west):Math.abs(D.east-D.west),k=D.north>0&&D.south<0?D.north+Math.abs(D.south):Math.abs(D.north-D.south),N=1;P>k&&P>b.value.maxCanvasSize?(N=P/b.value.maxCanvasSize,k/N<b.value.minCanvasSize&&(N=k/b.value.minCanvasSize)):k>P&&k>b.value.maxCanvasSize?(N=k/b.value.maxCanvasSize,k/N<b.value.minCanvasSize&&(N=P/b.value.minCanvasSize)):P<k&&P<b.value.minCanvasSize?(N=P/b.value.minCanvasSize,k/N>b.value.maxCanvasSize&&(N=k/b.value.maxCanvasSize)):k<P&&k<b.value.minCanvasSize&&(N=k/b.value.minCanvasSize,P/N>b.value.maxCanvasSize&&(N=P/b.value.maxCanvasSize)),P=P/N,k=k/N,Cesium.defined(b.value.radius)||(b.value.radius=P>k?P/b.value.radiusFactor:k/b.value.radiusFactor);const $=(b.value.radius||1)*b.value.spacingFactor,m=D.west,f=D.south;P=Math.round(P+$*2),k=Math.round(k+$*2),D.west-=$*N,D.east+=$*N,D.south-=$*N,D.north+=$*N;const C=a.value.unproject(new Cesium.Cartesian3(D.west,D.south)),T=a.value.unproject(new Cesium.Cartesian3(D.east,D.north)),_={north:Cesium.Math.toDegrees(T.latitude),east:Cesium.Math.toDegrees(T.longitude),south:Cesium.Math.toDegrees(C.latitude),west:Cesium.Math.toDegrees(C.longitude)};return l.value=_,{height:k,width:P,factor:N,xoffset:m,yoffset:f,spacing:$}},g=(w,O)=>{if(w){const{height:I,xoffset:R,yoffset:D,factor:P,spacing:k}=v.value,N=b.value.xField||"x",$=b.value.yField||"y",m=b.value.valueField||"value",f=[];for(let C=0;C<w.length;C++){const T=w[C];Cesium.defined(T.id)||(T.id=C);const _=a.value.project(Cesium.Cartographic.fromDegrees(T[N],T[$])),E={[N]:Math.round((_.x-R)/P+k),[$]:Math.round((_.y-D)/P+k),[m]:void 0};E[$]=I-E[$],(T[m]||T[m]===0)&&(E[m]=T[m]),!(E[m]>e.max||E[m]<e.min)&&f.push(E)}O.setData({min:e.min,max:e.max,data:f}),u.value=O.getDataURL()}};return nt(()=>{y.forEach(w=>w()),y=[]}),Object.assign(n.proxy,{rootRef:s,childRef:d}),()=>{if(p.value){const w=[];return e.type==="entity"&&u.value?w.push(S(_c,{ref:d,show:e.show,rectangle:{coordinates:l.value,material:c.value}})):e.type==="primitive"?w.push(S(Mc,{ref:d,show:e.show,appearance:h.value,releaseGeometryInstances:!1,geometryInstances:new Cesium.GeometryInstance({geometry:new Cesium.RectangleGeometry({rectangle:Pn(l.value)})})})):e.type==="imagery-layer"&&u.value&&w.push(S(xc,{ref:d,show:e.show,imageryProvider:new Cesium.SingleTileImageryProvider({url:u.value,rectangle:Pn(l.value)})})),S("i",{ref:s,class:"vc-overlay-heatmap",style:"display: none !important"},w)}else return ie("v-if")}}});const Qp={options:{type:Object,required:!0},autoHidden:{type:Boolean,default:!0},customClass:String,coordinateSystem:{type:String,default:"cesium"}};({...Ce});var Zp=K({name:"VcOverlayEcharts",props:Qp,emits:["beforeLoad","ready","destroyed","mouseenter","mouseleave","click"],setup(e,t){const i=oe();i.cesiumClass="VcOverlayEcharts",i.cesiumEvents=[];const n=Ne(e,t,i);if(n===void 0)return;const{$services:o}=n,s=ee(!1),a=ee(),r=Ee({left:"0px",top:"0px",pointerEvents:"none",position:"absolute"});let l;const c=ee(!0);let u=[];u.push(de(()=>e.options,M=>{n.reload()})),i.createCesiumObject=async()=>a.value,i.mount=async()=>{const{viewer:M}=o;return s.value=!0,Be(()=>{Ca.registerCoordinateSystem(e.coordinateSystem,p(M)),a.value&&(l=Ca.init(a.value),h(),M.scene.postRender.addEventListener(d))}),!0},i.unmount=async()=>{const{viewer:M}=o;return M.scene.postRender.removeEventListener(d),s.value=!1,!0};const d=()=>{if(c.value){const{viewer:M}=o;l.resize({width:M.canvas.width,height:M.canvas.height})}},h=()=>{c.value&&e.options&&l.setOption(e.options)},p=M=>{const g=function(w){this.viewer=w,this._mapOffset=[0,0]};return g.create=function(w){return w.eachSeries(function(O){O.get("coordinateSystem")===e.coordinateSystem&&(O.coordinateSystem=new g(M))}),[]},g.getDimensionsInfo=function(){return["x","y"]},g.dimensions=["x","y"],g.prototype.dimensions=["x","y"],g.prototype.setMapOffset=function(w){this._mapOffset=w},g.prototype.dataToPoint=function(w){const O=[],I=Cesium.Cartesian3.fromDegrees(w[0],w[1]);if(!I)return O;if(e.autoHidden){const D=Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(I,new Cesium.Cartesian3),P=this.viewer.camera.direction;if(Cesium.Cartesian3.dot(D,P)>=0)return O}const R=this.viewer.scene.cartesianToCanvasCoordinates(I);return R?[R.x-this._mapOffset[0],R.y-this._mapOffset[1]]:O},g.prototype.pointToData=function(w){const O=this._mapOffset,I=M.scene.globe.ellipsoid,R=new Cesium.Cartesian3(w[1]+O[1],w[2]+O[2],0),D=I.cartesianToCartographic(R);return D?[D.longitude,D.latitude]:[0,0]},g.prototype.getviewerRect=function(){const w=this.viewer.canvas;return new Ca.graphic.BoundingRect(0,0,w.width,w.height)},g.prototype.getRoamTransform=function(){return Ca.matrix.create()},g},v=()=>s.value?S("div",{ref:a,class:`vc-echart-container${e.customClass?" "+e.customClass:""}`,style:r,onMouseenter:y,onMouseleave:x,onClick:b},Je(t.slots.default)):ie("v-if"),b=M=>{t.emit("click",M)},y=M=>{t.emit("mouseenter",M)},x=M=>{t.emit("mouseleave",M)};return nt(()=>{u.forEach(M=>M()),u=[]}),()=>v()}});function Jp(){const e=Cesium.GeometryAttributes;return new Cesium.Geometry({attributes:new e({position:new Cesium.GeometryAttribute({componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0])}),st:new Cesium.GeometryAttribute({componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array([0,0,1,0,1,1,0,1])})}),indices:new Uint32Array([3,2,0,0,2,1])})}function gi(e,t){if(Cesium.defined(t)){const i={};i.arrayBufferView=t,e.source=i}return new Cesium.Texture(e)}function Oc(e,t,i){return new Cesium.Framebuffer({context:e,colorTextures:[t],depthTexture:i})}function Pc(e){const t={viewport:e.viewport,depthTest:e.depthTest,depthMask:e.depthMask,blending:e.blending};return Cesium.Appearance.getDefaultRenderState(!0,!1,t)}function jM(e){const t={},i=Cesium.Math.mod(e.west,Cesium.Math.TWO_PI),n=Cesium.Math.mod(e.east,Cesium.Math.TWO_PI),o=e.width;let s,a;o>Cesium.Math.THREE_PI_OVER_TWO?(s=0,a=Cesium.Math.TWO_PI):n-i<o?(s=i,a=i+o):(s=i,a=n),t.lon={min:Cesium.Math.toDegrees(s),max:Cesium.Math.toDegrees(a)};const r=e.south,l=e.north,c=e.height,u=c>Cesium.Math.PI/12?c/2:0;let d=Cesium.Math.clampToLatitudeRange(r-u),h=Cesium.Math.clampToLatitudeRange(l+u);return d<-Cesium.Math.PI_OVER_THREE&&(d=-Cesium.Math.PI_OVER_TWO),h>Cesium.Math.PI_OVER_THREE&&(h=Cesium.Math.PI_OVER_TWO),t.lat={min:Cesium.Math.toDegrees(d),max:Cesium.Math.toDegrees(h)},t}var FM=`
precision highp float;
// the size of UV textures: width = lon, height = lat*lev
uniform sampler2D U; // eastward wind
uniform sampler2D V; // northward wind
uniform sampler2D currentParticlesPosition; // (lon, lat, lev)
uniform vec3 dimension; // (lon, lat, lev)
uniform vec3 minimum; // minimum of each dimension
uniform vec3 maximum; // maximum of each dimension
uniform vec3 interval; // interval of each dimension
// used to calculate the wind norm
uniform vec2 uSpeedRange; // (min, max);
uniform vec2 vSpeedRange;
uniform float pixelSize;
uniform float speedFactor;
in vec2 v_textureCoordinates;
vec2 mapPositionToNormalizedIndex2D(vec3 lonLatLev) {
// ensure the range of longitude and latitude
lonLatLev.x = mod(lonLatLev.x, 360.0);
lonLatLev.y = clamp(lonLatLev.y, -90.0, 90.0);
vec3 index3D = vec3(0.0);
index3D.x = (lonLatLev.x - minimum.x) / interval.x;
index3D.y = (lonLatLev.y - minimum.y) / interval.y;
index3D.z = (lonLatLev.z - minimum.z) / interval.z;
// the st texture coordinate corresponding to (col, row) index
// example
// data array is [0, 1, 2, 3, 4, 5], width = 3, height = 2
// the content of texture will be
// t 1.0
// | 3 4 5
// |
// | 0 1 2
// 0.0------1.0 s
vec2 index2D = vec2(index3D.x, index3D.z * dimension.y + index3D.y);
vec2 normalizedIndex2D = vec2(index2D.x / dimension.x, index2D.y / (dimension.y * dimension.z));
return normalizedIndex2D;
}
float getWindComponent(sampler2D componentTexture, vec3 lonLatLev) {
vec2 normalizedIndex2D = mapPositionToNormalizedIndex2D(lonLatLev);
float result = texture(componentTexture, normalizedIndex2D).r;
return result;
}
float interpolateTexture(sampler2D componentTexture, vec3 lonLatLev) {
float lon = lonLatLev.x;
float lat = lonLatLev.y;
float lev = lonLatLev.z;
float lon0 = floor(lon / interval.x) * interval.x;
float lon1 = lon0 + 1.0 * interval.x;
float lat0 = floor(lat / interval.y) * interval.y;
float lat1 = lat0 + 1.0 * interval.y;
float lon0_lat0 = getWindComponent(componentTexture, vec3(lon0, lat0, lev));
float lon1_lat0 = getWindComponent(componentTexture, vec3(lon1, lat0, lev));
float lon0_lat1 = getWindComponent(componentTexture, vec3(lon0, lat1, lev));
float lon1_lat1 = getWindComponent(componentTexture, vec3(lon1, lat1, lev));
float lon_lat0 = mix(lon0_lat0, lon1_lat0, lon - lon0);
float lon_lat1 = mix(lon0_lat1, lon1_lat1, lon - lon0);
float lon_lat = mix(lon_lat0, lon_lat1, lat - lat0);
return lon_lat;
}
vec3 linearInterpolation(vec3 lonLatLev) {
// https://en.wikipedia.org/wiki/Bilinear_interpolation
float u = interpolateTexture(U, lonLatLev);
float v = interpolateTexture(V, lonLatLev);
float w = 0.0;
return vec3(u, v, w);
}
vec2 lengthOfLonLat(vec3 lonLatLev) {
// unit conversion: meters -> longitude latitude degrees
// see https://en.wikipedia.org/wiki/Geographic_coordinate_system#Length_of_a_degree for detail
// Calculate the length of a degree of latitude and longitude in meters
float latitude = radians(lonLatLev.y);
float term1 = 111132.92;
float term2 = 559.82 * cos(2.0 * latitude);
float term3 = 1.175 * cos(4.0 * latitude);
float term4 = 0.0023 * cos(6.0 * latitude);
float latLength = term1 - term2 + term3 - term4;
float term5 = 111412.84 * cos(latitude);
float term6 = 93.5 * cos(3.0 * latitude);
float term7 = 0.118 * cos(5.0 * latitude);
float longLength = term5 - term6 + term7;
return vec2(longLength, latLength);
}
vec3 convertSpeedUnitToLonLat(vec3 lonLatLev, vec3 speed) {
vec2 lonLatLength = lengthOfLonLat(lonLatLev);
float u = speed.x / lonLatLength.x;
float v = speed.y / lonLatLength.y;
float w = 0.0;
vec3 windVectorInLonLatLev = vec3(u, v, w);
return windVectorInLonLatLev;
}
vec3 calculateSpeedByRungeKutta2(vec3 lonLatLev) {
// see https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods#Second-order_methods_with_two_stages for detail
const float h = 0.5;
float speedScaleFactor = speedFactor * pixelSize;
vec3 y_n = lonLatLev;
vec3 f_n = linearInterpolation(lonLatLev);
vec3 midpoint = y_n + 0.5 * h * convertSpeedUnitToLonLat(y_n, f_n) * speedScaleFactor;
vec3 speed = h * linearInterpolation(midpoint) * speedScaleFactor;
return speed;
}
float calculateWindNorm(vec3 speed) {
vec3 percent = vec3(0.0);
percent.x = (speed.x - uSpeedRange.x) / (uSpeedRange.y - uSpeedRange.x);
percent.y = (speed.y - vSpeedRange.x) / (vSpeedRange.y - vSpeedRange.x);
float norm = length(percent);
return norm;
}
void main() {
// texture coordinate must be normalized
vec3 lonLatLev = texture(currentParticlesPosition, v_textureCoordinates).rgb;
float speedScaleFactor = speedFactor * pixelSize;
vec3 speed = calculateSpeedByRungeKutta2(lonLatLev);
vec3 speedInLonLat = convertSpeedUnitToLonLat(lonLatLev, speed);
vec4 particleSpeed = vec4(speedInLonLat, calculateWindNorm(speed / speedScaleFactor));
out_FragColor = particleSpeed;
}
`;const kM=`
uniform sampler2D currentParticlesPosition; // (lon, lat, lev)
uniform sampler2D particlesSpeed; // (u, v, w, norm) Unit converted to degrees of longitude and latitude
in vec2 v_textureCoordinates;
void main() {
// texture coordinate must be normalized
vec3 lonLatLev = texture(currentParticlesPosition, v_textureCoordinates).rgb;
vec3 speed = texture(particlesSpeed, v_textureCoordinates).rgb;
vec3 nextParticle = lonLatLev + speed;
out_FragColor = vec4(nextParticle, 0.0);
}
`,RM=`
uniform sampler2D nextParticlesPosition;
uniform sampler2D particlesSpeed; // (u, v, w, norm)
// range (min, max)
uniform vec2 lonRange;
uniform vec2 latRange;
uniform float randomCoefficient; // use to improve the pseudo-random generator
uniform float dropRate; // drop rate is a chance a particle will restart at random position to avoid degeneration
uniform float dropRateBump;
in vec2 v_textureCoordinates;
// pseudo-random generator
const vec3 randomConstants = vec3(12.9898, 78.233, 4375.85453);
const vec2 normalRange = vec2(0.0, 1.0);
float rand(vec2 seed, vec2 range) {
vec2 randomSeed = randomCoefficient * seed;
float temp = dot(randomConstants.xy, randomSeed);
temp = fract(sin(temp) * (randomConstants.z + temp));
return temp * (range.y - range.x) + range.x;
}
vec3 generateRandomParticle(vec2 seed, float lev) {
// ensure the longitude is in [0, 360]
float randomLon = mod(rand(seed, lonRange), 360.0);
float randomLat = rand(-seed, latRange);
return vec3(randomLon, randomLat, lev);
}
bool particleOutbound(vec3 particle) {
return particle.y < -90.0 || particle.y > 90.0;
}
void main() {
vec3 nextParticle = texture(nextParticlesPosition, v_textureCoordinates).rgb;
vec4 nextSpeed = texture(particlesSpeed, v_textureCoordinates);
float speedNorm = nextSpeed.a;
float particleDropRate = dropRate + dropRateBump * speedNorm;
vec2 seed1 = nextParticle.xy + v_textureCoordinates;
vec2 seed2 = nextSpeed.xy + v_textureCoordinates;
vec3 randomParticle = generateRandomParticle(seed1, nextParticle.z);
float randomNumber = rand(seed2, normalRange);
if (randomNumber < particleDropRate || particleOutbound(nextParticle)) {
out_FragColor = vec4(randomParticle, 1.0); // 1.0 means this is a random particle
} else {
out_FragColor = vec4(nextParticle, 0.0);
}
}
`;class yo{constructor(t){this.commandType=t.commandType,this.geometry=t.geometry,this.attributeLocations=t.attributeLocations,this.primitiveType=t.primitiveType,this.uniformMap=t.uniformMap,this.vertexShaderSource=t.vertexShaderSource,this.fragmentShaderSource=t.fragmentShaderSource,this.rawRenderState=t.rawRenderState,this.framebuffer=t.framebuffer,this.outputTexture=t.outputTexture,this.autoClear=Cesium.defaultValue(t.autoClear,!1),this.preExecute=t.preExecute,this.show=!0,this.commandToExecute=void 0,this.clearCommand=void 0,this.autoClear&&(this.clearCommand=new Cesium.ClearCommand({color:new Cesium.Color(0,0,0,0),depth:1,framebuffer:this.framebuffer,pass:Cesium.Pass.OPAQUE}))}createCommand(t){switch(this.commandType){case"Draw":{const i=Cesium.VertexArray.fromGeometry({context:t,geometry:this.geometry,attributeLocations:this.attributeLocations,bufferUsage:Cesium.BufferUsage.STATIC_DRAW}),n=Cesium.ShaderProgram.fromCache({context:t,attributeLocations:this.attributeLocations,vertexShaderSource:this.vertexShaderSource,fragmentShaderSource:this.fragmentShaderSource}),o=Cesium.RenderState.fromCache(this.rawRenderState);return new Cesium.DrawCommand({owner:this,vertexArray:i,primitiveType:this.primitiveType,uniformMap:this.uniformMap,modelMatrix:Cesium.Matrix4.IDENTITY,shaderProgram:n,framebuffer:this.framebuffer,renderState:o,pass:Cesium.Pass.OPAQUE})}case"Compute":return new Cesium.ComputeCommand({owner:this,fragmentShaderSource:this.fragmentShaderSource,uniformMap:this.uniformMap,outputTexture:this.outputTexture,persists:!0})}}setGeometry(t,i){this.geometry=i;const n=Cesium.VertexArray.fromGeometry({context:t,geometry:this.geometry,attributeLocations:this.attributeLocations,bufferUsage:Cesium.BufferUsage.STATIC_DRAW});this.commandToExecute.vertexArray=n}update(t){this.show&&(Cesium.defined(this.commandToExecute)||(this.commandToExecute=this.createCommand(t.context)),Cesium.defined(this.preExecute)&&this.preExecute(),Cesium.defined(this.clearCommand)&&t.commandList.push(this.clearCommand),t.commandList.push(this.commandToExecute))}isDestroyed(){return!1}destroy(){return Cesium.defined(this.commandToExecute)&&(this.commandToExecute.shaderProgram=this.commandToExecute.shaderProgram&&this.commandToExecute.shaderProgram.destroy()),Cesium.destroyObject(this)}}class Xp{constructor(t,i,n,o){this.data=i,this.createWindTextures(t,i),this.createParticlesTextures(t,n,o),this.createComputingPrimitives(i,n,o,t)}createWindTextures(t,i){const n={context:t,width:i.dimensions.lon,height:i.dimensions.lat*i.dimensions.lev,pixelFormat:t!=null&&t.webgl2?Cesium.PixelFormat.RED:Cesium.PixelFormat.LUMINANCE,pixelDatatype:Cesium.PixelDatatype.FLOAT,flipY:!1,sampler:new Cesium.Sampler({minificationFilter:Cesium.TextureMinificationFilter.NEAREST,magnificationFilter:Cesium.TextureMagnificationFilter.NEAREST})};this.windTextures={U:gi(n,i.U.array),V:gi(n,i.V.array)}}createParticlesTextures(t,i,n){const o={context:t,width:i.particlesTextureSize,height:i.particlesTextureSize,pixelFormat:Cesium.PixelFormat.RGBA,pixelDatatype:Cesium.PixelDatatype.FLOAT,flipY:!1,sampler:new Cesium.Sampler({minificationFilter:Cesium.TextureMinificationFilter.NEAREST,magnificationFilter:Cesium.TextureMagnificationFilter.NEAREST})},s=this.randomizeParticles(i.maxParticles,n),a=new Float32Array(4*i.maxParticles).fill(0);this.particlesTextures={previousParticlesPosition:gi(o,s),currentParticlesPosition:gi(o,s),nextParticlesPosition:gi(o,s),postProcessingPosition:gi(o,s),particlesSpeed:gi(o,a)}}randomizeParticles(t,i){const n=new Float32Array(4*t);for(let o=0;o<t;o++)n[4*o]=Cesium.Math.randomBetween(i.lonRange.x,i.lonRange.y),n[4*o+1]=Cesium.Math.randomBetween(i.latRange.x,i.latRange.y),n[4*o+2]=Cesium.Math.randomBetween(this.data.lev.min,this.data.lev.max),n[4*o+3]=0;return n}destroyParticlesTextures(){Object.keys(this.particlesTextures).forEach(t=>{this.particlesTextures[t].destroy()})}createComputingPrimitives(t,i,n,o){const s=o==null?void 0:o.webgl2;let a=FM;s||(a=a.replace("in vec2 v_textureCoordinates;","varying vec2 v_textureCoordinates;"),a=a.replace(/texture\(/g,"texture2D("),a=a.replace(/out_FragColor/g,"gl_FragColor"));let r=kM;s||(r=r.replace("in vec2 v_textureCoordinates;","varying vec2 v_textureCoordinates;"),r=r.replace(/texture\(/g,"texture2D("),r=r.replace(/out_FragColor/g,"gl_FragColor"));let l=RM;s||(l=l.replace("in vec2 v_textureCoordinates;","varying vec2 v_textureCoordinates;"),l=l.replace(/texture\(/g,"texture2D("),l=l.replace(/out_FragColor/g,"gl_FragColor"));const c=new Cesium.Cartesian3(t.dimensions.lon,t.dimensions.lat,t.dimensions.lev),u=new Cesium.Cartesian3(t.lon.min,t.lat.min,t.lev.min),d=new Cesium.Cartesian3(t.lon.max,t.lat.max,t.lev.max),h=new Cesium.Cartesian3((d.x-u.x)/(c.x-1),(d.y-u.y)/(c.y-1),c.z>1?(d.z-u.z)/(c.z-1):1),p=new Cesium.Cartesian2(t.U.min,t.U.max),v=new Cesium.Cartesian2(t.V.min,t.V.max),b=this;this.primitives={calculateSpeed:new yo({commandType:"Compute",uniformMap:{U:function(){return b.windTextures.U},V:function(){return b.windTextures.V},currentParticlesPosition:function(){return b.particlesTextures.currentParticlesPosition},dimension:function(){return c},minimum:function(){return u},maximum:function(){return d},interval:function(){return h},uSpeedRange:function(){return p},vSpeedRange:function(){return v},pixelSize:function(){return n.pixelSize},speedFactor:function(){return i.speedFactor}},fragmentShaderSource:new Cesium.ShaderSource({sources:[a]}),outputTexture:this.particlesTextures.particlesSpeed,preExecute:function(){const y=b.particlesTextures.previousParticlesPosition;b.particlesTextures.previousParticlesPosition=b.particlesTextures.currentParticlesPosition,b.particlesTextures.currentParticlesPosition=b.particlesTextures.postProcessingPosition,b.particlesTextures.postProcessingPosition=y,b.primitives.calculateSpeed.commandToExecute.outputTexture=b.particlesTextures.particlesSpeed}}),updatePosition:new yo({commandType:"Compute",uniformMap:{currentParticlesPosition:function(){return b.particlesTextures.currentParticlesPosition},particlesSpeed:function(){return b.particlesTextures.particlesSpeed}},fragmentShaderSource:new Cesium.ShaderSource({sources:[r]}),outputTexture:this.particlesTextures.nextParticlesPosition,preExecute:function(){b.primitives.updatePosition.commandToExecute.outputTexture=b.particlesTextures.nextParticlesPosition}}),postProcessingPosition:new yo({commandType:"Compute",uniformMap:{nextParticlesPosition:function(){return b.particlesTextures.nextParticlesPosition},particlesSpeed:function(){return b.particlesTextures.particlesSpeed},lonRange:function(){return n.lonRange},latRange:function(){return n.latRange},randomCoefficient:function(){return Math.random()},dropRate:function(){return i.dropRate},dropRateBump:function(){return i.dropRateBump}},fragmentShaderSource:new Cesium.ShaderSource({sources:[l]}),outputTexture:this.particlesTextures.postProcessingPosition,preExecute:function(){b.primitives.postProcessingPosition.commandToExecute.outputTexture=b.particlesTextures.postProcessingPosition}})}}}const $M=`
in vec2 st;
// it is not normal itself, but used to control lines drawing
in vec3 normal; // (point to use, offset sign, not used component)
uniform sampler2D previousParticlesPosition;
uniform sampler2D currentParticlesPosition;
uniform sampler2D postProcessingPosition;
uniform float particleHeight;
uniform float aspect;
uniform float pixelSize;
uniform float lineWidth;
struct adjacentPoints {
vec4 previous;
vec4 current;
vec4 next;
};
vec3 convertCoordinate(vec3 lonLatLev) {
// WGS84 (lon, lat, lev) -> ECEF (x, y, z)
// read https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_geodetic_to_ECEF_coordinates for detail
// WGS 84 geometric constants
float a = 6378137.0; // Semi-major axis
float b = 6356752.3142; // Semi-minor axis
float e2 = 6.69437999014e-3; // First eccentricity squared
float latitude = radians(lonLatLev.y);
float longitude = radians(lonLatLev.x);
float cosLat = cos(latitude);
float sinLat = sin(latitude);
float cosLon = cos(longitude);
float sinLon = sin(longitude);
float N_Phi = a / sqrt(1.0 - e2 * sinLat * sinLat);
float h = particleHeight; // it should be high enough otherwise the particle may not pass the terrain depth test
vec3 cartesian = vec3(0.0);
cartesian.x = (N_Phi + h) * cosLat * cosLon;
cartesian.y = (N_Phi + h) * cosLat * sinLon;
cartesian.z = ((b * b) / (a * a) * N_Phi + h) * sinLat;
return cartesian;
}
vec4 calculateProjectedCoordinate(vec3 lonLatLev) {
// the range of longitude in Cesium is [-180, 180] but the range of longitude in the NetCDF file is [0, 360]
// [0, 180] is corresponding to [0, 180] and [180, 360] is corresponding to [-180, 0]
lonLatLev.x = mod(lonLatLev.x + 180.0, 360.0) - 180.0;
vec3 particlePosition = convertCoordinate(lonLatLev);
vec4 projectedCoordinate = czm_modelViewProjection * vec4(particlePosition, 1.0);
return projectedCoordinate;
}
vec4 calculateOffsetOnNormalDirection(vec4 pointA, vec4 pointB, float offsetSign) {
vec2 aspectVec2 = vec2(aspect, 1.0);
vec2 pointA_XY = (pointA.xy / pointA.w) * aspectVec2;
vec2 pointB_XY = (pointB.xy / pointB.w) * aspectVec2;
float offsetLength = lineWidth / 2.0;
vec2 direction = normalize(pointB_XY - pointA_XY);
vec2 normalVector = vec2(-direction.y, direction.x);
normalVector.x = normalVector.x / aspect;
normalVector = offsetLength * normalVector;
vec4 offset = vec4(offsetSign * normalVector, 0.0, 0.0);
return offset;
}
vec4 calculateOffsetOnMiterDirection(adjacentPoints projectedCoordinates, float offsetSign) {
vec2 aspectVec2 = vec2(aspect, 1.0);
vec4 PointA = projectedCoordinates.previous;
vec4 PointB = projectedCoordinates.current;
vec4 PointC = projectedCoordinates.next;
vec2 pointA_XY = (PointA.xy / PointA.w) * aspectVec2;
vec2 pointB_XY = (PointB.xy / PointB.w) * aspectVec2;
vec2 pointC_XY = (PointC.xy / PointC.w) * aspectVec2;
vec2 AB = normalize(pointB_XY - pointA_XY);
vec2 BC = normalize(pointC_XY - pointB_XY);
vec2 normalA = vec2(-AB.y, AB.x);
vec2 tangent = normalize(AB + BC);
vec2 miter = vec2(-tangent.y, tangent.x);
float offsetLength = lineWidth / 2.0;
float projection = dot(miter, normalA);
vec4 offset = vec4(0.0);
// avoid to use values that are too small
if (projection > 0.1) {
float miterLength = offsetLength / projection;
offset = vec4(offsetSign * miter * miterLength, 0.0, 0.0);
offset.x = offset.x / aspect;
} else {
offset = calculateOffsetOnNormalDirection(PointB, PointC, offsetSign);
}
return offset;
}
void main() {
vec2 particleIndex = st;
vec3 previousPosition = texture(previousParticlesPosition, particleIndex).rgb;
vec3 currentPosition = texture(currentParticlesPosition, particleIndex).rgb;
vec3 nextPosition = texture(postProcessingPosition, particleIndex).rgb;
float isAnyRandomPointUsed = texture(postProcessingPosition, particleIndex).a +
texture(currentParticlesPosition, particleIndex).a +
texture(previousParticlesPosition, particleIndex).a;
adjacentPoints projectedCoordinates;
if (isAnyRandomPointUsed > 0.0) {
projectedCoordinates.previous = calculateProjectedCoordinate(previousPosition);
projectedCoordinates.current = projectedCoordinates.previous;
projectedCoordinates.next = projectedCoordinates.previous;
} else {
projectedCoordinates.previous = calculateProjectedCoordinate(previousPosition);
projectedCoordinates.current = calculateProjectedCoordinate(currentPosition);
projectedCoordinates.next = calculateProjectedCoordinate(nextPosition);
}
int pointToUse = int(normal.x);
float offsetSign = normal.y;
vec4 offset = vec4(0.0);
// render lines with triangles and miter joint
// read https://blog.scottlogic.com/2019/11/18/drawing-lines-with-webgl.html for detail
if (pointToUse == -1) {
offset = pixelSize * calculateOffsetOnNormalDirection(projectedCoordinates.previous, projectedCoordinates.current, offsetSign);
gl_Position = projectedCoordinates.previous + offset;
} else {
if (pointToUse == 0) {
offset = pixelSize * calculateOffsetOnMiterDirection(projectedCoordinates, offsetSign);
gl_Position = projectedCoordinates.current + offset;
} else {
if (pointToUse == 1) {
offset = pixelSize * calculateOffsetOnNormalDirection(projectedCoordinates.current, projectedCoordinates.next, offsetSign);
gl_Position = projectedCoordinates.next + offset;
} else {
}
}
}
}
`,NM=`
void main() {
const vec4 white = vec4(1.0);
out_FragColor = white;
}
`,VM=`
in vec3 position;
in vec2 st;
out vec2 textureCoordinate;
void main() {
textureCoordinate = st;
gl_Position = vec4(position, 1.0);
}
`,zM=`
uniform sampler2D segmentsColorTexture;
uniform sampler2D segmentsDepthTexture;
uniform sampler2D currentTrailsColor;
uniform sampler2D trailsDepthTexture;
uniform float fadeOpacity;
in vec2 textureCoordinate;
void main() {
vec4 pointsColor = texture(segmentsColorTexture, textureCoordinate);
vec4 trailsColor = texture(currentTrailsColor, textureCoordinate);
trailsColor = floor(fadeOpacity * 255.0 * trailsColor) / 255.0; // make sure the trailsColor will be strictly decreased
float pointsDepth = texture(segmentsDepthTexture, textureCoordinate).r;
float trailsDepth = texture(trailsDepthTexture, textureCoordinate).r;
float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, textureCoordinate));
out_FragColor = vec4(0.0);
if (pointsDepth < globeDepth) {
out_FragColor = out_FragColor + pointsColor;
}
if (trailsDepth < globeDepth) {
out_FragColor = out_FragColor + trailsColor;
}
gl_FragDepth = min(pointsDepth, trailsDepth);
}
`,GM=`
uniform sampler2D trailsColorTexture;
uniform sampler2D trailsDepthTexture;
in vec2 textureCoordinate;
void main() {
vec4 trailsColor = texture(trailsColorTexture, textureCoordinate);
float trailsDepth = texture(trailsDepthTexture, textureCoordinate).r;
float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, textureCoordinate));
if (trailsDepth < globeDepth) {
out_FragColor = trailsColor;
} else {
out_FragColor = vec4(0.0);
}
}
`;class Yp{constructor(t,i,n,o,s){this.createRenderingTextures(t,i),this.createRenderingFramebuffers(t),this.createRenderingPrimitives(t,n,o,s)}createRenderingTextures(t,i){const n={context:t,width:t.drawingBufferWidth,height:t.drawingBufferHeight,pixelFormat:Cesium.PixelFormat.RGBA,pixelDatatype:Cesium.PixelDatatype.UNSIGNED_BYTE},o={context:t,width:t.drawingBufferWidth,height:t.drawingBufferHeight,pixelFormat:Cesium.PixelFormat.DEPTH_COMPONENT,pixelDatatype:Cesium.PixelDatatype.UNSIGNED_INT};this.textures={segmentsColor:gi(n),segmentsDepth:gi(o),currentTrailsColor:gi(n),currentTrailsDepth:gi(o),nextTrailsColor:gi(n),nextTrailsDepth:gi(o)}}createRenderingFramebuffers(t){this.framebuffers={segments:Oc(t,this.textures.segmentsColor,this.textures.segmentsDepth),currentTrails:Oc(t,this.textures.currentTrailsColor,this.textures.currentTrailsDepth),nextTrails:Oc(t,this.textures.nextTrailsColor,this.textures.nextTrailsDepth)}}createSegmentsGeometry(t){const i=[];for(let d=0;d<t.particlesTextureSize;d++)for(let h=0;h<t.particlesTextureSize;h++)for(let p=0;p<6;p++)i.push(d/t.particlesTextureSize),i.push(h/t.particlesTextureSize);const n=new Float32Array(i),o=[],s=[-1,0,1],a=[-1,1];for(let d=0;d<t.maxParticles;d++)for(let h=0;h<s.length;h++)for(let p=0;p<a.length;p++)o.push(s[h]),o.push(a[p]),o.push(0);const r=new Float32Array(o),l=12*t.maxParticles,c=new Uint32Array(l);for(let d=0,h=0,p=0;d<t.maxParticles;d++)c[h++]=p+0,c[h++]=p+1,c[h++]=p+2,c[h++]=p+2,c[h++]=p+1,c[h++]=p+3,c[h++]=p+2,c[h++]=p+4,c[h++]=p+3,c[h++]=p+4,c[h++]=p+3,c[h++]=p+5,p+=6;const u=Cesium.GeometryAttributes;return new Cesium.Geometry({attributes:new u({st:new Cesium.GeometryAttribute({componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:n}),normal:new Cesium.GeometryAttribute({componentDatatype:Cesium.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:r})}),indices:c})}createRenderingPrimitives(t,i,n,o){const s=this,a=t==null?void 0:t.webgl2;let r=$M;a||(r=r.replace("in vec2 st;","attribute vec2 st;"),r=r.replace("in vec3 normal;","attribute vec3 normal;"),r=r.replace(/texture\(/g,"texture2D("));let l=NM;a||(l=l.replace(/out_FragColor/g,"gl_FragColor"));let c=VM;a||(c=c.replace("out vec2 textureCoordinate;","varying vec2 textureCoordinate;"),c=c.replace("in vec3 position;","attribute vec3 position;"),c=c.replace("in vec2 st;","attribute vec2 st;"));let u=zM;a||(u=u.replace("in vec2 textureCoordinate;","varying vec2 textureCoordinate;"),u=u.replace(/out_FragColor/g,"gl_FragColor"),u=u.replace(/gl_FragDepth/g,"gl_FragDepthEXT"),u=u.replace(/texture\(/g,"texture2D("));let d=GM;a||(d=d.replace("in vec2 textureCoordinate;","varying vec2 textureCoordinate;"),d=d.replace(/out_FragColor/g,"gl_FragColor"),d=d.replace(/texture\(/g,"texture2D(")),this.primitives={segments:new yo({commandType:"Draw",attributeLocations:{st:0,normal:1},geometry:this.createSegmentsGeometry(i),primitiveType:Cesium.PrimitiveType.TRIANGLES,uniformMap:{previousParticlesPosition:function(){return o.particlesTextures.previousParticlesPosition},currentParticlesPosition:function(){return o.particlesTextures.currentParticlesPosition},postProcessingPosition:function(){return o.particlesTextures.postProcessingPosition},aspect:function(){return t.drawingBufferWidth/t.drawingBufferHeight},pixelSize:function(){return n.pixelSize},lineWidth:function(){return i.lineWidth},particleHeight:function(){return i.particleHeight}},vertexShaderSource:new Cesium.ShaderSource({sources:[r]}),fragmentShaderSource:new Cesium.ShaderSource({sources:[l]}),rawRenderState:Pc({viewport:void 0,depthTest:{enabled:!0},depthMask:!0}),framebuffer:this.framebuffers.segments,autoClear:!0}),trails:new yo({commandType:"Draw",attributeLocations:{position:0,st:1},geometry:Jp(),primitiveType:Cesium.PrimitiveType.TRIANGLES,uniformMap:{segmentsColorTexture:function(){return s.textures.segmentsColor},segmentsDepthTexture:function(){return s.textures.segmentsDepth},currentTrailsColor:function(){return s.framebuffers.currentTrails.getColorTexture(0)},trailsDepthTexture:function(){return s.framebuffers.currentTrails.depthTexture},fadeOpacity:function(){return i.fadeOpacity}},vertexShaderSource:new Cesium.ShaderSource({defines:["DISABLE_GL_POSITION_LOG_DEPTH"],sources:[c]}),fragmentShaderSource:new Cesium.ShaderSource({defines:["DISABLE_LOG_DEPTH_FRAGMENT_WRITE"],sources:[u]}),rawRenderState:Pc({viewport:void 0,depthTest:{enabled:!0,func:Cesium.DepthFunction.ALWAYS},depthMask:!0}),framebuffer:this.framebuffers.nextTrails,autoClear:!0,preExecute:function(){const h=s.framebuffers.currentTrails;s.framebuffers.currentTrails=s.framebuffers.nextTrails,s.framebuffers.nextTrails=h,s.primitives.trails.commandToExecute.framebuffer=s.framebuffers.nextTrails,s.primitives.trails.clearCommand.framebuffer=s.framebuffers.nextTrails}}),screen:new yo({commandType:"Draw",attributeLocations:{position:0,st:1},geometry:Jp(),primitiveType:Cesium.PrimitiveType.TRIANGLES,uniformMap:{trailsColorTexture:function(){return s.framebuffers.nextTrails.getColorTexture(0)},trailsDepthTexture:function(){return s.framebuffers.nextTrails.depthTexture}},vertexShaderSource:new Cesium.ShaderSource({defines:["DISABLE_GL_POSITION_LOG_DEPTH"],sources:[c]}),fragmentShaderSource:new Cesium.ShaderSource({defines:["DISABLE_LOG_DEPTH_FRAGMENT_WRITE"],sources:[d]}),rawRenderState:Pc({viewport:void 0,depthTest:{enabled:!1},depthMask:!0,blending:{enabled:!0}}),framebuffer:void 0})}}}class UM{constructor(t,i,n,o){this.context=t,this.data=i,this.particleSystemOptions=n,this.viewerParameters=o,this.particlesComputing=new Xp(this.context,this.data,this.particleSystemOptions,this.viewerParameters),this.particlesRendering=new Yp(this.context,this.data,this.particleSystemOptions,this.viewerParameters,this.particlesComputing)}canvasResize(t){this.particlesComputing.destroyParticlesTextures(),Object.keys(this.particlesComputing.windTextures).forEach(i=>{this.particlesComputing.windTextures[i].destroy()}),Object.keys(this.particlesRendering.framebuffers).forEach(i=>{this.particlesRendering.framebuffers[i].destroy()}),this.context=t,this.particlesComputing=new Xp(this.context,this.data,this.particleSystemOptions,this.viewerParameters),this.particlesRendering=new Yp(this.context,this.data,this.particleSystemOptions,this.viewerParameters,this.particlesComputing)}clearFramebuffers(){const t=new Cesium.ClearCommand({color:new Cesium.Color(0,0,0,0),depth:1,framebuffer:void 0,pass:Cesium.Pass.OPAQUE});Object.keys(this.particlesRendering.framebuffers).forEach(i=>{t.framebuffer=this.particlesRendering.framebuffers[i],t.execute(this.context)})}refreshParticles(t){if(this.clearFramebuffers(),this.particlesComputing.destroyParticlesTextures(),this.particlesComputing.createParticlesTextures(this.context,this.particleSystemOptions,this.viewerParameters),t){const i=this.particlesRendering.createSegmentsGeometry(this.particleSystemOptions);this.particlesRendering.primitives.segments.geometry=i;const n=Cesium.VertexArray.fromGeometry({context:this.context,geometry:i,attributeLocations:this.particlesRendering.primitives.segments.attributeLocations,bufferUsage:Cesium.BufferUsage.STATIC_DRAW});this.particlesRendering.primitives.segments.commandToExecute.vertexArray=n}}applyParticleSystemOptions(t){let i=!1;this.particleSystemOptions.maxParticles!==t.maxParticles&&(i=!0),Object.keys(t).forEach(n=>{this.particleSystemOptions[n]=t[n]}),this.refreshParticles(i)}applyViewerParameters(t){Object.keys(t).forEach(i=>{this.viewerParameters[i]=t[i]}),this.refreshParticles(!1)}}function Kp(e,t){const i=e-t*Math.floor(e/t);return i===t?0:i}function As(e){return typeof e=="string"&&e.indexOf("/")>=0&&(e=e.split("/")),r1(e)&&e.length===2?e[0]/e[1]:+e}function HM(e,t){const i=Math.floor(e.size),n=Math.floor(t.size),o=i*n,s=As(e.delta),a=As(t.delta),r=As(e.start),l=As(t.start),c=Math.floor(i*s)>=360;function u(){return{width:i,height:n}}function d(){return c}function h(b,y){for(let x=y||0;x<o;x++){const M=x%i,g=Math.floor(x/i),w=r+M*s,O=l+g*a;if(b(w,O,x))return x+1}return NaN}function p(b,y){if(b===b&&y===y){const x=Kp(b-r,360)/s,M=(y-l)/a,g=Math.round(x),w=Math.round(M);if(0<=w&&w<n&&0<=g&&(g<i||g===i&&c)){const O=w*i+g;return g===i?O-i:O}}return NaN}function v(b,y){if(b===b&&y===y){const x=Kp(b-r,360)/s,M=(y-l)/a,g=Math.floor(x),w=Math.floor(M),O=g+1,I=w+1,R=x-g,D=M-w;if(0<=w&&I<n&&0<=g&&(O<i||O===i&&c)){const P=w*i+g;let k=P+1;const N=P+i;let $=N+1;return O===i&&(k-=i,$-=i),[P,k,N,$,R,D]}}return[NaN,NaN,NaN,NaN,NaN,NaN]}return{dimensions:u,isCylindrical:d,forEach:h,closest:p,closest4:v}}const ev={show:{type:Boolean,default:!0},data:{type:Object,required:!0},options:{type:Object,default:()=>({maxParticles:64*64,particleHeight:100,fadeOpacity:.996,dropRate:.003,dropRateBump:.01,speedFactor:1,lineWidth:4})},viewerParameters:Object};var tv=K({name:"VcOverlayWindmap",props:ev,emits:Ce,setup(e,t){const i=oe();i.cesiumClass="VcOverlayHtml",i.cesiumEvents=[];const n=Ne(e,t,i);if(n===void 0)return;const{$services:o}=n;let s,a,r,l;const c=ae(()=>{const w=Math.ceil(Math.sqrt(e.options.maxParticles)),O=w*w;return{particlesTextureSize:w,maxParticles:O,particleHeight:e.options.particleHeight,fadeOpacity:e.options.fadeOpacity,dropRate:e.options.dropRate,dropRateBump:e.options.dropRateBump,speedFactor:e.options.speedFactor,lineWidth:e.options.lineWidth}});let u=[];u.push(de(()=>e.show,w=>{r.show=w})),u.push(de(()=>e.data,w=>{i.proxy.reload()})),u.push(de(()=>c.value,w=>{const O=i.cesiumObject;O&&O.applyParticleSystemOptions(w)},{deep:!0})),u.push(de(()=>e.viewerParameters,w=>{M(),i.cesiumObject.applyViewerParameters(s)},{deep:!0})),i.createCesiumObject=async()=>{const{viewer:w}=o;r=new Cesium.PrimitiveCollection,a=new Cesium.BoundingSphere(Cesium.Cartesian3.ZERO,.99*6378137),s={lonRange:new Cesium.Cartesian2,latRange:new Cesium.Cartesian2,pixelSize:0};const O={start:e.data.lon.array[0],delta:e.data.lon.delta,size:e.data.lon.array.length},I={start:e.data.lat.array[0],delta:e.data.lat.delta,size:e.data.lat.array.length};return l=HM(O,I),M(),new UM(w.scene.context,e.data,c.value,s)},i.mount=async()=>{const{viewer:w}=o;w.scene.primitives.add(r);const O=w.scene,I=O.camera;return d(),I.moveStart.addEventListener(p),I.moveEnd.addEventListener(v),window.addEventListener("resize",y),O.preRender.addEventListener(x),!0},i.unmount=async()=>{h();const{viewer:w}=o,O=w.scene,I=O.camera;return h(),w.scene.primitives.remove(r),I.moveStart.removeEventListener(p),I.moveEnd.removeEventListener(v),window.removeEventListener("resize",y),O.preRender.removeEventListener(x),!0};const d=()=>{const w=i.cesiumObject;r.add(w.particlesComputing.primitives.calculateSpeed),r.add(w.particlesComputing.primitives.updatePosition),r.add(w.particlesComputing.primitives.postProcessingPosition),r.add(w.particlesRendering.primitives.segments),r.add(w.particlesRendering.primitives.trails),r.add(w.particlesRendering.primitives.screen)},h=()=>{const w=i.cesiumObject;r.remove(w.particlesComputing.primitives.calculateSpeed),r.remove(w.particlesComputing.primitives.updatePosition),r.remove(w.particlesComputing.primitives.postProcessingPosition),r.remove(w.particlesRendering.primitives.segments),r.remove(w.particlesRendering.primitives.trails),r.remove(w.particlesRendering.primitives.screen)},p=()=>{r.show=!1},v=()=>{M(),i.cesiumObject.applyViewerParameters(s),r.show=!0};let b=!1;const y=()=>{b=!0,r.show=!1,r.removeAll()},x=()=>{if(b){const{viewer:w}=o,O=w.scene;i.cesiumObject.canvasResize(O.context),b=!1,d(),r.show=!0}},M=()=>{const{viewer:w}=o,O=w.scene,I=O.camera;if(Cesium.defined(e.viewerParameters)&&Cesium.defined(e.viewerParameters.latRange)&&Cesium.defined(e.viewerParameters.lonRange))s.lonRange=ht(e.viewerParameters.lonRange),s.latRange=ht(e.viewerParameters.latRange);else{const D=I.computeViewRectangle(O.globe.ellipsoid),P=jM(D);s.lonRange.x=P.lon.min,s.lonRange.y=P.lon.max,s.latRange.x=P.lat.min,s.latRange.y=P.lat.max}const R=Cesium.defined(e.viewerParameters)&&Cesium.defined(e.viewerParameters.pixelSize)?e.viewerParameters.pixelSize:I.getPixelSize(a,O.drawingBufferWidth,O.drawingBufferHeight);R>0&&(s.pixelSize=R)},g=(w,O)=>{const I=l.closest(w,O);if(Cesium.defined(I))return[e.data.U.array[I],e.data.V.array[I]]};return nt(()=>{u.forEach(w=>w()),u=[]}),Object.assign(i.proxy,{getNearestUV:g}),()=>{var w;return ie(se(((w=i.proxy)==null?void 0:w.$options.name)||"v-if"))}}});const iv={...Ie,name:{type:String,default:"__vc__overlay__dynamic__"},startTime:{type:[Object,String,Date]},stopTime:{type:[Object,String,Date]},currentTime:{type:[Object,String,Date]},clockRange:{type:Number,default:0},clockStep:{type:Number,default:1},shouldAnimate:{type:Boolean,default:!0},canAnimate:{type:Boolean,default:!0},multiplier:{type:Number,default:1},dynamicOverlays:{type:Array,default:()=>[]},defaultInterval:{type:Number,default:3},stopArrivedFlag:{type:String,default:"time"},positionPrecision:{type:Number,default:1e-7},timePrecision:{type:Number,default:.01}},WM={...Ce,"update:currentTime":e=>!0,"update:shouldAnimate":e=>!0,"update:canAnimate":e=>!0,"update:clockRange":e=>!0,"update:clockStep":e=>!0,"update:multiplier":e=>!0,"update:startTime":e=>!0,"update:stopTime":e=>!0,onStop:e=>!0,stopArrived:e=>!0};var nv=K({name:"VcOverlayDynamic",props:iv,emits:WM,setup(e,t){const i=oe();i.cesiumClass="VcOverlayDynamic",i.cesiumEvents=[];const n=Ne(e,t,i);if(n===void 0)return;const{$services:o}=n,s=ee([]),a=ee({}),{emit:r}=t,l=ee(null),c=ee(null);let u,d=[];d.push(de(()=>e.show,g=>{const w=i.cesiumObject;w&&(w.show=g)})),d.push(de(()=>e.name,g=>{const w=i.cesiumObject;w&&(w.name=g)})),d.push(de(()=>e.startTime,g=>{const{viewer:w}=o;Cesium.defined(w)&&g&&(w.clock.startTime=Di(g))})),d.push(de(()=>e.stopTime,g=>{const{viewer:w}=o;Cesium.defined(w)&&g&&(w.clock.stopTime=Di(g))})),d.push(de(()=>e.currentTime,g=>{const{viewer:w}=o;Cesium.defined(w)&&g&&(w.clock.currentTime=Di(g))})),d.push(de(()=>e.multiplier,g=>{const{viewer:w}=o;Cesium.defined(w)&&(w.clock.multiplier=g)})),d.push(de(()=>e.clockStep,g=>{const{viewer:w}=o;Cesium.defined(w)&&(w.clock.clockStep=g)})),d.push(de(()=>e.clockRange,g=>{const{viewer:w}=o;Cesium.defined(w)&&(w.clock.clockRange=g)})),d.push(de(()=>e.canAnimate,g=>{const{viewer:w}=o;Cesium.defined(w)&&(w.clock.canAnimate=g)})),d.push(de(()=>e.shouldAnimate,g=>{const{viewer:w}=o;Cesium.defined(w)&&(w.clock.shouldAnimate=g)})),d.push(de(()=>Ve(e.dynamicOverlays),(g,w)=>{if(!i.mounted)return;const O=i.cesiumObject;if(g.length===w.length){const I=[];for(let R=0;R<g.length;R++){const D=g[R],P=w[R],k=(N,$)=>{if(N!=="nodeTransformations"&&N!=="_definitionChanged")return $};JSON.stringify(D,k)!==JSON.stringify(P,k)&&I.push({newOptions:D,oldOptions:P})}I.forEach(R=>{const D=O.entities.getById(R.oldOptions.id);if(Cesium.defined(D)){if(R.oldOptions.id===R.newOptions.id)D&&Object.keys(R.newOptions).forEach(k=>{R.oldOptions[k]!==R.newOptions[k]&&(D[k]=n.transformProp(k,R.newOptions[k]))});else if(D){O.entities.remove(D),Xc(s.value,N=>N.id===D.id);const k=R.newOptions;p(O,[k])}const P=Yc(s.value,k=>k.id===D.id);if(Cesium.defined(P)){const k=R.oldOptions.sampledPositions,N=R.newOptions.sampledPositions,$=lt(N,k,"id");lt(k,N,"id").forEach(m=>{m.time&&P._sampledPosition.removeSample(m.time)}),$.forEach(m=>{m.time?P.addPosition(m.position,m.time):m.interval&&P.addPosition(m.position,m.interval||e.defaultInterval)})}}})}else{const I=lt(g,w,"id"),R=lt(w,g,"id"),D=[];for(let P=0;P<R.length;P++){const k=O.entities.getById(R[P].id);D.push(k)}D.forEach(P=>{O.entities.remove(P),Xc(s.value,k=>k.id===P.id)}),p(O,I)}},{deep:!0})),i.createCesiumObject=async()=>new Cesium.CustomDataSource(e.name);const h=g=>{let w=Pe(i,"update:currentTime");!Di(e.currentTime).equalsEpsilon(g.currentTime,.001)&&w&&r("update:currentTime",g.currentTime),w=Pe(i,"update:shouldAnimate"),e.shouldAnimate!==g.shouldAnimate&&w&&r("update:shouldAnimate",g.shouldAnimate),w=Pe(i,"update:canAnimate"),e.canAnimate!==g.canAnimate&&w&&r("update:canAnimate",g.canAnimate),w=Pe(i,"update:clockRange"),e.clockRange!==g.clockRange&&w&&r("update:clockRange",g.clockRange),w=Pe(i,"update:clockStep"),e.clockStep!==g.clockStep&&w&&r("update:clockStep",g.clockStep),w=Pe(i,"update:multiplier"),e.multiplier!==g.multiplier&&w&&r("update:multiplier",g.multiplier),w=Pe(i,"update:startTime"),!Di(e.startTime).equalsEpsilon(g.startTime,.001)&&w&&r("update:startTime",g.startTime),w=Pe(i,"update:stopTime"),!Di(e.stopTime).equalsEpsilon(g.stopTime,.001)&&w&&r("update:stopTime",g.stopTime),v(g);const{JulianDate:O,Cartesian3:I}=Cesium;if(w=Pe(i,"stopArrived"),w&&e.shouldAnimate)for(let R=0;R<s.value.length;R++){const D=s.value[R],P=D._sampledPosition.getValue(g.currentTime),k=e.dynamicOverlays[R];for(let N=0;N<k.sampledPositions.length;N++){const $=k.sampledPositions[N],m=tt($.position),f=Di($.time),C=I.equalsEpsilon(P,m,e.positionPrecision),T=O.equalsEpsilon(g.currentTime,f,e.timePrecision);let _=!1;switch(e.stopArrivedFlag){case"time":_=T;break;case"position":_=C;break;case"both":_=T&&C;break;case"or":_=T||C;break}if(_){r("stopArrived",{overlay:D,position:$,offset:u,clock:g,indexOverlay:R,indexPosition:N});break}}}},p=(g,w)=>{for(let O=0;O<w.length;O++){const I=w[O],R=n.transformProps(I),D=new ll(R);s.value.push(D);const P=g.entities.add(D._entity);R.sampledPositions.forEach(k=>{k.time?D.addPosition(k.position,k.time):k.interval&&(k.time=D.addPosition(k.position,k.interval||e.defaultInterval))}),I.id!==P.id&&(I.id=P.id),Ai(P,R,["id"])}};i.mount=async()=>{const{viewer:g}=o,w=i.cesiumObject;return w.show=e.show,p(w,e.dynamicOverlays),g.dataSources.add(w).then(()=>{a.value.startTime=g.clock.startTime,a.value.stopTime=g.clock.stopTime,a.value.currentTime=g.clock.currentTime,a.value.multiplier=g.clock.multiplier,a.value.clockStep=g.clock.clockStep,a.value.clockRange=g.clock.clockRange,a.value.canAnimate=g.clock.canAnimate,a.value.shouldAnimate=g.clock.shouldAnimate,e.startTime&&(g.clock.startTime=Di(e.startTime)),e.stopTime&&(g.clock.stopTime=Di(e.stopTime)),e.currentTime&&(g.clock.currentTime=Di(e.currentTime)),g.clock.multiplier=e.multiplier,g.clock.clockStep=e.clockStep,g.clock.clockRange=e.clockRange,g.clock.canAnimate=!1,g.clock.shouldAnimate=e.shouldAnimate,g.clock.onTick.addEventListener(h);const O=Pe(i,"onStop");return O&&g.clock.onStop.addEventListener(O),!0})},i.unmount=async()=>{const{viewer:g}=o,w=i.cesiumObject;g.dataSources.remove(w,!0),g.clock.startTime=a.value.startTime,g.clock.stopTime=a.value.stopTime,g.clock.multiplier=a.value.multiplier,g.clock.clockStep=a.value.clockStep,g.clock.clockRange=a.value.clockRange,g.clock.canAnimate=a.value.canAnimate,g.clock.shouldAnimate=a.value.shouldAnimate,s.value.length=0,g.clock.onTick.removeEventListener(h);const O=Pe(i,"onStop");return O&&g.clock.onStop.removeEventListener(O),l.value&&(g.trackedEntity=void 0),!0};const v=g=>{var w,O,I,R,D,P,k,N;if(c.value&&l.value){const{viewer:$}=o;if(Cesium.JulianDate.greaterThan(g.currentTime,g.stopTime)){l.value=null;return}const m=l.value._sampledPosition.getValue(g.currentTime);let f=new Cesium.HeadingPitchRange;switch(c.value.mode){case"TP":f.heading=0,f.pitch=((O=(w=c.value)==null?void 0:w.offset)==null?void 0:O.pitch)||Cesium.Math.toRadians(-90),f.range=((R=(I=c.value)==null?void 0:I.offset)==null?void 0:R.range)||1e3;break;case"FP":{const C=Cesium.JulianDate.addSeconds(g.currentTime,.016666666666666666,new Cesium.JulianDate),T=l.value._sampledPosition.getValue(C)||m;m.equals(T)&&u?f=u:(f.heading=Cesium.Math.toRadians(Cu(m,T)),f.pitch=(((P=(D=c.value)==null?void 0:D.offset)==null?void 0:P.pitch)||Cesium.Math.toRadians(-45))+wu(m,T),f.range=((N=(k=c.value)==null?void 0:k.offset)==null?void 0:N.range)||500);break}case"CUSTOM":f=er(c.value.offset)}u=f,$.camera.lookAt(m,f)}},b=(g,w)=>{var O;const{viewer:I}=o;if(w=w||{mode:c.value===null?"FP":"FREE"},w.mode==="FREE"){I.camera.lookAtTransform(Cesium.Matrix4.IDENTITY),l.value&&(I.trackedEntity=void 0,l.value=null,c.value=null);return}l.value=y(g),I.trackedEntity=Mo(l.value._entity),w.mode==="TRACKED"?((O=w==null?void 0:w.viewFrom)!=null&&O.length&&(I.trackedEntity.viewFrom=new Cesium.Cartesian3(w.viewFrom[0],w.viewFrom[1],w.viewFrom[2])),c.value=null):c.value=w},y=g=>g instanceof ll?g:typeof g=="string"?Yc(s.value,w=>w.id===g):typeof g=="number"?s.value[g]:s.value[0],x=(g,w)=>{const{viewer:O}=o;l.value&&(O.trackedEntity=void 0,l.value=null);let I;if(Cesium.defined(g))if(Array.isArray(g))if(g.length){const R=[];g.forEach(D=>{const P=Mo(y(D)._entity);R.push(P)}),I=R}else I=i.cesiumObject;else I=Mo(y(g)._entity);else I=i.cesiumObject;return w=w||{duration:3},Cesium.defined(w.offset)&&(w.offset=er(w.offset)),O.flyTo(I,w)},M=(g,w)=>{const{viewer:O}=o;l.value&&(O.trackedEntity=void 0,l.value=null);let I;if(Cesium.defined(g))if(Array.isArray(g))if(g.length){const R=[];g.forEach(D=>{const P=Mo(y(D)._entity);R.push(P)}),I=R}else I=i.cesiumObject;else I=Mo(y(g)._entity);else I=i.cesiumObject;return O.zoomTo(I,Cesium.defined(w)?er(w):void 0)};return nt(()=>{d.forEach(g=>g()),d=[]}),Object.assign(i.proxy,{getOverlays:()=>s.value,getOverlay:y,trackOverlay:b,zoomToOverlay:M,flyToOverlay:x}),()=>{var g;return ie(se(((g=i.proxy)==null?void 0:g.$options.name)||""))}}});const ov={...Vo,...Ja,...Ie,...Qe,..._i,...Ri,billboards:{type:Array,default:()=>[]}};var av=K({name:"VcCollectionBillboard",props:ov,emits:Si,setup(e,t){const i=oe();i.cesiumClass="BillboardCollection";const n=Nn(e,t,i);let o=[];o.push(de(()=>Ve(e.billboards),(a,r)=>{if(!i.mounted)return;const l=i.cesiumObject;if(a.length===r.length){const c=[];for(let u=0;u<a.length;u++){const d=a[u],h=r[u];JSON.stringify(d)!==JSON.stringify(h)&&c.push({newOptions:d,oldOptions:h})}c.forEach(u=>{const d=l._billboards.find(h=>(h==null?void 0:h.id)===u.oldOptions.id);d&&Object.keys(u.newOptions).forEach(h=>{u.oldOptions[h]!==u.newOptions[h]&&(d[h]=n==null?void 0:n.transformProp(h,u.newOptions[h]))})})}else{const c=lt(a,r,"id"),u=lt(r,a,"id"),d=[];for(let h=0;h<u.length;h++){const p=l._billboards.find(v=>v.id===u[h].id);p&&d.push(p)}d.forEach(h=>{l.remove(h)}),s(l,c)}},{deep:!0})),i.alreadyListening.push("billboards");const s=(a,r)=>{for(let l=0;l<r.length;l++){const c=r[l];c.id=Cesium.defined(c.id)?c.id:Cesium.createGuid();const u=n==null?void 0:n.transformProps(c),d=a.add(u);Ai(d,u)}};return i.createCesiumObject=async()=>{const a=n==null?void 0:n.transformProps(e),r=new Cesium.BillboardCollection(a);return s(r,e.billboards),r},nt(()=>{o.forEach(a=>a()),o=[]}),()=>{var a,r;return t.slots.default?S("i",{class:se(((a=i.proxy)==null?void 0:a.$options.name)||""),style:{display:"none !important"}},Je(t.slots.default)):ie(se(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const sv={...nr,...on,...Tn,...ft,...So,...$t,...Zt,...To,...dn,...Oa,...Zn,...Io,...Sn,...an,...In,...An,...Ie,...Pa,...Dn,...Ao,...Bi,...Qe};var rv=K({name:"VcBillboard",props:sv,emits:Si,setup(e,t){const i=oe();return i.cesiumClass="Billboard",$n(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const lv={brightness:{type:Number,default:1},...on,maximumSize:{type:Object,watcherOptions:{cesiumObjectBuilder:tt}},...Sn,scale:{type:Object,watcherOptions:{cesiumObjectBuilder:ht}},...Ie,slice:{type:Number,default:-1}};var Ds=K({name:"VcCumulusCloud",props:lv,emits:Si,setup(e,t){const i=oe();return i.cesiumClass="CumulusCloud",$n(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const cv={...Ie,noiseDetail:{type:Number,default:16},noiseOffset:{type:Object},debugBillboards:{type:Boolean,default:!1},debugEllipsoids:{type:Boolean,default:!1},clouds:{type:Array,default:()=>[]}};var uv=K({name:"VcCollectionCloud",props:cv,emits:Ce,setup(e,t){var i;const n=oe();n.cesiumClass="CloudCollection";const o=Nn(e,t,n);if(o===void 0)return;n.alreadyListening.push("clouds");let s=[];s.push(de(()=>Ve(e.clouds),(l,c)=>{if(!n.mounted)return;const u=n.cesiumObject;if(l.length===c.length){const d=[];for(let h=0;h<l.length;h++){const p=l[h],v=c[h];JSON.stringify(p)!==JSON.stringify(v)&&d.push({newOptions:p,oldOptions:v})}d.forEach(h=>{const p=u._clouds.find(v=>v.id===h.oldOptions.id);p&&Object.keys(h.newOptions).forEach(v=>{h.oldOptions[v]!==h.newOptions[v]&&(p[v]=o.transformProp(v,h.newOptions[v]))})})}else{const d=lt(l,c,"id"),h=lt(c,l,"id"),p=[];for(let v=0;v<h.length;v++){const b=u._clouds.find(y=>y.id===h[v].id);b&&p.push(b)}p.forEach(v=>{u.remove(v)}),a(u,d)}},{deep:!0}));const a=(l,c)=>{for(let u=0;u<c.length;u++){const d=c[u];d.id=Cesium.defined(d.id)?d.id:Cesium.createGuid();const h=o.transformProps(d,Ds.props),p=l.add(h);Ai(p,h)}};n.createCesiumObject=async()=>{const l=o.transformProps(e,Ds.props),c=new Cesium.CloudCollection(l);return a(c,e.clouds),c},nt(()=>{s.forEach(l=>l()),s=[]});const r=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(r),style:{display:"none !important"}},Je(t.slots.default)):ie(se(r))}});const dv={..._i,...Ri,...Vo,...Ja,...Ie,...Qe,labels:{type:Array,default:()=>[]}};var hv=K({name:"VcCollectionLabel",props:dv,emits:Si,setup(e,t){var i;const n=oe();n.cesiumClass="LabelCollection";const o=Nn(e,t,n);if(o===void 0)return;n.alreadyListening.push("labels");let s=[];s.push(de(()=>Ve(e.labels),(l,c)=>{if(!n.mounted)return;const u=n.cesiumObject;if(l.length===c.length){const d=[];for(let h=0;h<l.length;h++){const p=l[h],v=c[h];JSON.stringify(p)!==JSON.stringify(v)&&d.push({newOptions:p,oldOptions:v})}d.forEach(h=>{const p=u._labels.find(v=>v.id===h.oldOptions.id);p&&Object.keys(h.newOptions).forEach(v=>{h.oldOptions[v]!==h.newOptions[v]&&(p[v]=o.transformProp(v,h.newOptions[v]))})})}else{const d=lt(l,c,"id"),h=lt(c,l,"id"),p=[];for(let v=0;v<h.length;v++){const b=u._labels.find(y=>y.id===h[v].id);b&&p.push(b)}p.forEach(v=>{u.remove(v)}),a(u,d)}},{deep:!0}));const a=(l,c)=>{for(let u=0;u<c.length;u++){const d=c[u];d.id=Cesium.defined(d.id)?d.id:Cesium.createGuid();const h=o.transformProps(d),p=l.add(h);Ai(p,h)}};n.createCesiumObject=async()=>{const l=o.transformProps(e),c=new Cesium.LabelCollection(l);return a(c,e.labels),c},nt(()=>{s.forEach(l=>l()),s=[]});const r=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(r),style:{display:"none !important"}},Je(t.slots.default)):ie(se(r))}});const mv={...lr,...cr,...Tn,...ft,...So,...ur,...ar,...Zt,...To,...dn,...qt,...Jt,...Zn,...Io,...Sn,...In,...An,...Ie,...rr,...sr,...or,totalScale:{type:Number,default:1},...Dn,...Ao,...Qe};var pv=K({name:"VcLabel",props:mv,emits:Si,setup(e,t){const i=oe();return i.cesiumClass="Label",$n(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const vv={..._i,...Ri,...Ja,...Ie,...Qe,points:{type:Array,default:()=>[]}};var fv=K({name:"VcCollectionPoint",props:vv,emits:Si,setup(e,t){const i=oe();i.cesiumClass="PointPrimitiveCollection";const n=Nn(e,t,i);if(n===void 0)return;i.alreadyListening.push("points");let o=[];o.push(de(()=>Ve(e.points),(a,r)=>{if(!i.mounted)return;const l=i.cesiumObject;if(a.length===r.length){const c=[];for(let u=0;u<a.length;u++){const d=a[u],h=r[u];JSON.stringify(d)!==JSON.stringify(h)&&c.push({newOptions:d,oldOptions:h})}c.forEach(u=>{const d=l._pointPrimitives.find(h=>h&&h.id===u.oldOptions.id);d&&Object.keys(u.newOptions).forEach(h=>{u.oldOptions[h]!==u.newOptions[h]&&(d[h]=n.transformProp(h,u.newOptions[h]))})})}else{const c=lt(a,r,"id"),u=lt(r,a,"id"),d=[];for(let h=0;h<u.length;h++){const p=l._pointPrimitives.find(v=>v.id===u[h].id);p&&d.push(p)}d.forEach(h=>{l.remove(h)}),s(l,c)}},{deep:!0}));const s=(a,r)=>{for(let l=0;l<r.length;l++){const c=r[l];c.id=Cesium.defined(c.id)?c.id:Cesium.createGuid();const u=n.transformProps(c),d=a.add(u);Ai(d,u)}};return i.createCesiumObject=async()=>{const a=n.transformProps(e),r=new Cesium.PointPrimitiveCollection(a);return s(r,e.points),r},nt(()=>{o.forEach(a=>a()),o=[]}),()=>{var a,r;return t.slots.default?S("i",{class:se(((a=i.proxy)==null?void 0:a.$options.name)||""),style:{display:"none !important"}},Je(t.slots.default)):ie(se(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const gv={...on,...Tn,...ft,...dn,...qt,...Jt,...wr,...Sn,...An,...Ie,...Dn,...Qe};var yv=K({name:"VcPoint",props:gv,emits:Si,setup(e,t){const i=oe();return i.cesiumClass="PointPrimitive",$n(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const qM={..._i,...Ri,...Ie,...Qe,polylines:{type:Array,default:()=>[]}};var bv=K({name:"VcCollectionPolyline",props:qM,emits:Si,setup(e,t){var i;const n=oe();n.cesiumClass="PolylineCollection";const o=Nn(e,t,n);if(o===void 0)return;n.alreadyListening.push("polylines");let s=[];s.push(de(()=>Ve(e.polylines),(l,c)=>{if(!n.mounted)return;const u=n.cesiumObject;if(l.length===c.length){const d=[];for(let h=0;h<l.length;h++){const p=l[h],v=c[h];JSON.stringify(p)!==JSON.stringify(v)&&d.push({newOptions:p,oldOptions:v})}d.forEach(h=>{const p=u._polylines.find(v=>v.id===h.oldOptions.id);p&&Object.keys(h.newOptions).forEach(v=>{h.oldOptions[v]!==h.newOptions[v]&&(p[v]=o.transformProp(v,h.newOptions[v]))})})}else{const d=lt(l,c,"id"),h=lt(c,l,"id"),p=[];for(let v=0;v<h.length;v++){const b=u._polylines.find(y=>y.id===h[v].id);b&&p.push(b)}p.forEach(v=>{u.remove(v)}),a(u,d)}},{deep:!0}));const a=(l,c)=>{for(let u=0;u<c.length;u++){const d=c[u];d.id=Cesium.defined(d.id)?d.id:Cesium.createGuid();const h=o.transformProps(d),p=l.add(h);Ai(p,h)}};n.createCesiumObject=async()=>{const l=o.transformProps(e),c=new Cesium.PolylineCollection(l);return a(c,e.polylines),c},nt(()=>{s.forEach(l=>l()),s=[]});const r=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(r),style:{display:"none !important"}},Je(t.slots.default)):ie(se(r))}});const Cv={...ft,...dn,...jr,...ii,...ni,...Ie,...Bi,...Qe};var wv=K({name:"VcPolyline",props:Cv,emits:Si,setup(e,t){const i=oe();return i.cesiumClass="Polyline",$n(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const _v={...Ie,destroyPrimitives:{type:Boolean,default:!0},...Qe,polygons:{type:Array,default:()=>[]}};var xv=K({name:"VcCollectionPrimitive",props:_v,emits:Si,setup(e,t){var i;const n=oe();n.cesiumClass="PrimitiveCollection";const o=Nn(e,t,n);if(o===void 0)return;n.alreadyListening.push("polygons");let s=[];s.push(de(()=>Ve(e.polygons),(l,c)=>{if(!n.mounted)return;const u=n.cesiumObject;if(l.length===c.length){const d=[];for(let h=0;h<l.length;h++){const p=l[h],v=c[h];JSON.stringify(p)!==JSON.stringify(v)&&d.push({newOptions:p,oldOptions:v})}d.forEach(h=>{const p=u._primitives.find(v=>v._id===h.oldOptions.id);p&&Object.keys(h.newOptions).forEach(v=>{h.oldOptions[v]!==h.newOptions[v]&&(p[v]=o.transformProp(v,h.newOptions[v]))})})}else{const d=lt(l,c,"id"),h=lt(c,l,"id"),p=[];for(let v=0;v<h.length;v++){const b=u._primitives.find(y=>y.id===h[v].id);b&&p.push(b)}p.forEach(v=>{u.remove(v)}),a(u,d)}},{deep:!0}));const a=(l,c)=>{for(let u=0;u<c.length;u++){const d=c[u];d.id=Cesium.defined(d.id)?d.id:Cesium.createGuid();const h=o.transformProps(d),p=new rl(h);p._vcParent=l,Ai(p,h),l.add(p)}};n.createCesiumObject=async()=>{const l=o.transformProps(e),c=new Cesium.PrimitiveCollection(l);return a(c,e.polygons),c},nt(()=>{s.forEach(l=>l()),s=[]});const r=((i=n.proxy)==null?void 0:i.$options.name)||"";return()=>t.slots.default?S("i",{class:se(r),style:{display:"none !important"}},Je(t.slots.default)):ie(se(r))}});const Ev={...ni,...kn,...eo,...Lr,...Ie,...dn,...sn,...Fi,...Lo,...$e,...jn,...Fn,...Qe};var Mv=K({name:"VcPolygon",props:Ev,emits:Si,setup(e,t){const i=oe();i.cesiumClass="PolygonPrimitive";const n=$n(e,t,i);if(n===void 0)return;let o=[];return o.push(de(()=>e.clampToGround,s=>{const a=i.cesiumObject;a&&(a.clampToGround=s)})),o.push(de(()=>e.positions,s=>{const a=i.cesiumObject;a&&(a.positions=Ci(s))})),o.push(de(()=>e.polygonHierarchy,s=>{const a=i.cesiumObject;a&&(a.polygonHierarchy=Zs(s))})),o.push(de(()=>e.appearance,s=>{const a=i.cesiumObject;a&&(a.appearance=Ma.call(i,s))})),o.push(de(()=>e.depthFailAppearance,s=>{const a=i.cesiumObject;a&&(a.depthFailAppearance=Ma.call(i,s))})),o.push(de(()=>e.show,s=>{const a=i.cesiumObject;a&&(a.show=s)})),o.push(de(()=>e.classificationType,s=>{const a=i.cesiumObject;a&&(a.classificationType=s)})),i.createCesiumObject=async()=>{const s=n.transformProps(e);return new rl(s)},i.mount=async()=>{const s=n.$services.primitives,a=i.cesiumObject;return a._vcParent=s,s&&s.add(a)},i.unmount=async()=>{const s=n.$services.primitives,a=i.cesiumObject;return s&&!s.isDestroyed()&&s.remove(a)},nt(()=>{o.forEach(s=>s()),o=[]}),()=>{var s;return ie(se(((s=i.proxy)==null?void 0:s.$options.name)||""))}}});const QM=[av,uv,hv,fv,bv,xv,Ds,rv,pv,yv,wv,Mv];QM.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Sc=av,Ov=uv,bo=hv,Co=fv,Pv=bv,Hn=xv,Sv=rv,Tv=Ds,Iv=pv,Av=yv,Dv=wv,Wn=Mv,Bv={geometry:Object,..._i,...dn,attributes:Object},ZM={...Ce,"update:geometry":e=>!0};var Bs=K({name:"VcGeometryInstance",props:Bv,emits:ZM,setup(e,t){const i=oe();i.renderByParent=!0,i.cesiumClass="GeometryInstance",i.cesiumEvents=[];const n=Ne(e,t,i);if(n===void 0)return;const{emit:o}=t,s=ee(0);i.createCesiumObject=async()=>{const r=n.transformProps(e);return r.geometry||(r.geometry=new Cesium.Geometry({attributes:new Cesium.GeometryAttributes})),new Cesium.GeometryInstance(r)},i.mount=async()=>{var r;const l=Pt(i).proxy;l.__childCount!==void 0&&(s.value=l.__childCount.value||0,l.__childCount.value+=1);const c=i.cesiumObject;return(r=l.__updateGeometryInstances)==null||r.call(l,c,s.value),!0},i.unmount=async()=>{var r;const l=i.cesiumObject,c=Pt(i).proxy;return(r=c.__removeGeometryInstances)==null||r.call(c,l),!0};const a=r=>{if(Pe(i,"update:geometry"))o("update:geometry",r);else{const l=i.cesiumObject;l.geometry=r}return!0};return en(Vi,(()=>On(n.getServices(),{get geometryInstance(){return i.cesiumObject}}))()),Object.assign(i.proxy,{__updateGeometry:a}),()=>{var r,l;return t.slots.default?S("i",{class:se(((r=i.proxy)==null?void 0:r.$options.name)||""),style:{display:"none !important"}},Je(t.slots.default)):ie(se(((l=i.proxy)==null?void 0:l.$options.name)||"v-if"))}}});Bs.install=e=>{e.component(Bs.name,Bs)};const Lv=Bs,_n=Lv,jv={...Sa,...Vt};var Fv=K({name:"VcGeometryBox",props:jv,emits:Ce,setup(e,t){const i=oe();i.cesiumClass="BoxGeometry";const n=He(e,t,i);return i.createCesiumObject=async()=>{const o=n==null?void 0:n.transformProps(e);return Cesium.BoxGeometry.fromDimensions(o)},()=>{var o;return ie(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const kv={...Sa};var Rv=K({name:"VcGeometryBoxOutline",props:kv,emits:Ce,setup(e,t){const i=oe();i.cesiumClass="BoxOutlineGeometry";const n=He(e,t,i);return i.createCesiumObject=async()=>{const o=n==null?void 0:n.transformProps(e);return Cesium.BoxOutlineGeometry.fromDimensions(o)},()=>{var o;return ie(se(((o=i.proxy)==null?void 0:o.$options.name)||"v-if"))}}});const $v={...zo,...Go,...$e,...$t,...st,...Vt,...Xt,...zi};var Nv=K({name:"VcGeometryCircle",props:$v,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="CircleGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Vv={...zo,...Go,...$e,...$t,...st,...Xt,...Xn};var zv=K({name:"VcGeometryCircleOutline",props:Vv,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="CircleOutlineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Gv={...kn,...$e,...Vt,...zi};var Uv=K({name:"VcGeometryPolygonCoplanar",props:Gv,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="CoplanarPolygonGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Hv={...kn};var Wv=K({name:"VcGeometryPolygonCoplanarOutline",props:Hv,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="CoplanarPolygonOutlineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const qv={...ni,...Bi,...$e,...st,...$t,...Xt,...Vt,...Bn};var Qv=K({name:"VcGeometryCorridor",props:qv,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="CorridorGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Zv={...ni,...Bi,...$e,...st,...$t,...Xt,...Bn};var Jv=K({name:"VcGeometryCorridorOutline",props:Zv,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="CorridorOutlineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Xv={...Ta,...Ia,...Aa,...Da,...Vt};var Yv=K({name:"VcGeometryCylinder",props:Xv,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="CylinderGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Kv={...Ta,...Ia,...Aa,...Da,...Xn};var ef=K({name:"VcGeometryCylinderOutline",props:Kv,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="CylinderOutlineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const tf={...zo,...Ba,...La,...$e,...$t,...Xt,...an,...zi,...st,...Vt};var nf=K({name:"VcGeometryEllipse",props:tf,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="EllipseGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const of={...zo,...Ba,...La,...$e,...$t,...Xt,...an,...zi,...st,...Xn};var af=K({name:"VcGeometryEllipseOutline",props:of,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="EllipseOutlineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const sf={...ja,...Fa,...ka,...Ra,...$a,...Na,...Yn,...Kn,...Vt};var rf=K({name:"VcGeometryEllipsoid",props:sf,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="EllipsoidGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const JM={...ja,...Fa,...ka,...Ra,...$a,...Na,...Yn,...Kn,...Va};var lf=K({name:"VcGeometryEllipsoidOutline",props:JM,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="EllipsoidOutlineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const cf={...kr,...Rr,...ir,...Vt};var uf=K({name:"VcGeometryFrustum",props:cf,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="FrustumGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const df={...kr,...Rr,...ir};var hf=K({name:"VcGeometryFrustumOutline",props:df,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="FrustumOutlineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const mf={...ni,...Bi,...st,...jr,...sn};var pf=K({name:"VcGeometryGroundPolyline",props:mf,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="GroundPolylineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const vf={...Vt};var ff=K({name:"VcGeometryPlane",props:vf,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="PlaneGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}}),gf=K({name:"VcGeometryPlaneOutline",emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="PlaneOutlineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const yf={...kn,...$t,...Xt,...Vt,...zi,...$e,...st,...Ga,..._r,...xr,...sn};var bf=K({name:"VcGeometryPolygon",props:yf,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="PolygonGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Cf={...kn,...$t,...Xt,...Vt,...$e,...st,...Ga,...sn};var wf=K({name:"VcGeometryPolygonOutline",props:Cf,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="PolygonOutlineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const _f={...ni,...Bi,...Hr,colorsPerVertex:{type:Boolean,default:!1},...sn,...st,...Vt,...$e};var xf=K({name:"VcGeometryPolyline",props:_f,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="PolylineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Ef={...Nr,...$r,...$e,...st,...Vt,...Bn};var Mf=K({name:"VcGeometryPolylineVolume",props:Ef,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="PolylineVolumeGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Of={...Nr,...$r,...$e,...st,...Bn};var Pf=K({name:"VcGeometryPolylineVolumeOutline",props:Of,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="PolylineVolumeOutlineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Sf={...Dt,...Vt,...$e,...st,...$t,...an,...zi,...Xt};var Tf=K({name:"VcGeometryRectangle",props:Sf,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="RectangleGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const If={...Dt,...$e,...st,...$t,...an,...Xt};var Af=K({name:"VcGeometryRectangleOutline",props:If,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="RectangleOutlineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Df={...ni,...Hr,colorsPerVertex:{type:Boolean,default:!1},...sn,...st,...$e};var Bf=K({name:"VcGeometrySimplePolyline",props:Df,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="SimplePolylineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Lf={...Go,...Yn,...Kn,...Vt};var jf=K({name:"VcGeometrySphere",props:Lf,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="SphereGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Ff={...Go,...Yn,...Kn,...Va};var kf=K({name:"VcGeometrySphereOutline",props:Ff,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="SphereOutlineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Rf={...ni,...st,...Ha,...Ua,...$e,...Vt};var $f=K({name:"VcGeometryWall",props:Rf,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="WallGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Nf={...ni,...st,...Ha,...Ua,...$e};var Vf=K({name:"VcGeometryWallOutline",props:Nf,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="WallOutlineGeometry",He(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const XM=[Fv,Rv,Nv,zv,Uv,Wv,Qv,Jv,Yv,ef,nf,af,rf,lf,uf,hf,pf,ff,gf,bf,wf,xf,Mf,Pf,Tf,Af,Bf,jf,kf,$f,Vf];XM.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const zf=Fv,Gf=Rv,Uf=Nv,Hf=zv,Wf=Uv,qf=Wv,Qf=Qv,Zf=Jv,Jf=Yv,Xf=ef,Yf=nf,Kf=af,e0=rf,t0=lf,i0=uf,n0=hf,Ls=pf,o0=ff,a0=gf,Tc=bf,s0=wf,xn=xf,r0=Mf,l0=Pf,c0=Tf,u0=Af,d0=Bf,h0=jf,m0=kf,p0=$f,v0=Vf;var li=63710088e-1,YM={centimeters:li*100,centimetres:li*100,degrees:li/111325,feet:li*3.28084,inches:li*39.37,kilometers:li/1e3,kilometres:li/1e3,meters:li,metres:li,miles:li/1609.344,millimeters:li*1e3,millimetres:li*1e3,nauticalmiles:li/1852,radians:1,yards:li*1.0936};function f0(e,t,i){i===void 0&&(i={});var n={type:"Feature"};return(i.id===0||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=t||{},n.geometry=e,n}function KM(e,t,i){if(i===void 0&&(i={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!y0(e[0])||!y0(e[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:e};return f0(n,t,i)}function eO(e,t,i){i===void 0&&(i={});for(var n=0,o=e;n<o.length;n++){var s=o[n];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}var r={type:"Polygon",coordinates:e};return f0(r,t,i)}function tO(e,t){t===void 0&&(t="kilometers");var i=YM[t];if(!i)throw new Error(t+" units is invalid");return e/i}function g0(e){var t=e%(2*Math.PI);return t*180/Math.PI}function Ic(e){var t=e%360;return t*Math.PI/180}function y0(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function iO(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if(e.type==="Feature"&&e.geometry!==null&&e.geometry.type==="Point")return e.geometry.coordinates;if(e.type==="Point")return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function nO(e,t,i,n){n===void 0&&(n={});var o=iO(e),s=Ic(o[0]),a=Ic(o[1]),r=Ic(i),l=tO(t,n.units),c=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(r)),u=s+Math.atan2(Math.sin(r)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(c)),d=g0(u),h=g0(c);return KM([d,h],n.properties)}function oO(e,t,i){i===void 0&&(i={});for(var n=i.steps||64,o=i.properties?i.properties:!Array.isArray(e)&&e.type==="Feature"&&e.properties?e.properties:{},s=[],a=0;a<n;a++)s.push(nO(e,t,a*-360/n,i).geometry.coordinates);return s.push(s[0]),eO([s],o)}const b0={color:"#409eff",pixelSize:8,outlineColor:"rgba(0,0,0,0.6)",outlineWidth:1,disableDepthTestDistance:Number.POSITIVE_INFINITY},C0={enableMouseEvent:!1,asynchronous:!1,allowPicking:!0},w0={width:2,show:!0},_0={pixelOffset:[20,0],showBackground:!0,backgroundColor:"rgba(0,0,0,1)",enableMouseEvent:!1},x0={typhoonRoutes:{type:Array},clampToGround:{type:Boolean,default:!1},radius7Color:{type:String,default:"rgba(68, 255, 230, 0.3)"},radius10Color:{type:String,default:"rgba(32, 237, 39, 0.3)"},radius12Color:{type:String,default:"rgba(255, 247, 16, 0.3)"},pointProps:{type:[Object,Function],default:()=>b0},linePrimitiveProps:{type:[Object,Function],default:()=>C0},lineGeometryProps:{type:[Object,Function],default:()=>w0},labelProps:{type:[Object,Function],default:()=>_0},circleOverlayPosition:{type:[String,Function],default:"-175px"},setsArray:{type:Array,default:()=>["\u4E2D\u592E\u53F0","\u65E5\u672C","\u7F8E\u56FD","\u97E9\u56FD","\u4E2D\u56FD\u9999\u6E2F"]}},aO={...Ce,mouseover:e=>!0,mouseout:e=>!0,click:e=>!0,clickout:e=>!0,forecastRouteAdded:e=>!0};var E0=K({name:"VcOverlayTyphoon",props:x0,emits:aO,setup(e,t){const i=oe();i.cesiumClass="VcOverlayTyphoon",i.cesiumEvents=[];const n=Ne(e,t,i);if(n===void 0)return;const{$services:o}=n,s=Po(i),{t:a}=Ct(),r=ee(null),l=Ee([]);i.createCesiumObject=async()=>r;const c=(g,w)=>{w.playIndex=g;const O=w.typhoonRoute.points[g];O.type="live",O.index=g,O.tfbh=w.name;const I=[O.lng,O.lat];w.positions.push(I);const R=typeof e.pointProps=="function"?at(Ve(b0),e.pointProps(O)):e.pointProps;w.points.push({id:O.id||Cesium.createGuid(),position:I,onMouseover(P){t.emit("mouseover",P)},onMouseout(P){t.emit("mouseout",P)},onClick(P){d(O,w,g,!0),w.playIndex=O.index,t.emit("click",P)},onClickout(P){t.emit("clickout",P)},...R,...O});const D=w.points[g];D&&w.colors.push(D.color),g===w.typhoonRoute.points.length-1&&d(O,w,g)},u=g=>{const w=l.findIndex(O=>O.name===g);if(w>=0){let O=0;const I=l[w];I.points.length=0,I.positions.length=0;const R=I.typhoonRoute;c(O,I),cancelAnimationFrame(I.playInterval);const D=()=>{O++,O>=R.points.length?cancelAnimationFrame(I.playInterval):c(O,I),I.playInterval=requestAnimationFrame(D)};I.playInterval=requestAnimationFrame(D)}else s.warn(a("vc.typhoon.warn")||"\u64AD\u653E\u53F0\u98CE\u5931\u8D25\uFF0C\u539F\u56E0\uFF1A\u672A\u627E\u5230\u5BF9\u5E94\u7F16\u53F7\u7684\u53F0\u98CE\u6570\u636E\u3002")},d=(g,w,O,I=!1)=>{w.children.length=0;let R=I?g.forecast||[]:[];if(!I)for(let D=0;D<e.setsArray.length;D++){const P=(k,N)=>{const $=(k==null?void 0:k.forecast)||[];if(R.push(...$),I)return;R=Jb(R,(C,T)=>C.sets===T.sets);const m=e.setsArray[D],f=R.findIndex(C=>C.sets===m);if(f>-1)R[f].unshifted||(R[f].points.unshift({lat:k.lat,lng:k.lng}),R[f].unshifted=!0);else if(N>0){const C=w.typhoonRoute.points[N-1];P(C,N-1)}};P(g,O)}if(!(!R||R.length<=0)){for(let D=0;D<R.length;D++){const P=R[D],k=[],N=[],$={name:w.name+"_"+P.sets,typhoonRoute:P,show:!0,positions:N,points:k,type:"forc"};w.children.push($),P.points.forEach((m,f)=>{const C=[m.lng,m.lat];$.positions.push(C),f===0&&I&&$.positions.unshift([g.lng,g.lat]),m.sets=P.sets,m.type="forc",m.index=f;const T=typeof e.pointProps=="function"?e.pointProps(m):e.pointProps;f!==0&&$.points.push({id:m.id||Cesium.createGuid(),position:C,onMouseover(_){t.emit("mouseover",_)},onMouseout(_){t.emit("mouseout",_)},onClick(_){t.emit("click",_)},...T,...m})})}t.emit("forecastRouteAdded",{livePoint:g,datasource:w,addedByClick:I})}},h=g=>{const w=[],O=[],I={name:g.tfbh,typhoonRoute:g,show:!0,positions:O,points:w,children:[],colors:[],type:"live"};return l.push(I),u(g.tfbh),I},p=(g,w)=>{const O=[];typeof g=="string"?O.push(g):O.push(...g);let I=null;O.forEach(R=>{var D;const P=[],k=l.find(m=>m.name===R);k&&k.typhoonRoute.points&&k.typhoonRoute.points.forEach(m=>{P.push([m.lng,m.lat])}),(D=k==null?void 0:k.children)!=null&&D.length&&k.children.forEach(m=>{m.typhoonRoute.points.forEach(f=>{P.push([f.lng,f.lat])})});const N=Ci(P),$=Cesium.BoundingSphere.fromPoints(N);I===null?I=$:I=Cesium.BoundingSphere.union(I,$)}),o.viewer.camera.flyToBoundingSphere(new Cesium.BoundingSphere(I.center,I.radius),{...w})},v=g=>{const w=l.indexOf(g);w>=0&&(clearInterval(g.playInterval),l.splice(w,1))},b=()=>{l.forEach(g=>{clearInterval(g.playInterval)}),l.length=0},y=(g,w)=>{let O=[];if(typeof w=="number")O=oO(g,w*1e3,{units:"meters"}).geometry.coordinates;else if(w.ne){const I={0:"ne",1:"nw",2:"sw",3:"se"};for(let R=0;R<4;R++){let D=parseFloat(w[I[R]])*1e3;D||(D=0);for(let P=R*15;P<=(R+1)*15;P++){const k=6*P,N=g[0]+D*Math.cos(k*Math.PI/180)/111e3,$=g[1]+D*Math.sin(k*Math.PI/180)/111e3;O.push([N,$])}}}return O},x=(g,w)=>{const O=[];return g.forEach(I=>{if(I.positions.length>1){const R=typeof e.linePrimitiveProps=="function"?at(Ve(C0),e.linePrimitiveProps(I)):e.linePrimitiveProps,D=typeof e.lineGeometryProps=="function"?at(Ve(w0),e.lineGeometryProps(I)):e.lineGeometryProps;O.push(S(wn,{show:I.show,appearance:{type:I.type==="live"?"PolylineColorAppearance":"PolylineMaterialAppearance",options:{material:I.type==="live"?void 0:{fabric:{type:"PolylineDash",uniforms:{color:"#000000"}}},translucent:!0}},onMouseover:P=>{t.emit("mouseover",P)},onMouseout:P=>{t.emit("mouseout",P)},onClick:P=>{t.emit("click",P)},onClickout:P=>{t.emit("clickout",P)},...R},()=>S(_n,{id:I.name||Cesium.createGuid()},()=>S(xn,{positions:Ci(I.positions),colors:I.colors,...D}))))}if(I.points.length&&O.push(S(Co,{show:I.show,points:I.points,onReady:R=>{const{cesiumObject:D}=R,P=D.update;D.update=function(k){const N=k.commandList.length;P.call(this,k);const $=k.commandList.length;for(let m=N;m<$;++m)k.commandList[m].pass=Cesium.Pass.TRANSLUCENT,k.commandList[m].renderState=Cesium.RenderState.fromCache({depthTest:{enabled:!1},depthMask:!1})}}})),I.type==="live"){const R=typeof e.labelProps=="function"?at(Ve(_0),e.labelProps(I)):e.labelProps;O.push(S(bo,{show:I.show,enableMouseEvent:!1,labels:[{text:I.typhoonRoute.name,position:I.positions[0],...R}]}));const D=I.points[I.playIndex];w.length=w.push(S(Cc,{show:I.show,position:D.position,autoHidden:!0},()=>S("div",{class:"vc-typhoon-circle",style:{backgroundPosition:typeof e.circleOverlayPosition=="function"?e.circleOverlayPosition(D):e.circleOverlayPosition}}))),(D==null?void 0:D.radius7)>0&&O.push(S(Wn,{show:I.show,positions:y(D.position,D.radius7_quad),clampToGround:e.clampToGround,asynchronous:!1,allowPicking:!1,enableMouseEvent:!1,classificationType:2,appearance:{type:"MaterialAppearance",options:{material:{fabric:{type:"Color",uniforms:{color:e.radius7Color}}}}},onReady:M})),(D==null?void 0:D.radius10)>0&&O.push(S(Wn,{show:I.show,positions:y(D.position,D.radius10_quad),clampToGround:e.clampToGround,asynchronous:!1,allowPicking:!1,enableMouseEvent:!1,classificationType:2,appearance:{type:"MaterialAppearance",options:{material:{fabric:{type:"Color",uniforms:{color:e.radius10Color}}}}},onReady:M})),(D==null?void 0:D.radius12)>0&&O.push(S(Wn,{show:I.show,positions:y(D.position,D.radius12_quad),clampToGround:e.clampToGround,asynchronous:!1,allowPicking:!1,enableMouseEvent:!1,classificationType:2,appearance:{type:"MaterialAppearance",options:{material:{fabric:{type:"Color",uniforms:{color:e.radius12Color}}}}},onReady:M}))}I.children&&O.push(...x(I.children,w))}),O},M=g=>{const w=g.cesiumObject,O=w.update;w.update=function(I){const R=I.commandList.length;O.call(this,I);const D=I.commandList.length;for(let P=R;P<D;++P)I.commandList[P].pass===Cesium.Pass.TRANSLUCENT&&(I.commandList[P].pass=Cesium.Pass.OPAQUE,I.commandList[P].renderState=Cesium.RenderState.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Cesium.BlendingState.ALPHA_BLEND}))}};return Object.assign(i.proxy,{addTyphoonRoute:h,playTyphoonRoute:u,flyToTyphoonRoute:p,showForecast:d,removeTyphoonData:v,removeAllTyphoonData:b,getTyphoonDatasources:()=>l}),e.typhoonRoutes.forEach(g=>{h(g)}),()=>{const g=[],w=x(l,g);return[S(Hn,{ref:r,show:!0},()=>w),...g]}}});const sO=[Cc,qp,Zp,tv,nv,E0];sO.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const En=Cc,M0=qp,O0=Zp,P0=tv,S0=nv,T0=E0;function Ac(e,t,i,n,o){i.cesiumClass=n,i.cesiumEvents=[];const{t:s}=Ct(),{emit:a}=t,r=se(n).split("-");n==="VcMeasurementDistance"&&e.showComponentLines&&(r[2]="component-distance"),(n==="VcDrawingRegular"||n==="VcMeasurementRegular")&&(e.edge===4&&(r[2]="rectangle"),e.edge===360&&(r[2]="circle"));let l=r[2];r[3]&&(l=`${r[2]}-${r[3]}`);const c=ee(""),u=ae(()=>({drawingTipStart:e.drawtip.drawingTipStart||s(`${r[0]}.${r[1]}.${r[2]}.drawingTipStart`),drawingTipEnd:e.drawtip.drawingTipEnd||s(`${r[0]}.${r[1]}.${r[2]}.drawingTipEnd`),drawingTipEditing:e.drawtip.drawingTipEditing||s(`${r[0]}.${r[1]}.${r[2]}.drawingTipEditing`)})),d=ee(Me.BeforeDraw),h=ee(!1),p=ee([0,0,0]),v=ee(!1),b=ee([0,0,0]),y=ee(null),x=ee(null),M=ee(null),g=ee(""),{registerTimeout:w,removeTimeout:O}=Zr();return i.createCesiumObject=async()=>M,{drawingType:l,drawTip:c,drawTipOpts:u,drawStatus:d,canShowDrawTip:h,drawTipPosition:p,showEditor:v,editorPosition:b,mouseoverPoint:y,editingPoint:x,primitiveCollectionRef:M,editorType:g,onMouseoverPoints:I=>{var R,D;const{drawingHandlerActive:P,viewer:k}=o;e.editable&&d.value!==Me.Drawing&&P&&(I.pickedFeature.primitive.pixelSize=((R=e.pointOpts)==null?void 0:R.pixelSize)*1.5,O(),w(()=>{y.value=I.pickedFeature.primitive,b.value=I.pickedFeature.primitive.position,v.value=!0,h.value=!1,p.value=[0,0,0]},(D=e.editorOpts)==null?void 0:D.delay)),a("mouseEvt",{type:I.type,name:l,target:I},k)},onMouseoutPoints:I=>{var R,D;const{viewer:P,selectedDrawingActionInstance:k}=o;e.editable&&(I.pickedFeature.primitive.pixelSize=((R=e.pointOpts)==null?void 0:R.pixelSize)*1,O(),w(()=>{b.value=[0,0,0],y.value=void 0,v.value=!1},(D=e.editorOpts)==null?void 0:D.hideDelay),k&&(h.value=!0)),a("mouseEvt",{type:I.type,name:l,target:I},P)},onMouseenterEditor:I=>{O()},onMouseleaveEditor:I=>{var R;O(),w(()=>{var D;b.value=[0,0,0],y.value.pixelSize=((D=e.pointOpts)==null?void 0:D.pixelSize)*1,y.value=void 0,v.value=!1},(R=e.editorOpts)==null?void 0:R.hideDelay)},onPrimitiveCollectionReady:I=>{I.cesiumObject._vcId=n},onVcCollectionPointReady:function(I){const{cesiumObject:R}=I,D=R.update;R.update=function(P){const k=P.commandList.length;D.call(this,P);const N=P.commandList.length;for(let $=k;$<N;++$)P.commandList[$].pass=Cesium.Pass.TRANSLUCENT,P.commandList[$].renderState=Cesium.RenderState.fromCache({depthTest:{enabled:!1},depthMask:!1})}},onVcPrimitiveReady:I=>{if(e.disableDepthTest)return;const R=I.cesiumObject,D=R.update;R.update=function(P){const k=P.commandList.length;D.call(this,P);const N=P.commandList.length;for(let $=k;$<N;++$)P.commandList[$].pass===Cesium.Pass.TRANSLUCENT&&(P.commandList[$].pass=Cesium.Pass.OPAQUE,P.commandList[$].renderState=Cesium.RenderState.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Cesium.BlendingState.ALPHA_BLEND}))}},onVcCollectionLabelReady:I=>{if(e.disableDepthTest)return;const R=I.cesiumObject,D=R.update;R.update=function(P){const k=P.commandList.length;D.call(this,P);const N=P.commandList.length;for(let $=k;$<N;++$)P.commandList[$].pass=Cesium.Pass.OVERLAY,P.commandList[$].renderState=Cesium.RenderState.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:Cesium.BlendingState.ALPHA_BLEND})}}}}function ln(e,t,i){const n=oe(),o=Ne(e,t,n);if(o===void 0)return;const{t:s}=Ct(),a=o.$services,{emit:r}=t,{drawingType:l,drawTip:c,drawTipOpts:u,drawStatus:d,canShowDrawTip:h,drawTipPosition:p,showEditor:v,editorPosition:b,mouseoverPoint:y,editingPoint:x,primitiveCollectionRef:M,editorType:g,onMouseoverPoints:w,onMouseoutPoints:O,onMouseenterEditor:I,onMouseleaveEditor:R,onPrimitiveCollectionReady:D,onVcCollectionPointReady:P,onVcCollectionLabelReady:k,onVcPrimitiveReady:N}=Ac(e,t,n,i,a),$=ee([]);e.preRenderDatas&&e.preRenderDatas.length&&e.preRenderDatas.forEach(V=>{const j={positions:Ci(V),show:!0,drawStatus:Me.AfterDraw,distance:0,labels:[],pointOpts:{},labelOpts:{},labelsOpts:{},polylineOpts:{},primitiveOpts:{},polygonOpts:{}};i==="VcMeasurementVertical"&&Object.assign(j,{draggingPlane:new Cesium.Plane(Cesium.Cartesian3.UNIT_X,0),surfaceNormal:new Cesium.Cartesian3}),$.value.push(j)});let m;const f=ae(()=>{const V=[],{Cartesian3:j,Cartographic:G,Rectangle:J,createGuid:U,defined:z,Math:Y,Ray:Q}=Cesium,{viewer:te}=a;return $.value.forEach(X=>{var ne,re,pe,be,he,ye,we,ge,ve,Se,W,le,_e,ue,Xe,kt,Fe,ce,Ae;const Le=X.positions[0],De=X.positions[1];if(j.equals(Le,De))return;const Re=Ee([]),rt=((ne=e.polylineOpts)==null?void 0:ne.arcType)===0?j.distance(Le,De):Ks(Le,De,a.viewer.scene.globe.ellipsoid),Ye=j.midpoint(Le,De,{}),Ke=Cu(Le,De),zb=wu(Le,De);X.points=X.positions.map(vt=>({position:vt}));const Ze={...X,distance:rt,heading:Ke,pitch:zb},Gc=Object.assign({},e.labelOpts,Ze.labelOpts);if(i==="VcDrawingRectangle"||i==="VcMeasurementRectangle"){const vt=G.fromCartesian(Le,te.scene.globe.ellipsoid),Ge=G.fromCartesian(De,te.scene.globe.ellipsoid),Wt=vt.height;!e.clampToGround&&(Ge.height=Wt);const Ue=J.fromCartesianArray(X.positions,te.scene.globe.ellipsoid),Ot=[Ue.west,Ue.north,Wt,Ue.east,Ue.north,Wt,Ue.east,Ue.south,Wt,Ue.west,Ue.south,Wt,Ue.west,Ue.north,Wt],cn=j.fromRadiansArrayHeights(Ot,te.scene.globe.ellipsoid);Object.assign(Ze,{polygonPositions:cn,height:Wt})}else if(i==="VcDrawingRegular"||i==="VcMeasurementRegular"){const vt=X.positions[0],Ge=X.positions[1],Wt=T1(vt,Ge,te.scene);if(!ui(Wt)&&z(Wt)){const Ue=[],Ot=G.fromCartesian(vt,te.scene.globe.ellipsoid),cn=G.fromCartesian(Ge,te.scene.globe.ellipsoid);!e.clampToGround&&(cn.height=Ot.height),Ue.push(G.toCartesian(cn,te.scene.globe.ellipsoid));for(let Qn=0;Qn<(e.edge||4)-1;Qn++){const Vs=I1(vt,Wt.heading+=Math.PI*2/(e.edge||4),rt,te.scene.globe.ellipsoid);Ue.push(Vs)}Object.assign(Ze,{polygonPositions:Ue,height:Ot.height})}}else if(i==="VcAnalysisViewshed")Object.assign(Ze.viewshedOpts,{startPosition:Le,endPosition:De});else if(i==="VcAnalysisSightline")if(e.sightlineType==="segment"){const vt=[];vt.push(Le);const Ge=[];M.value.cesiumObject._primitives.forEach(Ot=>{Ot instanceof Cesium.PointPrimitiveCollection&&Ge.push(...Ot._pointPrimitives),Ot instanceof Cesium.Primitive&&Ge.push(Ot)});const Wt=_u(Le,De,a.viewer,Ge);z(Wt)&&vt.push(Wt),vt.push(De);let Ue=0;for(let Ot=0;Ot<vt.length-1;Ot++){const cn=j.distance(vt[Ot],vt[Ot+1]);Ue=Ue+cn}Object.assign(Ze,{positions:vt,distance:Ue})}else e.sightlineType;else Re.push({position:Ye,id:U(),text:mt.distanceToString(rt,(re=e.measureUnits)==null?void 0:re.distanceUnits,e.locale,(pe=e.decimals)==null?void 0:pe.distance),...Gc});if(Ze.polygonPositions&&Ze.polygonPositions.length){const vt=Object.assign({},e.labelsOpts,Ze.labelsOpts),Ge=Ze.polygonPositions.slice();e.loop&&Ge.length>2&&Ge.push(Ge[0]);for(let Ue=0;Ue<Ge.length-1;Ue++){let Ot=0;if(((be=e.polylineOpts)==null?void 0:be.arcType)===0?Ot=Ks(Ge[Ue],Ge[Ue+1],a.viewer.scene.globe.ellipsoid):Ot=j.distance(Ge[Ue],Ge[Ue+1]),Ot>0&&Ge.length>2&&e.showDistanceLabel&&Re.push({text:mt.distanceToString(Ot,(he=e.measureUnits)==null?void 0:he.distanceUnits,e.locale,(ye=e.decimals)==null?void 0:ye.distance),position:j.midpoint(Ge[Ue],Ge[Ue+1],{}),id:U(),...vt}),Ge.length>2&&e.showAngleLabel&&(Ue>0||e.loop)){const cn=Ge[Ue===0?Ge.length-2:Ue-1],Qn=Ge[Ue],Vs=Ge[Ue+1],Uc=j.subtract(cn,Qn,{}),Hc=j.subtract(Vs,Qn,{});let Wc=0;j.ZERO.equals(Uc)||j.ZERO.equals(Hc)||(Wc=j.angleBetween(Uc,Hc)),Re.push({text:mt.angleToString(Wc,(we=e.measureUnits)==null?void 0:we.angleUnits,e.locale,(ge=e.decimals)==null?void 0:ge.angle),position:Qn,id:U(),...vt})}}const Wt=bu(Ge);e.showLabel&&Re.push({text:mt.areaToString(Wt,(ve=e.measureUnits)==null?void 0:ve.areaUnits,e.locale,(Se=e.decimals)==null?void 0:Se.area),position:X.positions[0],id:U(),...Gc})}e.showComponentLines&&(Object.assign(Ze,{xyPolylinePositions:[new j,new j,new j],xyBoxPositions:[new j,new j,new j],xDistance:0,yDistance:0,xAngle:0,yAngle:0}),T(Ze),Re.push({position:Ze.xLabelPosition,id:U(),text:mt.distanceToString(Ze.xDistance||0,(W=e.measureUnits)==null?void 0:W.distanceUnits,e.locale,(le=e.decimals)==null?void 0:le.distance),...e.xLabelOpts}),Re.push({position:Ze.yLabelPosition,id:U(),text:mt.distanceToString(Ze.yDistance||0,(_e=e.measureUnits)==null?void 0:_e.distanceUnits,e.locale,(ue=e.decimals)==null?void 0:ue.distance),...e.yLabelOpts}),Re.push({position:Ze.xAnglePosition,id:U(),text:mt.angleToString(Ze.xAngle||0,(Xe=e.measureUnits)==null?void 0:Xe.angleUnits,e.locale,(kt=e.decimals)==null?void 0:kt.angle),...e.xAngleLabelOpts}),Re.push({position:Ze.yAnglePosition,id:U(),text:mt.angleToString(Ze.yAngle||0,(Fe=e.measureUnits)==null?void 0:Fe.angleUnits,e.locale,(ce=e.decimals)==null?void 0:ce.angle),...e.yAngleLabelOpts})),Object.assign(Ze,{labels:Re}),Ze.positionsDegreesArray=Ze.positions.map(vt=>{const Ge=Cesium.Cartographic.fromCartesian(vt,te.scene.globe.ellipsoid);return[Y.toDegrees(Ge.longitude),Y.toDegrees(Ge.latitude),Ge.height]}),(Ae=Ze==null?void 0:Ze.polygonPositions)!=null&&Ae.length&&(Ze.polygonPositionsDegreesArray=Ze.polygonPositions.map(vt=>{const Ge=Cesium.Cartographic.fromCartesian(vt,te.scene.globe.ellipsoid);return[Y.toDegrees(Ge.longitude),Y.toDegrees(Ge.latitude),Ge.height]})),V.push(Ze)}),V});n.createCesiumObject=async()=>M,n.mount=async()=>{const{viewer:V}=a;return e.autoUpdateLabelPosition&&(i==="VcMeasurementDistance"&&V.scene.preRender.addEventListener(E),(i==="VcMeasurementRegular"||i==="VcMeasurementRectangle"||i==="VcDrawingRegular"||i==="VcDrawingRectangle")&&V.scene.preRender.addEventListener(_)),!0},n.unmount=async()=>{const{viewer:V}=a;return e.autoUpdateLabelPosition&&(i==="VcMeasurementDistance"&&V.scene.preRender.removeEventListener(E),(i==="VcMeasurementRegular"||i==="VcMeasurementRectangle"||i==="VcDrawingRegular"||i==="VcDrawingRectangle")&&V.scene.preRender.removeEventListener(_)),!0};const C=(V,j)=>{const{defined:G,SceneMode:J,Cartesian3:U,IntersectionTests:z,Plane:Y,SceneTransforms:Q,Ray:te}=Cesium,{viewer:X}=a,ne=X.scene,re=ne.camera,pe=re.direction,be=ne.frameState.mapProjection.ellipsoid,he=V.positions,ye=he[0];let we=ye,ge=he[1],ve=V.draggingPlane,Se=V.surfaceNormal,W=Se;if(ne.mode===J.COLUMBUS_VIEW){W=U.UNIT_X;const ue=be.cartesianToCartographic(ye,{});we=ne.mapProjection.project(ue,{}),U.fromElements(we.z,we.x,we.y,we)}let le=U.cross(W,pe,{});le=U.cross(W,le,le),le=U.normalize(le,le),ve=Y.fromPointNormal(we,le,ve);const _e=re.getPickRay(j,new te);if(ge=z.rayPlane(_e,ve,{}),G(ge)){if(ne.mode===J.COLUMBUS_VIEW){ge=U.fromElements(ge.y,ge.z,ge.x,ge);const Xe=ne.mapProjection.unproject(ge,{});ge=be.cartographicToCartesian(Xe,ge)}Q.wgs84ToWindowCoordinates(ne,he[0],{}).y<j.y&&(Se=U.negate(Se,{}));let ue=U.subtract(ge,ye,{});return ue=U.projectVector(ue,Se,ue),ge=U.add(ye,ue,ge),ge}},T=V=>{const{Cartesian3:j,Math:G,defined:J}=Cesium,{viewer:U}=a,z=U.scene.frameState.mapProjection.ellipsoid,Y=V.positions[0],Q=V.positions[1],te=z.cartesianToCartographic(Y,{});if(!J(te))return;const X=z.cartesianToCartographic(Q,{}),ne=te.height,re=X.height;let pe,be,he,ye;ne<re?(pe=Y,be=Q,ye=re,he=ne):(pe=Q,be=Y,ye=ne,he=re);const we=V.xyPolylinePositions;if(we===void 0)return;we[0]=pe,we[2]=be;let ge=z.geodeticSurfaceNormal(pe,{});ge=j.multiplyByScalar(ge,ye-he,ge);const ve=j.add(pe,ge,we[1]);if(!(j.equalsEpsilon(ve,be,G.EPSILON10)&&j.equalsEpsilon(ve,pe,G.EPSILON10))){let Se=j.subtract(be,ve,{}),W=j.subtract(pe,ve,{});const le=Math.min(j.magnitude(Se),j.magnitude(W)),_e=15<le?.15*le:.25*le;Se=j.normalize(Se,Se),W=j.normalize(W,W),Se=j.multiplyByScalar(Se,_e,Se),W=j.multiplyByScalar(W,_e,W);const ue=V.xyBoxPositions;if(ue===void 0)return;j.add(ve,Se,ue[0]),j.add(ue[0],W,ue[1]),j.add(ve,W,ue[2]),V.xLabelPosition=j.midpoint(ve,be,{}),V.yLabelPosition=j.midpoint(pe,ve,{}),V.xAnglePosition=be,V.yAnglePosition=pe;const Xe=j.subtract(ve,be,{}),kt=j.subtract(ve,pe,{});let Fe=j.subtract(be,pe,{});V.yAngle=j.angleBetween(kt,Fe),Fe=j.negate(Fe,Fe),V.xAngle=j.angleBetween(Xe,Fe),V.xDistance=j.magnitude(Xe),V.yDistance=j.magnitude(kt)}},_=()=>{f.value.forEach((V,j)=>{var G;const J=V.polygonPositions;if(!(J.length<2)){const{defined:U,SceneTransforms:z,Cartesian2:Y,HorizontalOrigin:Q}=Cesium,{viewer:te}=a,X=te.scene;let ne=V.positions[0];const re=z.wgs84ToWindowCoordinates(X,ne,{});let pe=U(re)?Y.clone(re,{}):Y.fromElements(Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,{}),be=pe.y;const he=((G=M.value)==null?void 0:G.cesiumObject)._primitives.filter(we=>we instanceof Cesium.LabelCollection)[j]._labels,ye=he[he.length-1];if(!ye)return;for(let we=1;we<J.length;we++){const ge=z.wgs84ToWindowCoordinates(X,J[we],{});if(U(ge)){const ve=(pe.y-ge.y)/(ge.x-pe.x),Se=he[we-1];Se&&Se!==ye&&(Se.horizontalOrigin=0<ve?Q.LEFT:Q.RIGHT),ge.y<be&&(be=ge.y,ne=J[we]),pe=Y.clone(ge,pe)}V.drawStatus===Me.AfterDraw&&(ye.position=ne)}}})},E=()=>{f.value.forEach((V,j)=>{var G,J,U;const{defined:z,SceneTransforms:Y,HorizontalOrigin:Q}=Cesium,{viewer:te}=a,X=te.scene,ne=(G=M.value)==null?void 0:G.cesiumObject,re=V.positions,pe=re[0],be=re[1],he=Y.wgs84ToWindowCoordinates(X,pe,{}),ye=Y.wgs84ToWindowCoordinates(X,be,{});if(z(he)&&z(ye)){const we=ne._primitives.filter(ge=>ge instanceof Cesium.LabelCollection);if(we.length){const ge=we[j].get(0);let ve,Se,W,le;e.showComponentLines&&(ve=we[j].get(2),Se=we[j].get(3),W=ht((J=e.yLabelOpts)==null?void 0:J.pixelOffset),le=ht((U=e.xAngleLabelOpts)==null?void 0:U.pixelOffset)),(he.y-ye.y)/(ye.x-he.x)>0?(!ui(ve)&&!ui(W)&&(W.x=-9,ve.pixelOffset=W,ve.horizontalOrigin=Q.RIGHT),!ui(Se)&&!ui(le)&&(le.x=12,Se.pixelOffset=le,Se.horizontalOrigin=Q.LEFT),ge.horizontalOrigin=Q.LEFT):(!ui(ve)&&!ui(W)&&(W.x=9,ve.pixelOffset=W,ve.horizontalOrigin=Q.LEFT),!ui(Se)&&!ui(le)&&(le.x=-12,Se.pixelOffset=le,Se.horizontalOrigin=Q.RIGHT),ge.horizontalOrigin=Q.RIGHT)}}})},A=(V,j)=>{const{defined:G,defaultValue:J,Cartesian3:U}=Cesium,{viewer:z}=a,Y=z.scene,Q=V.positions;Q[0]=j;const te=Y.frameState.mapProjection.ellipsoid,X=te.cartesianToCartographic(j,{}),ne=Y.globe;X.height=G(ne)?J(ne.getHeight(X),0):0,Q[1]=te.cartographicToCartesian(X,{}),V.distance=U.distance(Q[0],Q[1]),V.labelPosition=U.midpoint(Q[0],Q[1],{})},L=()=>{const{Cartesian3:V,Plane:j}=Cesium,G={positions:[new V,new V],show:!1,drawStatus:Me.BeforeDraw,distance:0,labels:[],pointOpts:{},labelOpts:{},labelsOpts:{},polylineOpts:{},primitiveOpts:{},polygonOpts:{}};i==="VcMeasurementVertical"&&Object.assign(G,{draggingPlane:new j(V.UNIT_X,0),surfaceNormal:new V}),$.value.push(G),d.value=Me.BeforeDraw,h.value=!0,c.value=u.value.drawingTipStart},B=(V=!0)=>{V&&d.value===Me.Drawing&&$.value.pop();const j=x.value?x.value._vcPolylineIndx:$.value.length-1,G=$.value[j];G&&(G.drawStatus=Me.AfterDraw),d.value=Me.AfterDraw,h.value=!1,p.value=[0,0,0]},F=(V,j)=>{var G;const{viewer:J,drawingFabInstance:U,selectedDrawingActionInstance:z,getWorldPosition:Y}=a,Q=U==null?void 0:U.proxy;if(j.button===2&&j.ctrl){const ge=Q.getDrawingActionInstance(l);Q.toggleAction(ge),Be(()=>{r("drawEvt",{name:l,finished:!0,windowPoistion:V,type:"cancel"},J)});return}d.value===Me.AfterDraw&&L();const te=x.value?x.value._vcPolylineIndx:$.value.length-1,X=$.value[te],ne=X.positions,re=x.value?x.value._index:X.positions.length-1;if(j.button===2&&x.value){Q.editingActionName=void 0,X.positions[x.value._index]=m,d.value=Me.AfterDraw,X.drawStatus=Me.AfterDraw,x.value=void 0,c.value=u.value.drawingTipStart,i==="VcMeasurementHeight"&&A(X,m),Be(()=>{r("drawEvt",Object.assign({name:l,index:te,pointIndex:re,renderDatas:$,finished:!0,windowPoistion:V,type:"cancel"},f.value[te]),J)});return}if(j.button!==0)return;const{defined:pe}=Cesium;let be="new",he,ye=!1;const we=J.scene;if(d.value===Me.BeforeDraw){const ge=Y(we,V,{});if(!pe(ge))return;if(ne[0]=ge,ne[1]=ge,X.show=!0,d.value=Me.Drawing,X.drawStatus=Me.Drawing,c.value=u.value.drawingTipEnd,he=ge,ye=!1,i==="VcMeasurementVertical"){const ve=we.frameState.mapProjection.ellipsoid;X.surfaceNormal=ve.geodeticSurfaceNormal(ge,X.surfaceNormal)}i==="VcMeasurementHeight"&&(A(X,ge),ye=!0,X.drawStatus=Me.AfterDraw,d.value=Me.AfterDraw,c.value=u.value.drawingTipStart,e.mode===1&&Q.toggleAction(z)),i==="VcAnalysisViewshed"&&(X.viewshedOpts={...e.viewshedOpts})}else{if(X.drawStatus=Me.AfterDraw,d.value=Me.AfterDraw,x.value){if(ct().hasTouch===!0){const ge=Y(we,V,{});pe(ge)&&(X.positions.splice(x.value._index,1,ge),x.value.pixelSize=((G=e.pointOpts)==null?void 0:G.pixelSize)*1)}x.value=void 0,Q.editingActionName=void 0,h.value=!1,p.value=[0,0,0],be=g.value,z&&(c.value=u.value.drawingTipStart,h.value=!0)}else{if(i!=="VcMeasurementVertical"&&ct().hasTouch===!0){const ge=Y(we,V,{});if(pe(ge)){const ve=X.positions;ve[1]=ge}}e.mode===1&&Q.toggleAction(z)}ye=!0,he=X.positions[1]}Be(()=>{r("drawEvt",Object.assign({index:te,pointIndex:re,renderDatas:$,name:l,finished:ye,position:he,windowPoistion:V,type:be},f.value[te]),J)})},q=V=>{const{viewer:j,getWorldPosition:G}=a,J=j.scene,U=G(J,V,{}),{defined:z,Cartographic:Y}=Cesium;if(!z(U)||(p.value=U,d.value!==Me.Drawing)||i==="VcMeasurementVertical"&&J.mode===Cesium.SceneMode.SCENE2D)return;const Q=x.value?x.value._vcPolylineIndx:$.value.length-1,te=$.value[Q],X=x.value?x.value._index:te.positions.length-1;if(i==="VcMeasurementVertical"){const ne=C(te,V);if(!ui(ne)){const re=te.positions.slice();re[x.value?x.value._index:1]=ne,te.positions=re}}else if(i==="VcMeasurementHeight")A(te,U);else if(i==="VcDrawingRectangle"||i==="VcDrawingRegular"||i==="VcMeasurementRegular"||i==="VcMeasurementRectangle"){const ne=te.positions,re=ne[0],pe=Y.fromCartesian(re,j.scene.globe.ellipsoid),be=Y.fromCartesian(U,j.scene.globe.ellipsoid);!e.clampToGround&&(be.height=pe.height),ne[x.value?x.value._index:1]=Y.toCartesian(be,j.scene.globe.ellipsoid)}else if(i==="VcAnalysisSightline"){const ne=te.positions;if(x.value){const re=x.value._index>0?1:0;ne[re]=U}else ne[1]=U}else{const ne=te.positions.slice();ne[x.value?x.value._index:1]=U,te.positions=ne}Be(()=>{r("drawEvt",Object.assign({index:Q,pointIndex:X,renderDatas:$,name:l,finished:!1,position:te.positions[1],windowPoistion:V,type:x.value?g:"new"},f.value[Q]),j)})},Z=V=>{var j,G,J;if(b.value=[0,0,0],v.value=!1,!e.editable)return;g.value=V;const{viewer:U,drawingFabInstance:z}=a;if(V==="move"){c.value=u.value.drawingTipEditing,d.value=Me.Drawing,x.value=y.value,m=$.value[x.value._vcPolylineIndx].positions[x.value._index],h.value=!0;const Y=z==null?void 0:z.proxy;Y.editingActionName=l}else if(V==="remove"){const Y=y.value._vcPolylineIndx;$.value[Y].positions.splice(y.value._index,1)}else if(V==="removeAll"){const Y=y.value._vcPolylineIndx;$.value.splice(Y,1)}else{const Y=y.value._vcPolylineIndx,Q=$.value[Y];(J=(G=(j=e.editorOpts)==null?void 0:j[V])==null?void 0:G.callback)==null||J.call(G,Y,Q)}r("editorEvt",{type:V,renderDatas:$,name:l,index:y.value._vcPolylineIndx,pointIndex:y.value._index,point:y.value},U)},H={computedRenderDatas:f,renderDatas:$,startNew:L,stop:B,clear:()=>{$.value=[],B()},handleMouseClick:F,handleMouseMove:q};return Object.assign(n.proxy,H),()=>{var V,j,G;const{createGuid:J}=Cesium,U=[];if(f.value.forEach((z,Y)=>{var Q;const te=i==="VcDrawingRectangle"||i==="VcDrawingRegular"||i==="VcMeasurementRegular"||i==="VcMeasurementRectangle",X=te?(Q=z.polygonPositions)==null?void 0:Q.slice():z.positions;te&&(X==null||X.push(X[0]));const ne=Object.assign({},e.polylineOpts,z.polylineOpts);e.clampToGround&&delete ne.arcType;const re=Object.assign({},e.primitiveOpts,z.primitiveOpts);if(X!=null&&X.length&&(X==null?void 0:X.length)>1&&(U.push(S(e.clampToGround?Is:wn,{...re,show:z.show&&re.show||e.editable||z.drawStatus===Me.Drawing,onReady:be=>{var he;(he=re==null?void 0:re.onReady)==null||he.call(re,be),be.cesiumObject._vcPolylineIndex=Y}},()=>S(_n,{id:J()},()=>S(e.clampToGround?Ls:xn,{positions:X,...ne})))),i==="VcAnalysisViewshed"&&U.push(S(Vp,{...z.viewshedOpts}))),z.polygonPositions&&z.polygonPositions.length>2){const be=Object.assign({},e==null?void 0:e.polygonOpts,z==null?void 0:z.polygonOpts);be.clampToGround=e.clampToGround,U.push(S(Wn,{positions:X,show:z.show&&(be==null?void 0:be.show),...be,onReady:he=>{var ye;N(he),(ye=be==null?void 0:be.onReady)==null||ye.call(be,he),he.cesiumObject._vcPolylineIndex=Y}}))}z.xyPolylinePositions&&z.xyPolylinePositions.length>1&&U.push(S(wn,{show:z.show&&re||e.editable||z.drawStatus===Me.Drawing,...re,onReady:be=>{var he;(he=re==null?void 0:re.onReady)==null||he.call(re,be),be.cesiumObject._vcPolylineIndex=Y}},()=>S(_n,{id:J()},()=>S(xn,{positions:z.xyPolylinePositions,...ne})))),z.xyBoxPositions&&z.xyBoxPositions.length>1&&U.push(S(wn,{show:z.show&&re||e.editable||z.drawStatus===Me.Drawing,...re},()=>S(_n,{id:J()},()=>S(xn,{positions:z.xyBoxPositions,...ne}))));const pe=Object.assign({},e.pointOpts,z.pointOpts);U.push(S(Co,{enableMouseEvent:e.enableMouseEvent,show:z.show,points:z.points.map((be,he)=>{const ye=be.position,we=Object.assign({},pe,be);return{position:ye,id:J(),_vcPolylineIndx:Y,...we,show:((we==null?void 0:we.show)||e.editable||z.drawStatus===Me.Drawing)&&(i==="VcAnalysisSightline"&&z.positions.length===3?he!==1:!0)}}),onMouseover:w,onMouseout:O,onReady:P})),U.push(S(bo,{enableMouseEvent:e.enableMouseEvent,show:z.show,labels:z.labels,onReady:k}))}),(V=e.drawtip)!=null&&V.show&&h.value){const{viewer:z}=a;U.push(S(En,{position:p.value,pixelOffset:(j=e.drawtip)==null?void 0:j.pixelOffset,teleport:{to:z.container}},()=>S("div",{class:"vc-drawtip vc-tooltip--style"},c.value)))}if(v.value){const z=[];if(y.value){const Q=e.editorOpts;for(const te in Q)if(!Array.isArray(Q[te])&&typeof Q[te]!="number"){const X={...Q[te]};delete X.color,z.push(S(ai,{style:{color:Q[te].color,background:Q[te].background},...X,onclick:Z.bind(void 0,te)},()=>S(At,{...Q[te].tooltip},()=>{var ne;return S("strong",null,((ne=Q[te].tooltip)==null?void 0:ne.tip)||s(`vc.measurement.editor.${te}`))})))}}const{viewer:Y}=a;U.push(S(En,{position:b.value,pixelOffset:(G=e.editorOpts)==null?void 0:G.pixelOffset,teleport:{to:Y.container},onMouseenter:I,onMouseleave:R},()=>S("div",{class:"vc-editor"},z)))}return S(Hn,{ref:M,show:e.show,onReady:D},()=>U)}}var I0=K({name:"VcMeasurementDistance",props:{...Ut,showComponentLines:{type:Boolean,default:!1},measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,labelOpts:Object,xLabelOpts:Object,xAngleLabelOpts:Object,yLabelOpts:Object,yAngleLabelOpts:Object,locale:String,decimals:Object,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return ln(e,t,"VcMeasurementDistance")}});function wo(e,t,i){const n=oe(),o=Ne(e,t,n);if(o===void 0)return;const{t:s}=Ct(),a=o.$services,{emit:r}=t,{drawingType:l,drawTip:c,drawTipOpts:u,drawStatus:d,canShowDrawTip:h,drawTipPosition:p,showEditor:v,editorPosition:b,mouseoverPoint:y,editingPoint:x,primitiveCollectionRef:M,editorType:g,onMouseoverPoints:w,onMouseoutPoints:O,onMouseenterEditor:I,onMouseleaveEditor:R,onPrimitiveCollectionReady:D,onVcCollectionPointReady:P,onVcCollectionLabelReady:k,onVcPrimitiveReady:N}=Ac(e,t,n,i,a);let $,m;const f=10,C=ee([]);e.preRenderDatas&&e.preRenderDatas.length&&e.preRenderDatas.forEach(j=>{const G={show:!0,positions:Ci(j),tempPositions:[],drawStatus:Me.AfterDraw,loop:e.loop,distance:0,area:0,distances:[],labels:[],angles:[],polylineOpts:{},pointOpts:{},labelOpts:{},labelsOpts:{},primitiveOpts:{},polygonOpts:{}};C.value.push(G)});const T=ae(()=>{const{Cartesian3:j,createGuid:G,defined:J,Math:U}=Cesium,z=[],{viewer:Y}=a;return C.value.forEach((Q,te)=>{var X,ne,re,pe,be,he,ye,we,ge;const ve=Ee([]),Se=[],W=[];let le=0;const _e=[];Q.points=Q.positions.map(Xe=>({position:Xe}));const ue=Q.positions.slice();if(i==="VcAnalysisSightline"){const Xe=ue.shift();Xe&&ue.forEach(kt=>{const Fe=[];Fe.push(Xe);const ce=[];M.value.cesiumObject._primitives.forEach(Re=>{Re instanceof Cesium.PointPrimitiveCollection&&ce.push(...Re._pointPrimitives),Re instanceof Cesium.Primitive&&ce.push(Re)});const Ae=_u(Xe,kt,a.viewer,ce);J(Ae)&&Fe.push(Ae),Fe.push(kt);let Le=0;const De=[];for(let Re=0;Re<Fe.length-1;Re++){const rt=j.distance(Fe[Re],Fe[Re+1]);De.push(rt),Le=Le+rt}z.push({...Q,positions:Fe,distance:Le,distances:De})})}else{e.loop&&ue.length>2&&ue.push(ue[0]);for(let Fe=0;Fe<ue.length-1;Fe++){let ce=0;((X=e.polylineOpts)==null?void 0:X.arcType)===0?ce=Ks(ue[Fe],ue[Fe+1],a.viewer.scene.globe.ellipsoid):ce=j.distance(ue[Fe],ue[Fe+1]),Se.push(ce),le=le+ce;const Ae=Object.assign({},e.labelsOpts,Q.labelsOpts);if(ce>0&&ue.length>2&&e.showDistanceLabel&&ve.push({text:mt.distanceToString(ce,(ne=e.measureUnits)==null?void 0:ne.distanceUnits,e.locale,(re=e.decimals)==null?void 0:re.distance),position:j.midpoint(ue[Fe],ue[Fe+1],{}),id:G(),...Ae}),ue.length>2&&e.showAngleLabel&&(Fe>0||e.loop)){const Le=ue[Fe===0?ue.length-2:Fe-1],De=ue[Fe],Re=ue[Fe+1],rt=j.subtract(Le,De,{}),Ye=j.subtract(Re,De,{});let Ke=0;j.ZERO.equals(rt)||j.ZERO.equals(Ye)||(Ke=j.angleBetween(rt,Ye)),W.push(Ke),ve.push({text:mt.angleToString(Ke,(pe=e.measureUnits)==null?void 0:pe.angleUnits,e.locale,(be=e.decimals)==null?void 0:be.angle),position:De,id:G(),...Ae})}e.showDashedLine&&(_e.push({positions:[ue[Fe],_(ue[Fe])]}),Fe===ue.length-2&&_e.push({positions:[ue[Fe+1],_(ue[Fe+1])]}))}const Xe=bu(ue),kt=Object.assign({},e.labelOpts,Q.labelOpts);e.showLabel&&ue.length&&(i.includes("Area")?ve.push({text:mt.areaToString(Xe,(he=e.measureUnits)==null?void 0:he.areaUnits,e.locale,(ye=e.decimals)==null?void 0:ye.area),position:ue[ue.length-1],id:G(),...kt}):ve.push({text:mt.distanceToString(le,(we=e.measureUnits)==null?void 0:we.distanceUnits,e.locale,(ge=e.decimals)==null?void 0:ge.distance),position:ue[ue.length-1],id:G(),...kt})),Q.positionsDegreesArray=Q.positions.map(Fe=>{const ce=Cesium.Cartographic.fromCartesian(Fe,Y.scene.globe.ellipsoid);return[U.toDegrees(ce.longitude),U.toDegrees(ce.latitude),ce.height]}),z.push({...Q,labels:ve,distance:le,distances:Se,area:Xe,angles:W,dashedLines:_e})}}),z});n.mount=async()=>{const{viewer:j}=a;return e.autoUpdateLabelPosition&&j.scene.preRender.addEventListener(E),!0},n.unmount=async()=>{const{viewer:j}=a;return e.autoUpdateLabelPosition&&j.scene.preRender.removeEventListener(E),!0};const _=j=>{const{defined:G,defaultValue:J}=Cesium,{viewer:U}=a,z=U.scene,Y=z.globe,Q=z.frameState.mapProjection.ellipsoid,te=Q.cartesianToCartographic(j);return te.height=G(Y)?J(Y.getHeight(te),0):0,Q.cartographicToCartesian(te)},E=()=>{T.value.forEach((j,G)=>{var J;const U=j.positions;if(!(U.length<2)){const{defined:z,SceneTransforms:Y,Cartesian2:Q,HorizontalOrigin:te}=Cesium,{viewer:X}=a,ne=X.scene;let re=U[0];const pe=Y.wgs84ToWindowCoordinates(ne,re,{});let be=z(pe)?Q.clone(pe,{}):Q.fromElements(Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,{}),he=be.y;const ye=((J=M.value)==null?void 0:J.cesiumObject)._primitives.filter(ge=>ge instanceof Cesium.LabelCollection)[G]._labels,we=ye[ye.length-1];for(let ge=1;ge<U.length;ge++){const ve=Y.wgs84ToWindowCoordinates(ne,U[ge],{});if(z(ve)){const Se=(be.y-ve.y)/(ve.x-be.x);ye[ge-1]!==we&&(ye[ge-1].horizontalOrigin=0<Se?te.LEFT:te.RIGHT),ve.y<he&&(he=ve.y,re=U[ge]),be=Q.clone(ve,be)}j.drawStatus===Me.AfterDraw&&(we.position=re)}}})},A=()=>{const j={show:!1,positions:[],tempPositions:[],drawStatus:Me.BeforeDraw,loop:e.loop,distance:0,area:0,distances:[],labels:[],angles:[],polylineOpts:{},pointOpts:{},labelOpts:{},labelsOpts:{},primitiveOpts:{},polygonOpts:{}};if(i==="VcMeasurementHorizontal"){const{Cartesian3:G,Plane:J}=Cesium;Object.assign(j,{dashedLines:[],heightPlane:new J(G.UNIT_X,0),heightPlaneCV:new J(G.UNIT_X,0),height:0,firstMove:!1,tempNextPos:new G})}d.value=Me.BeforeDraw,C.value.push(j),h.value=!0,c.value=u.value.drawingTipStart},L=(j=!0)=>{j&&d.value===Me.Drawing&&C.value.pop();const G=x.value?x.value._vcPolylineIndex:C.value.length-1,J=C.value[G];J&&(J.positions=J.tempPositions,J.drawStatus=Me.AfterDraw),d.value=Me.AfterDraw,h.value=!1,p.value=[0,0,0]},B=(j,G)=>{var J;const{viewer:U,drawingFabInstance:z,getWorldPosition:Y,selectedDrawingActionInstance:Q}=a,te=z==null?void 0:z.proxy;if(G.button===2&&G.ctrl){const le=te.getDrawingActionInstance(l);te.toggleAction(le),Be(()=>{r("drawEvt",{name:l,finished:!0,windowPoistion:j,type:"cancel"},U)});return}d.value===Me.AfterDraw&&A();const{defined:X,Cartesian2:ne,Plane:re,Cartesian3:pe}=Cesium,be=x.value?x.value._vcPolylineIndex:C.value.length-1,he=C.value[be],ye=he.tempPositions,we=x.value?x.value._index:he.positions.length-1;if(G.button===2&&x.value){g.value==="insert"?he.positions.splice(x.value._index,1):he.positions[x.value._index]=m,d.value=Me.AfterDraw,he.drawStatus=Me.AfterDraw,x.value=void 0,c.value=u.value.drawingTipStart,te.editingActionName=void 0,h.value=X(Q),Be(()=>{r("drawEvt",Object.assign({index:be,pointIndex:we,name:l,renderDatas:C,finished:!0,windowPoistion:j,type:"cancel"},T.value[be]),U)});return}if($=$||new Cesium.Cartesian2(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),ne.magnitude(ne.subtract($,j,{}))<f||(G.button===2&&d.value===Me.Drawing&&ye.length>1&&(ye.pop(),F(j)),G.button!==0))return;const ge=U.scene,ve=Y(ge,j,{});if(!X(ve))return;let Se=!1,W="new";if(i==="VcMeasurementHorizontal"){if(x.value)d.value=Me.AfterDraw,x.value=void 0,Se=!0,W=g.value,c.value=u.value.drawingTipStart;else if(ye.length===0){const le=ge.frameState.mapProjection.ellipsoid;ye.push(ve),he.positions=ye,he.heightPlane=re.fromPointNormal(ve,le.geodeticSurfaceNormal(ve,{}),he.heightPlane);const _e=le.cartesianToCartographic(ve,{}),ue=ge.mapProjection.project(_e,{}),Xe=pe.fromElements(ue.z,ue.x,ue.y,ue);he.heightPlaneCV=re.fromPointNormal(Xe,pe.UNIT_X,he.heightPlaneCV),he.height=_e.height,he.firstMove=!0,he.drawStatus=Me.Drawing,he.show=!0,d.value=Me.Drawing}else ye.push(he.tempNextPos),he.positions=ye,he.firstMove=!0;c.value=u.value.drawingTipEnd}else{if(x.value){if(ct().hasTouch===!0){const le=Y(ge,j,{});X(le)&&(he.positions.splice(x.value._index,1,le),x.value.pixelSize=((J=e.pointOpts)==null?void 0:J.pixelSize)*1)}d.value=Me.AfterDraw,x.value=void 0,Se=!0,W=g.value,c.value=u.value.drawingTipStart}else ye.push(ve),he.positions=ye,he.show=!0,he.drawStatus=Me.Drawing,d.value=Me.Drawing,h.value=!0,c.value=u.value.drawingTipEnd;W!=="new"&&(te.editingActionName=void 0,h.value=X(Q))}ne.clone(j,$),Be(()=>{r("drawEvt",Object.assign({index:be,pointIndex:we,name:l,renderDatas:C,finished:Se,position:i==="VcMeasurementHorizontal"?he.positions[he.positions.length-1]:ve,windowPoistion:j,type:W},T.value[be]),U)})},F=(j,G)=>{const{viewer:J,getWorldPosition:U}=a,z=J.scene,Y=U(z,j,{}),{defined:Q}=Cesium;if(!Q(Y)||(p.value=Y,d.value!==Me.Drawing))return;const te=x.value?x.value._vcPolylineIndex:C.value.length-1,X=C.value[te],ne=x.value?x.value._index:X.positions.length-1;let re="new";if(i==="VcMeasurementHorizontal"){const{SceneMode:pe,IntersectionTests:be,Cartesian3:he}=Cesium,ye=z.frameState.mapProjection.ellipsoid,we=X.positions,ge=z.camera.getPickRay(j);let ve,Se;if(z.mode===pe.SCENE3D&&X.heightPlane)ve=be.rayPlane(ge,X.heightPlane);else if(z.mode===pe.COLUMBUS_VIEW&&X.heightPlaneCV)ve=be.rayPlane(ge,X.heightPlaneCV),ve=he.fromElements(ve.y,ve.z,ve.x,ve),Se=z.mapProjection.unproject(ve),ve=ye.cartographicToCartesian(Se);else if(ve=z.camera.pickEllipsoid(j,ye),Q(ve)){const W=ye.cartesianToCartographic(ve);W.height=X.height||0,ve=ye.cartographicToCartesian(W,ve)}if(!Q(ve))return;if(!X.firstMove&&G!=null&&G.shift){const W=we[we.length-2],le=X.tempNextPos,_e=he.subtract(le,W,{});let ue=he.subtract(ve,W,{});ue=he.projectVector(ue,_e,ue),ve=he.add(W,ue,ve)}if(x.value)X.positions.splice(x.value._index,1,ve),re=g.value;else{const W=X.tempPositions.slice();W.push(ve),X.positions=W,X.firstMove=!1,X.tempNextPos=Object.assign(ve),c.value=u.value.drawingTipEnd}}else if(x.value)X.positions.splice(x.value._index,1,Y),re=g.value;else{const pe=X.tempPositions.slice();pe.push(Y),X.positions=pe}Be(()=>{r("drawEvt",Object.assign({index:te,pointIndex:ne,name:l,renderDatas:C,finished:!1,position:i==="VcMeasurementHorizontal"?X.positions[X.positions.length-1]:Y,windowPoistion:j,type:re},T.value[te]),J)})},q=j=>{const{drawingFabInstance:G,selectedDrawingActionInstance:J,viewer:U}=a;if(d.value===Me.Drawing){const z=x.value?x.value._vcPolylineIndex:C.value.length-1,Y=C.value[z],Q=x.value?x.value._index:Y.positions.length-1;L(!1),c.value=u.value.drawingTipStart,Be(()=>{r("drawEvt",Object.assign({index:z,pointIndex:Q,name:l,renderDatas:C,finished:!0,position:Y.positions[Y.positions.length-1],windowPoistion:j,type:"new"},T.value[z]),U),e.mode===1&&(G==null?void 0:G.proxy).toggleAction(J)})}},Z=()=>{let j=x.value._vcPolylineIndex,G=x.value._index;if(i==="VcAnalysisSightline")for(let J=0;J<C.value.length;J++){const U=C.value[J];for(let z=0;z<U.positions.length;z++){const Y=U.positions[z];x.value.position.equals(Y)&&(j=J,G=z)}}return[j,G]},H=j=>{var G,J,U;if(b.value=[0,0,0],v.value=!1,!e.editable)return;const{viewer:z,drawingFabInstance:Y}=a,Q=Y==null?void 0:Y.proxy;if(g.value=j,j==="move"){c.value=u.value.drawingTipEditing,d.value=Me.Drawing,x.value=y.value,h.value=!0;const te=Z();x.value._vcPolylineIndex=te[0],x.value._index=te[1],m=C.value[te[0]].positions[te[1]],Q.editingActionName=l}else if(j==="insert"){const te=y.value._vcPolylineIndex;C.value[te].positions.splice(y.value._index,0,y.value.position),x.value=y.value,h.value=!0,d.value=Me.Drawing,c.value=u.value.drawingTipEditing,Q.editingActionName=l}else if(j==="remove"){const te=y.value._vcPolylineIndex,X=C.value[te];X.positions.length>2&&X.positions.splice(y.value._index,1)}else if(j==="removeAll"){const te=y.value._vcPolylineIndex;C.value.splice(te,1)}else{const te=y.value._vcPolylineIndex,X=C.value[te];(U=(J=(G=e.editorOpts)==null?void 0:G[j])==null?void 0:J.callback)==null||U.call(J,te,X)}r("editorEvt",{type:j,renderDatas:C,name:l,polylineIndex:y.value._vcPolylineIndex,pointIndex:y.value._index,point:y.value},z)},V={computedRenderDatas:T,renderDatas:C,startNew:A,stop:L,clear:()=>{C.value=[],L()},handleMouseClick:B,handleMouseMove:F,handleDoubleClick:q};return Object.assign(n.proxy,V),()=>{var j,G;const{createGuid:J,Cartesian3:U}=Cesium,z=[],Y=[];if(T.value.forEach((Q,te)=>{var X,ne;const re=Q.positions.slice();if(re.length>1){Q.loop&&re.push(re[0]);const ye=Object.assign({},e.polylineOpts,Q.polylineOpts);e.clampToGround&&delete ye.arcType;const we=Object.assign({},e.primitiveOpts,Q.primitiveOpts);z.push(S(e.clampToGround?Is:wn,{show:Q.show&&we.show||e.editable||Q.drawStatus===Me.Drawing,...we,onReady:ge=>{var ve;(ve=we==null?void 0:we.onReady)==null||ve.call(we,ge),ge.cesiumObject._vcPolylineIndex=te}},()=>S(_n,{id:J()},()=>S(e.clampToGround?Ls:xn,{positions:re,...ye}))))}const pe=Object.assign({},e.dashLineOpts,Q.dashLineOpts),be=Object.assign({},e.dashLinePrimitiveOpts,Q.dashLinePrimitiveOpts);(X=Q.dashedLines)==null||X.forEach(ye=>{z.push(S(wn,{show:Q.show&&e.dashLinePrimitiveOpts.show||e.editable||Q.drawStatus===Me.Drawing,...be},()=>S(_n,{id:J()},()=>S(xn,{positions:ye.positions,...pe}))))});const he=Object.assign({},e.pointOpts,Q.pointOpts);if(z.push(S(Co,{enableMouseEvent:e.enableMouseEvent,show:Q.show,points:Q.points.map((ye,we)=>{var ge;const ve=ye.position;let Se=!1;for(let _e=0;_e<Y.length;_e++)U.equals(ve,Y[_e])&&(Se=!0);const W=(((ge=e.pointOpts)==null?void 0:ge.show)||e.editable||Q.drawStatus===Me.Drawing)&&(i==="VcAnalysisSightline"&&Q.positions.length===3?we!==1:!0)&&!Se;i==="VcAnalysisSightline"&&Y.push(ve);const le=Object.assign({},he,ye);return{position:ve,id:J(),_vcPolylineIndex:te,show:W,...le}}),onMouseover:w,onMouseout:O,onReady:P})),z.push(S(bo,{enableMouseEvent:e.enableMouseEvent,show:Q.show,labels:Q.labels,onReady:k})),re.length>2&&(i.includes("Polygon")||i.includes("Area"))){const ye=Object.assign({},e.polygonOpts,Q.polygonOpts);z.push(S(Wn,{positions:re,clampToGround:e.clampToGround,show:Q.show&&((ne=e.polygonOpts)==null?void 0:ne.show),...ye,onReady:we=>{var ge;N(we),(ge=ye==null?void 0:ye.onReady)==null||ge.call(ye,we),we.cesiumObject._vcPolylineIndex=te}}))}}),(j=e.drawtip)!=null&&j.show&&h.value){const{viewer:Q}=a;z.push(S(En,{position:p.value,pixelOffset:e.drawtip.pixelOffset,teleport:{to:Q.container}},()=>S("div",{class:"vc-drawtip vc-tooltip--style"},c.value)))}if(v.value){const Q=[];if(y.value){const X=e.editorOpts;for(const ne in X)if(!Array.isArray(X[ne])&&typeof X[ne]!="number"){const re={...X[ne]};delete re.color,Q.push(S(ai,{style:{color:X[ne].color,background:X[ne].background},...re,onclick:H.bind("polyline",ne)},()=>S(At,{...X[ne].tooltip},()=>{var pe;return S("strong",null,((pe=X[ne].tooltip)==null?void 0:pe.tip)||s(`vc.drawing.editor.${ne}`))})))}}const{viewer:te}=a;z.push(S(En,{position:b.value,pixelOffset:(G=e.editorOpts)==null?void 0:G.pixelOffset,teleport:{to:te.container},onMouseenter:I,onMouseleave:R},()=>S("div",{class:"vc-editor"},Q)))}return S(Hn,{ref:M,show:e.show,onReady:D},()=>z)}}var A0=K({name:"VcMeasurementPolyline",props:{...Ut,polylineOpts:Object,primitiveOpts:Object,loop:Boolean,clampToGround:Boolean,measureUnits:Object,labelOpts:Object,labelsOpts:Object,locale:String,decimals:Object,showLabel:Boolean,showAngleLabel:Boolean,showDistanceLabel:Boolean,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return wo(e,t,"VcMeasurementPolyline")}}),D0=K({name:"VcMeasurementHorizontal",props:{...Ut,measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,dashLineOpts:Object,dashLinePrimitiveOpts:Object,labelOpts:Object,labelsOpts:Object,locale:String,decimals:Object,showLabel:Boolean,showAngleLabel:Boolean,showDashedLine:Boolean,showDistanceLabel:Boolean,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return wo(e,t,"VcMeasurementHorizontal")}}),B0=K({name:"VcMeasurementVertical",props:{...Ut,measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,labelOpts:Object,locale:String,decimals:Object,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return ln(e,t,"VcMeasurementVertical")}}),L0=K({name:"VcMeasurementHeight",props:{...Ut,measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,labelOpts:Object,locale:String,decimals:Object,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return ln(e,t,"VcMeasurementHeight")}});function Dc(e,t,i){const n=oe(),o=Ne(e,t,n);if(o===void 0)return;const{t:s}=Ct(),a=o.$services,{emit:r}=t,{drawingType:l,drawTip:c,drawTipOpts:u,drawStatus:d,canShowDrawTip:h,drawTipPosition:p,showEditor:v,editorPosition:b,mouseoverPoint:y,editingPoint:x,primitiveCollectionRef:M,editorType:g,onMouseoverPoints:w,onMouseoutPoints:O,onMouseenterEditor:I,onMouseleaveEditor:R,onPrimitiveCollectionReady:D,onVcCollectionPointReady:P,onVcCollectionLabelReady:k}=Ac(e,t,n,i,a),N=ee([]);let $,m=[];i==="VcDrawingPin"&&e.billboardOpts.image===""&&(e.billboardOpts.image=Cesium.buildModuleUrl("Assets/Textures/pin.svg")),m.push(de(()=>e.editable,H=>{const{drawingFabInstance:V,selectedDrawingActionInstance:j}=a;H&&(j==null?void 0:j.name)===l&&(V==null?void 0:V.proxy).toggleAction(j)}));const f=(H,V,j)=>{const G=Cesium.Cartographic.fromCartesian(H,j.globe.ellipsoid),J=[Cesium.Math.toDegrees(G.longitude),Cesium.Math.toDegrees(G.latitude),G.height];V.positionDegrees=J},C=()=>{const{Cartesian3:H}=Cesium,V={drawStatus:Me.Drawing,show:!1,position:new H,lng:0,lat:0,height:0,slope:0,pointOpts:{},labelOpts:{},billboardOpts:{}};N.value.push(V),d.value=Me.Drawing,h.value=!0,c.value=u.value.drawingTipStart},T=(H=!0)=>{H&&d.value===Me.Drawing&&N.value.pop();const V=x.value?x.value._vcPolylineIndx:N.value.length-1,j=N.value[V];j&&(j.drawStatus=Me.AfterDraw),d.value=Me.AfterDraw,h.value=!1,p.value=[0,0,0]},_=(H,V)=>{const{viewer:j,drawingFabInstance:G,getWorldPosition:J,selectedDrawingActionInstance:U}=a,z=G==null?void 0:G.proxy;if(V.button===2&&V.ctrl){const ne=z==null?void 0:z.getDrawingActionInstance(l);z==null||z.toggleAction(ne),Be(()=>{r("drawEvt",{name:l,finished:!0,windowPoistion:H,type:"cancel"},j)});return}const Y=x.value?x.value._vcPolylineIndx:N.value.length-1,Q=N.value[Y];if(V.button===2&&x.value){z.editingActionName=void 0,N.value[Y]=$,d.value=Me.AfterDraw,N.value[Y].drawStatus=Me.AfterDraw,x.value=void 0,c.value=u.value.drawingTipStart,Be(()=>{r("drawEvt",{name:l,index:Y,renderDatas:N,finished:!0,windowPoistion:H,type:"cancel"},j)});return}if(V.button!==0)return;const{defined:te}=Cesium;let X="new";if(d.value===Me.BeforeDraw){const ne=j.scene,re=J(ne,H,{});if(!te(re))return;Q.position=re,Q.show=!0,Q.drawStatus=Me.AfterDraw,d.value=Me.AfterDraw,c.value=u.value.drawingTipStart,Be(()=>{r("drawEvt",{index:Y,renderDatas:N,name:l,finished:!0,position:re,windowPoistion:H,type:X},j)})}else{d.value=Me.AfterDraw,Q.drawStatus=Me.AfterDraw;const ne=j.scene;if(ct().hasTouch===!0){const re=J(ne,H,{});f(re,Q,ne),te(re)&&(Q.position=re,Q.show=!0)}x.value?(x.value=void 0,z.editingActionName=void 0,h.value=!1,X=g.value):e.mode===1&&Be(()=>{z.toggleAction(U)}),U&&(c.value=u.value.drawingTipStart,h.value=!0),Be(()=>{r("drawEvt",{index:Y,renderDatas:N,name:l,finished:!0,position:N.value[Y].position,positionDegrees:N.value[Y].positionDegrees,windowPoistion:H,type:X},j)})}},E=H=>{const{viewer:V,getWorldPosition:j}=a,G=V.scene,{defined:J,SceneMode:U}=Cesium;if(G.mode!==U.MORPHING){const z=j(G,H,{});if(!J(z)||(p.value=z,d.value===Me.AfterDraw&&C(),d.value!==Me.Drawing))return;const Y=x.value?x.value._vcPolylineIndx:N.value.length-1,Q=N.value[Y];Q.position=z,f(z,Q,G),A(Q,H);const te=x.value?g.value:"new";Be(()=>{r("drawEvt",{index:Y,renderDatas:N,name:l,finished:!1,position:z,positionDegrees:Q.positionDegrees,windowPoistion:H,type:te},V)})}},A=(H,V)=>{const{viewer:j}=a,G=j.scene,{defined:J,defaultValue:U,Math:z,SceneMode:Y}=Cesium,Q=G.frameState.mapProjection.ellipsoid.cartesianToCartographic(H.position,{}),te=G.globe;let X=J(te)?U(te.getHeight(Q),0):0;X=e.heightReference===0?Q.height:Q.height-X,z.equalsEpsilon(X,0,z.EPSILON3)&&(X=0);let ne=0;G.mode!==Y.SCENE2D&&(V||(V=G.cartesianToCanvasCoordinates(H.position,{})),ne=L(G,V)),H.show=!0,H.lng=Q.longitude,H.lat=Q.latitude,H.height=X,H.slope=ne},L=(H,V)=>{const{getWorldPosition:j}=a,{defined:G,Cartesian2:J,Cartesian3:U,Math:z}=Cesium,Y=j(H,V,{});if(G(Y)){const Q=H.camera.position,te=U.distance(Y,Q),X=[new U,new U,new U,new U,new U],ne=new U,re=new U;if(!(1e4<te)){const pe=X[0],be=X[1],he=X[2],ye=X[3];let we=H.frameState.mapProjection.ellipsoid.geodeticSurfaceNormal(Y,ne);we=U.negate(we,we);const ge=J.clone(V,X[0]);ge.x-=2,ge.y-=2;const ve=J.clone(V,X[1]);ve.x-=2,ve.y+=2;const Se=J.clone(V,X[2]);Se.x+=2,Se.y+=2;const W=J.clone(V,X[3]);W.x+=2,W.y-=2;const le=j(H,ge,pe),_e=j(H,ve,be),ue=j(H,Se,he),Xe=j(H,W,ye);let kt,Fe,ce,Ae,Le,De,Re,rt;G(le)&&(kt=U.subtract(le,Y,pe),Fe=U.magnitude(kt)/te<=.05?U.normalize(kt,pe):void 0),G(_e)&&(ce=U.subtract(_e,Y,be),Ae=U.magnitude(ce)/te<=.05?U.normalize(ce,be):void 0),G(ue)&&(Le=U.subtract(ue,Y,he),De=U.magnitude(Le)/te<=.05?U.normalize(Le,he):void 0),G(Xe)&&(Re=U.subtract(Xe,Y,ye),rt=U.magnitude(Re)/te<=.05?U.normalize(Re,ye):void 0);let Ye=U.clone(U.ZERO,re),Ke=X[4];if(G(Fe)&&G(Ae)&&(Ke=U.normalize(U.cross(Fe,Ae,Ke),Ke),Ye=U.add(Ye,Ke,Ye)),G(Ae)&&G(De)&&(Ke=U.normalize(U.cross(Ae,De,Ke),Ke),Ye=U.add(Ye,Ke,Ye)),G(De)&&G(rt)&&(Ke=U.normalize(U.cross(De,rt,Ke),Ke),Ye=U.add(Ye,Ke,Ye)),G(rt)&&G(Fe)&&(Ke=U.normalize(U.cross(rt,Fe,Ke),Ke),Ye=U.add(Ye,Ke,Ye)),!Ye.equals(U.ZERO))return Ye=U.normalize(Ye,Ye),z.asinClamped(Math.abs(Math.sin(U.angleBetween(Ye,we))))}}return 0},B=H=>{var V,j,G;if(b.value=[0,0,0],v.value=!1,!e.editable)return;g.value=H;const{viewer:J,drawingFabInstance:U}=a,z=U==null?void 0:U.proxy;if(H==="move")c.value=u.value.drawingTipEditing,d.value=Me.Drawing,x.value=y.value,h.value=!0,$=Object.assign({},N.value[x.value._vcPolylineIndx]),z.editingActionName=l;else if(H==="remove"){const Y=y.value._vcPolylineIndx;N.value.splice(Y,1)}else{const Y=y.value._vcPolylineIndx,Q=N.value[Y];(G=(j=(V=e.editorOpts)==null?void 0:V[H])==null?void 0:j.callback)==null||G.call(j,Y,Q)}r("editorEvt",{type:H,name:l,renderDatas:N,index:y.value._vcPolylineIndx,pointIndex:y.value._index,point:y.value},J)},F=()=>{N.value=[],T()},q=H=>{var V,j,G,J,U,z,Y,Q;const{viewer:te}=a,X=te.scene.frameState.mapProjection.ellipsoid.cartesianToCartographic(H.position,{});return Cesium.defined(X)?`${s("vc.measurement.point.lng")}${mt.angleToString(X.longitude,(V=e.measureUnits)==null?void 0:V.angleUnits,e.locale,(j=e.decimals)==null?void 0:j.lng)}
${s("vc.measurement.point.lat")}${mt.angleToString(X.latitude,(G=e.measureUnits)==null?void 0:G.angleUnits,e.locale,(J=e.decimals)==null?void 0:J.lat)}
${s("vc.measurement.point.height")}${mt.distanceToString(H.height,(U=e.measureUnits)==null?void 0:U.distanceUnits,e.locale,(z=e.decimals)==null?void 0:z.height)}
${s("vc.measurement.point.slope")}${mt.angleToString(H.slope,(Y=e.measureUnits)==null?void 0:Y.slopeUnits,e.locale,(Q=e.decimals)==null?void 0:Q.slope)}`:""};if(e.preRenderDatas&&e.preRenderDatas.length){const{viewer:H}=a;e.preRenderDatas.forEach(V=>{const j={drawStatus:Me.AfterDraw,show:!0,position:tt(V),lng:0,lat:0,height:0,slope:0,pointOpts:{},labelOpts:{},billboardOpts:{}},G=Cesium.Cartographic.fromCartesian(j.position,H.scene.globe.ellipsoid);j.positionDegrees=[Cesium.Math.toDegrees(G.longitude),Cesium.Math.toDegrees(G.latitude),G.height],A(j),N.value.push(j)})}nt(()=>{m.forEach(H=>H()),m=[]});const Z={renderDatas:N,startNew:C,stop:T,clear:F,handleMouseClick:_,handleMouseMove:E};return Object.assign(n.proxy,Z),()=>{var H,V,j;const{createGuid:G}=Cesium,J=[],U=[],z=[],Y=[];if(N.value.forEach((Q,te)=>{var X;const ne=Object.assign({},e.pointOpts,Q.pointOpts);U.push({position:Q.position,id:G(),_vcPolylineIndx:te,...ne,show:Q.show&&((X=e.pointOpts)==null?void 0:X.show)||e.editable||Q.drawStatus===Me.Drawing});const re=Object.assign({},e.labelOpts,Q.labelOpts);if(e.showLabel)if(i==="VcDrawingPin"){const pe=Object.assign({},e.billboardOpts,Q.billboardOpts);Y.push({position:Q.position,id:G(),_vcPolylineIndx:te,...pe}),re.text&&z.push({position:Q.position,id:G(),...re})}else z.push({position:Q.position,id:G(),text:q(Q),...re})}),J.push(S(Co,{enableMouseEvent:e.enableMouseEvent,points:U,onMouseover:w,onMouseout:O,onReady:P})),J.push(S(bo,{enableMouseEvent:e.enableMouseEvent,labels:z,onReady:k})),i==="VcDrawingPin"&&J.push(S(Sc,{enableMouseEvent:e.enableMouseEvent,billboards:Y})),(H=e.drawtip)!=null&&H.show&&h.value){const{viewer:Q}=a;J.push(S(En,{position:p.value,pixelOffset:(V=e.drawtip)==null?void 0:V.pixelOffset,teleport:{to:Q.container}},()=>S("div",{class:"vc-drawtip vc-tooltip--style"},c.value)))}if(v.value){const Q=[];if(y.value){const X=e.editorOpts;for(const ne in X)if(!Array.isArray(X[ne])&&typeof X[ne]!="number"){const re={...X[ne]};delete re.color,Q.push(S(ai,{style:{color:X[ne].color,background:X[ne].background},...re,onclick:B.bind(void 0,ne)},()=>S(At,{...X[ne].tooltip},()=>{var pe;return S("strong",null,((pe=X[ne].tooltip)==null?void 0:pe.tip)||s(`vc.drawing.editor.${ne}`))})))}}const{viewer:te}=a;J.push(S(En,{position:b.value,pixelOffset:(j=e.editorOpts)==null?void 0:j.pixelOffset,teleport:{to:te.container},onMouseenter:I,onMouseleave:R},()=>S("div",{class:"vc-editor"},Q)))}return S(Hn,{ref:M,show:e.show,onReady:D},()=>J)}}var j0=K({name:"VcMeasurementPoint",props:{...Ut,measureUnits:Object,labelOpts:Object,locale:String,decimals:Object,heightReference:Number,showLabel:Boolean},emits:xt,setup(e,t){return Dc(e,t,"VcMeasurementPoint")}}),F0=K({name:"VcMeasurementArea",props:{...Ut,measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,polygonOpts:Object,labelOpts:Object,labelsOpts:Object,locale:String,decimals:Object,showDistanceLabel:Boolean,showAngleLabel:Boolean,showLabel:Boolean,loop:Boolean,clampToGround:Boolean,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return wo(e,t,"VcMeasurementArea")}}),k0=K({name:"VcMeasurementRectangle",props:{...Ut,measureUnits:Object,polylineOpts:Object,primitiveOpts:Object,polygonOpts:Object,labelOpts:Object,labelsOpts:Object,clampToGround:Boolean,edge:Number,locale:String,decimals:Object,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,loop:Boolean,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return ln(e,t,"VcMeasurementRectangle")}}),R0=K({name:"VcMeasurementRegular",props:{...Ut,polylineOpts:Object,primitiveOpts:Object,polygonOpts:Object,labelOpts:Object,labelsOpts:Object,clampToGround:Boolean,edge:Number,measureUnits:Object,locale:String,decimals:Object,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,loop:Boolean,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return ln(e,t,"VcMeasurementRegular")}});function Bc(e,t,i,n,o,s,a){i.cesiumEvents=[];const r=Ne(e,t,i);if(r===void 0)return;const{t:l}=Ct(),{$services:c}=r,{emit:u}=t,d=ee(!1),h=Ee({}),p=vi(e),v=ee(null),b=ee(null),y=ee(!1),x=ee(null);let M,g;const w=(B,F)=>{var q,Z;const H=g==null?void 0:g.cmpRef.value;(q=H==null?void 0:H.handleMouseClick)==null||q.call(H,B.position,F);let V;const j=i.proxy;if(j.editingActionName&&(V=C(j.editingActionName)),V&&V!==g){const G=V.cmpRef.value;(Z=G==null?void 0:G.handleMouseClick)==null||Z.call(G,B.position,F)}},O=(B,F)=>{var q,Z;const H=g==null?void 0:g.cmpRef.value;(q=H==null?void 0:H.handleMouseMove)==null||q.call(H,B.endPosition,F);let V;const j=i.proxy;if(j.editingActionName&&(V=C(j.editingActionName)),V&&V!==g){const G=V.cmpRef.value;(Z=G==null?void 0:G.handleMouseMove)==null||Z.call(G,B.endPosition,F)}},I=(B,F)=>{var q,Z;const H=g==null?void 0:g.cmpRef.value;(q=H==null?void 0:H.handleDoubleClick)==null||q.call(H,B.position,F);let V;const j=i.proxy;if(j.editingActionName&&(V=C(j.editingActionName)),V&&V!==g){const G=V.cmpRef.value;(Z=G==null?void 0:G.handleDoubleClick)==null||Z.call(G,B.position,F)}},{activate:R,deactivate:D,destroy:P,isActive:k}=rd(c,{handleMouseClick:w,handleMouseMove:O,handleDoubleClick:I});i.createCesiumObject=async()=>(d.value=!0,M=new md,n.value),i.mount=async()=>($(),y.value=!0,R(),!0),i.unmount=async()=>(g&&(f(g),g=void 0),D(),P(),y.value=!1,!0);const N=(B,F,q)=>{const{Cesium3DTileFeature:Z,Cesium3DTileset:H,Cartesian3:V,defined:j,Model:G,Ray:J}=Cesium;if(Cesium.SuperMapVersion)return B.pickPosition(F);let U;const z={},Y=new J;if(B.pickPositionSupported){M.hide(B);const Q=B.pick(F,1,1);if(M.restore(B),j(Q)&&(Q instanceof Z||Q.primitive instanceof H||Q.primitive instanceof G||Cesium.S3MTilesLayer&&Q.primitive instanceof Cesium.S3MTilesLayer)&&(U=B.pickPosition(F,z),j(U)))return V.clone(U,q)}if(j(B.globe)){const Q=B.camera.getPickRay(F,Y);return U=B.globe.pick(Q,B,z),j(U)?V.clone(U,q):void 0}},$=()=>{var B;const F=p.style.value;h.left=F.left,h.top=F.top,h.transform=F.transform;const q=p.attach.value,Z=(B=fe(b))==null?void 0:B.$el;if(Z!==void 0){const H=Z.getBoundingClientRect();F.width=`${H.width}px`,F.height=`${H.height}px`,(q.bottom||q.top)&&!q.left&&!q.right&&(F.left="50%",F.transform="translate(-50%, 0)"),(q.left||q.right)&&!q.top&&!q.bottom&&(F.top="50%",F.transform="translate(0, -50%)")}Object.assign(h,F)},m=ee(null),f=B=>{var F;const{viewer:q}=c;if(yi(B)&&(B=C(B)),!B){r.logger.error("Invalid drawingActionOption or drawingActionOption name");return}const Z=T(B.name);if(Z!==-1){if(g!==void 0){g.actionOpts.color=m.value||"";const H=g.cmpRef.value;(F=H.stop)==null||F.call(H),g.isActive=!1,u("activeEvt",{type:g.name,option:g,isActive:!1},q)}(g==null?void 0:g.name)===(B==null?void 0:B.name)?(g=void 0,n.value[Z].actionOpts.color=m.value||"red"):Be(()=>{n.value[Z].cmpRef.value.startNew(),m.value=n.value[Z].actionOpts.color,n.value[Z].actionOpts.color=e.activeColor,n.value[Z].isActive=!0,g=n.value[Z],u("activeEvt",{type:g.name,option:g,isActive:!0},q)})}},C=B=>n.value.find(F=>F.name===B),T=B=>n.value.findIndex(F=>F.name===B),_=B=>{B?R():(g&&f(g),D()),o.modelValue=B,u("fabUpdated",B)},E=()=>{n.value.forEach(F=>{var q;(q=F.cmpRef.value)==null||q.clear()}),g&&f(g);const{viewer:B}=c;u("clearEvt",{type:"clear",option:s},B)},A=()=>On(r.getServices(),{get drawingFabInstance(){return i},get selectedDrawingActionInstance(){return g},get getWorldPosition(){return N},get drawingHandlerActive(){return k}}),L=({cesiumObject:B})=>{B._vcId=a};return en(Vi,A()),Object.assign(i.proxy,{clearAll:E,deactivate:D,activate:R,toggleAction:f,getFabRef:()=>b.value,getDrawingActionInstance:C,getDrawingActionInstances:()=>n.value,getSelectedDrawingActionInstance:()=>g}),{renderContent:()=>{if(d.value){const B=[],F=[];n.value.forEach(Z=>{B.push(S(us,{ref:Z.actionRef,style:Z.actionStyle,class:Z.actionClass,...Z.actionOpts,onClick:()=>{f(Z)}},()=>S(At,{...Z.actionOpts.tooltip},()=>S("strong",null,Z.tip)))),Z.cmp&&F.push(S(Z.cmp,{ref:Z.cmpRef,editable:e.editable,clampToGround:e.clampToGround,mode:e.mode,onDrawEvt:(H,V)=>{u("drawEvt",H,V)},onEditorEvt:(H,V)=>{u("editorEvt",H,V)},onMouseEvt:(H,V)=>{u("mouseEvt",H,V)},...Z.cmpOpts}))}),n.value.length&&B.push(S(us,{style:{background:s.color,color:s.textColor},class:"vc-draw-button vc-draw-clear",...s,onClick:E},()=>S(At,{...s.tooltip},()=>S("strong",null,s.tooltip.tip||l(`vc.${a}.clear.tip`)))));const q=[];return y.value&&q.push(S("div",{ref:v,class:"vc-drawings-container "+p.classes.value,style:h},t.slots.body!==void 0?t.slots.body(n.value):S($l,{ref:b,class:"vc-draw-button",style:{background:o.color,color:o.textColor},...o,"onUpdate:modelValue":_},{default:()=>B,tooltip:()=>S(At,{...o.tooltip},()=>S("strong",null,o.tooltip.tip||(o.modelValue?l("vc.drawing.collapse"):l("vc.drawing.expand"))))}))),q.push(S(Hn,{ref:x,show:e.show,onReady:L},()=>F)),q}else return ie("v-if")}}}const rO={...xt,fabUpdated:e=>!0,clearEvt:(e,t)=>!0};var js=K({name:"VcMeasurements",props:bc,emits:rO,setup(e,t){var i;const n=oe();n.cesiumClass="VcMeasurements";const{t:o}=Ct(),s=Ee(Object.assign({},it.clearActionOpts,e.clearActionOpts)),a=Ee(Object.assign({},it.mainFabOpts,e.mainFabOpts)),r=Ee(Object.assign({},it.fabActionOpts,e.fabActionOpts)),l=Ee(Object.assign({},it.distanceActionOpts,_("distanceActionOpts"))),c=Ee(at(Ve(it.distanceMeasurementOpts),e.distanceMeasurementOpts)),u=Ee(Object.assign({},it.componentDistanceActionOpts,_("componentDistanceActionOpts"))),d=Ee(at(Ve(it.componentDistanceMeasurementOpts),e.componentDistanceMeasurementOpts)),h=Ee(Object.assign({},it.polylineActionOpts,_("polylineActionOpts"))),p=Ee(at(Ve(it.polylineMeasurementOpts),e.polylineMeasurementOpts)),v=Ee(Object.assign({},it.horizontalActionOpts,_("horizontalActionOpts"))),b=Ee(at(Ve(it.horizontalMeasurementOpts),e.horizontalMeasurementOpts)),y=Ee(Object.assign({},it.verticalActionOpts,_("verticalActionOpts"))),x=Ee(at(Ve(it.verticalMeasurementOpts),e.verticalMeasurementOpts)),M=Ee(Object.assign({},it.heightActionOpts,_("heightActionOpts"))),g=Ee(at(Ve(it.heightMeasurementOpts),e.heightMeasurementOpts)),w=Ee(Object.assign({},it.areaActionOpts,_("areaActionOpts"))),O=Ee(at(Ve(it.areaMeasurementOpts),e.areaMeasurementOpts)),I=Ee(Object.assign({},it.pointActionOpts,_("pointActionOpts"))),R=Ee(at(Ve(it.pointMeasurementOpts),e.pointMeasurementOpts)),D=Ee(Object.assign({},it.rectangleActionOpts,_("rectangleActionOpts"))),P=Ee(at(Ve(it.rectangleMeasurementOpts),e.rectangleMeasurementOpts)),k=Ee(Object.assign({},it.regularActionOpts,_("regularActionOpts"))),N=Ee(at(Ve(it.regularMeasurementOpts),e.regularMeasurementOpts)),$=Ee(Object.assign({},it.circleActionOpts,_("circleActionOpts"))),m=Ee(at(Ve(it.circleMeasurementOpts),e.circleMeasurementOpts)),f={};f.distanceActionOpts=l,f.distanceMeasurementOpts=c,f.componentDistanceActionOpts=u,f.componentDistanceMeasurementOpts=d,f.polylineActionOpts=h,f.polylineMeasurementOpts=p,f.horizontalActionOpts=v,f.horizontalMeasurementOpts=b,f.verticalActionOpts=y,f.verticalMeasurementOpts=x,f.heightActionOpts=M,f.heightMeasurementOpts=g,f.areaActionOpts=w,f.areaMeasurementOpts=O,f.pointActionOpts=I,f.pointMeasurementOpts=R,f.rectangleActionOpts=D,f.rectangleMeasurementOpts=P,f.regularActionOpts=k,f.regularMeasurementOpts=N,f.circleActionOpts=$,f.circleMeasurementOpts=m,f.clearActionOpts=s;const C=ae(()=>e.measurements.map(E=>({name:E,type:"measurement",actionStyle:{background:f[`${Rt(E)}ActionOpts`].color,color:f[`${Rt(E)}ActionOpts`].textColor},actionClass:`vc-measure-${E} vc-measure-button`,actionRef:ee(null),actionOpts:f[`${Rt(E)}ActionOpts`],cmp:T(E),cmpRef:ee(null),cmpOpts:f[`${Rt(E)}MeasurementOpts`],tip:f[`${Rt(E)}ActionOpts`].tooltip.tip||o(`vc.measurement.${E}.tip`),isActive:!1})));function T(E){switch(E){case"distance":case"component-distance":return I0;case"polyline":return A0;case"horizontal":return D0;case"vertical":return B0;case"height":return L0;case"point":return j0;case"area":return F0;case"rectangle":return k0;case"regular":case"circle":return R0;default:return}}function _(E){return ba(it[E],e[E])?r:Object.assign({},r,e[E])}return(i=Bc(e,t,n,C,a,s,"measurement"))==null?void 0:i.renderContent}});js.install=e=>{e.component(js.name,js)};const $0=js,lO=$0,cO=Object.assign({},gt,{icon:"vc-icons-drawing-point"}),uO=Object.assign({},gt,{icon:"vc-icons-drawing-polyline"}),dO=Object.assign({},gt,{icon:"vc-icons-drawing-polygon"}),hO=Object.assign({},gt,{icon:"vc-icons-drawing-rectangle"}),mO=Object.assign({},gt,{icon:"vc-icons-drawing-pin"}),pO=Object.assign({},Os,{pointOpts:Object.assign({},Cn,{show:!1}),billboardOpts:Y5,labelOpts:Object.assign({},yt,{pixelOffset:[0,-30],verticalOrigin:1}),showLabel:!0}),vO=Object.assign({},{}),fO=Object.assign({},gt,{direction:"right",icon:"vc-icons-drawing-button",activeIcon:"vc-icons-drawing-button",verticalActionsAlign:"center",hideIcon:!1,persistent:!1,modelValue:!0,hideActionOnClick:!1,color:"info"}),N0=["pin","point","polyline","polygon","rectangle","regular","circle"],gO=e=>{let t=!0;return e.forEach(i=>{N0.includes(i)||(console.error(`VueCesium: unknown drawing type: ${i}`),t=!1)}),t},Lc={...gc,drawings:{type:Array,default:()=>N0,validator:gO},mainFabOpts:{type:Object,default:()=>fO},fabActionOpts:{type:Object,default:()=>vO},pinActionOpts:{type:Object,default:()=>mO},pinDrawingOpts:{type:Object,default:()=>pO},pointActionOpts:{type:Object,default:()=>cO},pointDrawingOpts:{type:Object,default:()=>Os},polylineActionOpts:{type:Object,default:()=>uO},polylineDrawingOpts:{type:Object,default:()=>ip},polygonActionOpts:{type:Object,default:()=>dO},polygonDrawingOpts:{type:Object,default:()=>Ps},rectangleActionOpts:{type:Object,default:()=>hO},rectangleDrawingOpts:{type:Object,default:()=>fc},circleActionOpts:{type:Object,default:()=>op},circleDrawingOpts:{type:Object,default:()=>eM},regularActionOpts:{type:Object,default:()=>np},regularDrawingOpts:{type:Object,default:()=>tM}},Ft=bi(Lc);var V0=K({name:"VcDrawingPin",props:{...Ut,billboardOpts:Object,labelOpts:Object,heightReference:Number,showLabel:Boolean},emits:xt,setup(e,t){return Dc(e,t,"VcDrawingPin")}}),z0=K({name:"VcDrawingPoint",props:{...Ut,heightReference:Number,labelOpts:Object,showLabel:Boolean},emits:xt,setup(e,t){return Dc(e,t,"VcDrawingPoint")}}),G0=K({name:"VcDrawingPolyline",props:{...Ut,polylineOpts:Object,primitiveOpts:Object,loop:Boolean,clampToGround:Boolean,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,labelOpts:Object,labelsOpts:Object,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return wo(e,t,"VcDrawingPolyline")}}),U0=K({name:"VcDrawingPolygon",props:{...Ut,polylineOpts:Object,primitiveOpts:Object,polygonOpts:Object,loop:Boolean,clampToGround:Boolean,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,labelOpts:Object,labelsOpts:Object,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return wo(e,t,"VcDrawingPolygon")}}),jc=K({name:"VcDrawingRegular",props:{...Ut,polylineOpts:Object,polygonOpts:Object,primitiveOpts:Object,clampToGround:Boolean,edge:Number,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,labelOpts:Object,labelsOpts:Object,loop:Boolean,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return ln(e,t,"VcDrawingRegular")}}),H0=K({name:"VcDrawingRectangle",props:{...Ut,polylineOpts:Object,primitiveOpts:Object,polygonOpts:Object,clampToGround:Boolean,showLabel:Boolean,showDistanceLabel:Boolean,showAngleLabel:Boolean,labelOpts:Object,labelsOpts:Object,loop:Boolean,autoUpdateLabelPosition:Boolean},emits:xt,setup(e,t){return ln(e,t,"VcDrawingRectangle")}});const yO={...xt,fabUpdated:e=>!0,clearEvt:(e,t)=>!0};var Fs=K({name:"VcDrawings",props:Lc,emits:yO,setup(e,t){var i;const n=oe();n.cesiumClass="VcDrawings";const{t:o}=Ct(),s={},a=Ee(Object.assign({},Ft.clearActionOpts,e.clearActionOpts)),r=Ee(Object.assign({},Ft.mainFabOpts,e.mainFabOpts)),l=Ee(Object.assign({},Ft.fabActionOpts,e.fabActionOpts)),c=Ee(Object.assign({},Ft.pointActionOpts,P("pointActionOpts"))),u=Ee(at(Ve(Ft.pointDrawingOpts),e.pointDrawingOpts)),d=Ee(Object.assign({},Ft.polylineActionOpts,P("polylineActionOpts"))),h=Ee(at(Ve(Ft.polylineDrawingOpts),e.polylineDrawingOpts)),p=Ee(Object.assign({},Ft.polygonActionOpts,P("polygonActionOpts"))),v=Ee(at(Ve(Ft.polygonDrawingOpts),e.polygonDrawingOpts)),b=Ee(Object.assign({},Ft.rectangleActionOpts,P("rectangleActionOpts"))),y=Ee(at(Ve(Ft.rectangleDrawingOpts),e.rectangleDrawingOpts)),x=Ee(Object.assign({},Ft.circleActionOpts,P("circleActionOpts"))),M=Ee(at(Ve(Ft.circleDrawingOpts),e.circleDrawingOpts)),g=Ee(Object.assign({},Ft.regularActionOpts,P("regularActionOpts"))),w=Ee(at(Ve(Ft.regularDrawingOpts),e.regularDrawingOpts)),O=Ee(Object.assign({},Ft.pinActionOpts,P("pinActionOpts"))),I=Ee(at(Ve(Ft.pinDrawingOpts),e.pinDrawingOpts));s.pointActionOpts=c,s.pointDrawingOpts=u,s.polylineActionOpts=d,s.polylineDrawingOpts=h,s.polygonActionOpts=p,s.polygonDrawingOpts=v,s.rectangleActionOpts=b,s.rectangleDrawingOpts=y,s.circleActionOpts=x,s.circleDrawingOpts=M,s.regularActionOpts=g,s.regularDrawingOpts=w,s.pinActionOpts=O,s.pinDrawingOpts=I,s.clearActionOpts=a;const R=ae(()=>e.drawings.map(k=>({name:k,type:"drawing",actionStyle:{background:s[`${Rt(k)}ActionOpts`].color,color:s[`${Rt(k)}ActionOpts`].textColor},actionClass:`vc-draw-${k} vc-draw-button`,actionRef:ee(null),actionOpts:s[`${Rt(k)}ActionOpts`],cmp:D(k),cmpRef:ee(null),cmpOpts:s[`${Rt(k)}DrawingOpts`],tip:s[`${Rt(k)}ActionOpts`].tooltip.tip||o(`vc.drawing.${Rt(k)}.tip`),isActive:!1})));function D(k){switch(k){case"pin":return V0;case"point":return z0;case"polyline":return G0;case"polygon":return U0;case"rectangle":return y.regular?jc:H0;case"circle":case"regular":return jc;default:return}}function P(k){return ba(Ft[k],e[k])?l:Object.assign({},l,e[k])}return(i=Bc(e,t,n,R,r,a,"drawing"))==null?void 0:i.renderContent}});Fs.install=e=>{e.component(Fs.name,Fs)};const W0=Fs,bO=W0;class CO{constructor(t){const{Resource:i,defaultValue:n,Credit:o,Event:s}=Cesium;this._url=t.url;const a=i.createIfNeeded(this._url);a.appendForwardSlash(),this._ready=!1,this._resource=a,this._tileDiscardPolicy=t.tileDiscardPolicy,this._tileWidth=256,this._tileHeight=256,this._minimumLevel=t.minimumLevel||0,this._maximumLevel=t.maximumLevel||20,this._tilingScheme=t.tilingScheme||new Cesium.WebMercatorTilingScheme,this._rectangle=t.rectangle||this._tilingScheme.rectangle;let r=t.credit;typeof r=="string"&&(r=new o(r)),this._credit=r,this.enablePickFeatures=n(t.enablePickFeatures,!1),this._hasAlphaChannel=n(t.hasAlphaChannel,!0),this._errorEvent=new s,this._readyPromise=qo(),this._ready=!0,this._readyPromise.resolve(!0),this._subdomains=t.subdomains||["01","02","03","04"],this._domain=t.domain||"webst",this._style=t.mapStyle||"6",this._lang=t.lang||"zh_cn",this._scl=t.scl||"1",this._ltype=t.ltype||"0"}get url(){return this._resource._url}get proxy(){return this._resource.proxy}get tileWidth(){if(!this._ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this._ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this._ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}get tilingScheme(){if(!this._ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get tileDiscardPolicy(){if(!this.ready)throw new Cesium.DeveloperError("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}get errorEvent(){return this._errorEvent}get ready(){return this._ready}get readyPromise(){return this._readyPromise.promise}get credit(){if(!this.ready)throw new Cesium.DeveloperError("credit must not be called before the imagery provider is ready.");return this._credit}get hasAlphaChannel(){if(!this.ready)throw new Cesium.DeveloperError("hasAlphaChannel must not be called before the imagery provider is ready.");return this._hasAlphaChannel}getTileCredits(t,i,n){if(!this.ready)throw new Cesium.DeveloperError("getTileCredits must not be called before the imagery provider is ready.")}requestImage(t,i,n,o){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");return Cesium.ImageryProvider.loadImage(this,wO.call(this,t,i,n,o))}pickFeatures(t,i,n,o,s){}}function wO(e,t,i,n){let o=this._url;const s=this._subdomains;return o=o.replace("{domain}",this._domain).replace("{s}",s[(e+t+i)%s.length]).replace("{lang}",this._lang).replace("{style}",this._style).replace("{scl}",this._scl).replace("{ltype}",this._ltype).replace("{x}",e).replace("{y}",t).replace("{z}",i),this._resource.getDerivedResource({url:o,request:n})}const q0={url:{type:String,default:"https://{domain}{s}.is.autonavi.com/appmaptile?lang={lang}&size=1&style={style}&scl={scl}<ype={ltype}&x={x}&y={y}&z={z}"},subdomains:{type:Array,default:()=>["01","02","03","04"]},domain:{type:String,default:"webst"},lang:{type:String,default:"zh_cn"},mapStyle:{type:String,default:"6"},scl:{type:String,default:"1"},ltype:{type:String,default:"0"},...St,...di,...oi,...Dt,...ki,...Ln};var Q0=K({name:"VcImageryProviderAmap",props:q0,emits:dt,setup(e,t){const i=oe();i.cesiumClass="AMapImageryProvider";const n=ut(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.AMapImageryProvider=Cesium.AMapImageryProvider||CO,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const o=n.transformProps(e);return new Cesium.AMapImageryProvider(o)},()=>{var o;return ie(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const Z0={url:{type:[String,Object],default:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},...Mr,...jo,usePreCachedTilesIfAvailable:{type:Boolean,default:!0},...Or,...Wa,...Dt,...ki,...$e,...St,...Gi,...Ui,...oi};var J0=K({name:"VcImageryProviderArcgis",props:Z0,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="ArcGisMapServerImageryProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});class Yi{constructor(t,i){isNaN(t)&&(t=isNaN(t)?0:t),yi(t)&&(t=parseFloat(t)),isNaN(i)&&(i=isNaN(i)?0:i),yi(i)&&(i=parseFloat(i)),this.lng=t,this.lat=i}equals(t){return t&&this.lat===t.lat&&this.lng===t.lng}}Yi.isInRange=function(e){return e&&e.lng<=180&&e.lng>=-180&&e.lat<=74&&e.lat>=-74};class X0{constructor(t,i){this.x=t||0,this.y=i||0}equals(t){return t&&t.x===this.x&&t.y===this.y}}const je=class fa{lngLatToMercator(t,i){return fa.convertLL2MC(t)}lngLatToPoint(t){const i=fa.convertLL2MC(t);return new X0(i.lng,i.lat)}mercatorToLngLat(t,i){return fa.convertMC2LL(t)}pointToLngLat(t){const i=new Yi(t.x,t.y);return fa.convertMC2LL(i)}pointToPixel(t,i,n,o,s){if(!t)return;t=this.lngLatToMercator(t,s),n=this.lngLatToMercator(n);const a=this.getZoomUnits(i),r=Math.round((t.lng-n.lng)/a+o.width/2),l=Math.round((n.lat-t.lat)/a+o.height/2);return new X0(r,l)}pixelToPoint(t,i,n,o,s){if(!t)return;const a=this.getZoomUnits(i),r=n.lng+a*(t.x-o.width/2),l=n.lat-a*(t.y-o.height/2),c=new Yi(r,l);return this.mercatorToLngLat(c,s)}getZoomUnits(t){return Math.pow(2,18-t)}};je.EARTHRADIUS=637099681e-2,je.MCBAND=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],je.LLBAND=[75,60,45,30,15,0],je.MC2LL=[[1410526172116255e-23,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,173379812e-1],[-7435856389565537e-24,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,1026014486e-2],[-3030883460898826e-23,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,685681737e-2],[-1981981304930552e-23,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,448277706e-2],[309191371068437e-23,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,25551644e-1],[2890871144776878e-24,8983055095805407e-21,-3068298e-14,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],je.LL2MC=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,6477955746671607e-7,-4082003173641316e-6,1077490566351142e-5,-1517187553151559e-5,1205306533862167e-5,-5124939663577472e-6,9133119359512032e-7,67.5],[.00337398766765,111320.7020202162,4481351045890365e-9,-2339375119931662e-8,7968221547186455e-8,-1159649932797253e-7,9723671115602145e-8,-4366194633752821e-8,8477230501135234e-9,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837749470245e-9,992013.7397791013,-122195221711287e-8,1340652697009075e-9,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758690035394e-9,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],je.getDistanceByMC=function(e,t){if(!e||!t||(e=je.convertMC2LL(e),!e))return 0;const i=je.toRadians(e.lng),n=je.toRadians(e.lat);if(t=je.convertMC2LL(t),!t)return 0;const o=je.toRadians(t.lng),s=je.toRadians(t.lat);return je.getDistance(i,o,n,s)},je.getDistanceByLL=function(e,t){if(!e||!t)return 0;e.lng=je.getLoop(e.lng,-180,180),e.lat=je.getRange(e.lat,-74,74),t.lng=je.getLoop(t.lng,-180,180),t.lat=je.getRange(t.lat,-74,74);const i=je.toRadians(e.lng),n=je.toRadians(e.lat),o=je.toRadians(t.lng),s=je.toRadians(t.lat);return je.getDistance(i,o,n,s)},je.convertMC2LL=function(e){let t;const i=new Yi(Math.abs(e.lng),Math.abs(e.lat));for(let o=0;o<je.MCBAND.length;o++)if(i.lat>=je.MCBAND[o]){t=je.MC2LL[o];break}const n=je.convertor(e,t);return new Yi(n==null?void 0:n.lng.toFixed(6),n==null?void 0:n.lat.toFixed(6))},je.convertLL2MC=function(e){let t;e.lng=je.getLoop(e.lng,-180,180),e.lat=je.getRange(e.lat,-74,74);const i=new Yi(e.lng,e.lat);for(let o=0;o<je.LLBAND.length;o++)if(i.lat>=je.LLBAND[o]){t=je.LL2MC[o];break}if(!t){for(let o=je.LLBAND.length-1;o>=0;o--)if(i.lat<=-je.LLBAND[o]){t=je.LL2MC[o];break}}const n=je.convertor(e,t);return new Yi(n==null?void 0:n.lng.toFixed(2),n==null?void 0:n.lat.toFixed(2))},je.convertor=function(e,t){if(!e||!t)return;let i=t[0]+t[1]*Math.abs(e.lng);const n=Math.abs(e.lat)/t[9];let o=t[2]+t[3]*n+t[4]*n*n+t[5]*n*n*n+t[6]*n*n*n*n+t[7]*n*n*n*n*n+t[8]*n*n*n*n*n*n;return i*=e.lng<0?-1:1,o*=e.lat<0?-1:1,new Yi(i,o)},je.getDistance=function(e,t,i,n){return je.EARTHRADIUS*Math.acos(Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos(t-e))},je.toRadians=function(e){return Math.PI*e/180},je.toDegrees=function(e){return 180*e/Math.PI},je.getRange=function(e,t,i){return t!=null&&(e=Math.max(e,t)),i!=null&&(e=Math.min(e,i)),e},je.getLoop=function(e,t,i){for(;e>i;)e-=i-t;for(;e<t;)e+=i-t;return e};let _O=je;class xO{constructor(t){const{defaultValue:i,Ellipsoid:n,WebMercatorProjection:o,Cartesian2:s,Cartographic:a,Math:r,Rectangle:l}=Cesium;t=t||{},this._ellipsoid=i(t.ellipsoid,n.WGS84),this._projection=new o(this._ellipsoid);const c=new _O;this._projection.project=function(h,p){return p=p||{},t.projectionTransforms&&t.projectionTransforms.from!==t.projectionTransforms.to&&(t.projectionTransforms.to.toUpperCase()==="WGS84"?(p=ld(r.toDegrees(h.longitude),r.toDegrees(h.latitude)),p=ol(p[0],p[1])):p=ol(r.toDegrees(h.longitude),r.toDegrees(h.latitude))),p[0]=Math.min(p[0],180),p[0]=Math.max(p[0],-180),p[1]=Math.min(p[1],74.000022),p[1]=Math.max(p[1],-71.988531),p=c.lngLatToPoint(new Yi(p[0],p[1])),new s(p.x,p.y)},this._projection.unproject=function(h,p){return p=p||{},p=c.mercatorToLngLat(new Yi(h.x,h.y)),p[0]=(p[0]+180)%360-180,t.projectionTransforms&&t.projectionTransforms.from!==t.projectionTransforms.to&&(t.projectionTransforms.to.toUpperCase()==="WGS84"?(p=nl(p.lng,p.lat),p=al(p[0],p[1])):p=nl(p.lng,p.lat)),new a(Cesium.Math.toRadians(p[0]),Cesium.Math.toRadians(p[1]))},this._rectangleSouthwestInMeters=new s(-2003772637e-2,-1247410417e-2),this._rectangleNortheastInMeters=new s(2003772637e-2,1247410417e-2);const u=this._projection.unproject(this._rectangleSouthwestInMeters),d=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new l(u.longitude,u.latitude,d.longitude,d.latitude),this.resolutions=[];for(let h=0;h<19;h++)this.resolutions[h]=256*Math.pow(2,18-h)}getNumberOfXTilesAtLevel(t){return 1<<t}getNumberOfYTilesAtLevel(t){return 1<<t}rectangleToNativeRectangle(t,i){const{defined:n,Rectangle:o}=Cesium,s=this._projection,a=s.project(o.southwest(t)),r=s.project(o.northeast(t));return n(i)?(i.west=a.x,i.south=a.y,i.east=r.x,i.north=r.y,i):new o(a.x,a.y,r.x,r.y)}tileXYToNativeRectangle(t,i,n,o){const{defined:s,Rectangle:a}=Cesium,r=this.resolutions[n],l=t*r,c=(t+1)*r,u=((i=-i)+1)*r,d=i*r;return s(o)?(o.west=l,o.south=d,o.east=c,o.north=u,o):new a(l,d,c,u)}tileXYToRectangle(t,i,n,o){const{Cartesian2:s}=Cesium,a=this.tileXYToNativeRectangle(t,i,n,o),r=this._projection,l=r.unproject(new s(a.west,a.south)),c=r.unproject(new s(a.east,a.north));return a.west=l.longitude,a.south=l.latitude,a.east=c.longitude,a.north=c.latitude,a}positionToTileXY(t,i,n){const{Rectangle:o,defined:s,Cartesian2:a}=Cesium,r=this._rectangle;if(!o.contains(r,t))return;const l=this._projection.project(t);if(!s(l))return;const c=this.resolutions[i],u=Math.floor(l.x/c),d=-Math.floor(l.y/c);return s(n)?(n.x=u,n.y=d,n):new a(u,d)}get ellipsoid(){return this._ellipsoid}get rectangle(){return this._rectangle}get projection(){return this._projection}}class EO{constructor(t){const{Resource:i,defaultValue:n,Credit:o,Event:s}=Cesium;this._subdomains=n(t.subdomains,["0","1","2","3"]),t.url?this._url=t.url:t.mapStyle==="img"?this._url="//maponline{s}.bdimg.com/starpic/u=x={x};y={y};z={z};v=009;type=sate&qt=satepc&app=webearth2&udt={udt}&fm=46&v=009":t.mapStyle==="vec"?this._url="//maponline{s}.bdimg.com/tile/?qt={qt}&x={x}&y={y}&z={z}&styles={styles}&scaler={scale}&udt={udt}&from=jsapi2_0&showtext={showtext}":t.mapStyle==="traffic"?this._url="https://its.map.baidu.com/traffic/TrafficTileService?time={time}&label={labelStyle}&v=016&level={z}&x={x}&y={y}&scaler={scale}":this._url="//api.map.baidu.com/customimage/tile?&x={x}&y={y}&z={z}&udt={udt}&scale={scale}&ak={ak}&customid={mapStyle}";const a=i.createIfNeeded(this._url);a.appendForwardSlash(),this._ready=!1,this._resource=a,this._tileDiscardPolicy=t.tileDiscardPolicy,this._tileWidth=256,this._tileHeight=256,this._minimumLevel=t.minimumLevel||0,this._maximumLevel=t.maximumLevel||18,this._tilingScheme=new xO(t),this._rectangle=n(t.rectangle,this._tilingScheme.rectangle);let r=t.credit;typeof r=="string"&&(r=new o(r)),this._credit=r,this.enablePickFeatures=n(t.enablePickFeatures,!1),this._hasAlphaChannel=n(t.hasAlphaChannel,!0),this._errorEvent=new s,this._ready=!0,this._labelStyle=t.labelStyle||"web2D",this._showtext=t.showtext||"1",this._qt=t.qt,this._styles=t.styles,this._scale=t.scale,this._ak=t.ak,this._mapStyle=t.mapStyle}get url(){return this._resource.url}get proxy(){return this._resource.proxy}get tileWidth(){if(!this._ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this._ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this._ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}get tilingScheme(){if(!this._ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get tileDiscardPolicy(){if(!this.ready)throw new Cesium.DeveloperError("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}get errorEvent(){return this._errorEvent}get ready(){return this._ready}get credit(){if(!this.ready)throw new Cesium.DeveloperError("credit must not be called before the imagery provider is ready.");return this._credit}get hasAlphaChannel(){if(!this.ready)throw new Cesium.DeveloperError("hasAlphaChannel must not be called before the imagery provider is ready.");return this._hasAlphaChannel}getTileCredits(t,i,n){if(!this.ready)throw new Cesium.DeveloperError("getTileCredits must not be called before the imagery provider is ready.")}requestImage(t,i,n,o){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");return Cesium.ImageryProvider.loadImage(this,MO.call(this,t,i,n,o))}pickFeatures(t,i,n,o,s){}}function MO(e,t,i,n){let o=this._url;const s=this._subdomains;return o=o.replace("{s}",s[(e+t+i)%s.length]).replace("{qt}",this._qt).replace("{x}",e).replace("{y}",-t).replace("{z}",i).replace("{styles}",this._styles).replace("{scale}",this._scale).replace("{mapStyle}",this._mapStyle).replace("{labelStyle}",this._labelStyle).replace("{ak}",this._ak).replace("{time}",String(new Date().getTime())).replace("{udt}",String(new Date().getTime())).replace("{showtext}",this._showtext),this._resource.getDerivedResource({url:o,request:n})}const Y0={...wi,...Dt,...$e,...jo,...St,...di,...oi,projectionTransforms:{type:[Boolean,Object],default:()=>({from:"BD09",to:"WGS84"})},scale:{type:String,default:"2"},ak:{type:String,default:"5ieMMexWmzB9jivTq6oCRX9j"},subdomains:{type:Array,default:()=>["0","1","2","3"]},mapStyle:{type:String,default:"vec"},qt:{type:String,default:"vtile"},styles:{type:String,default:"pl"},showtext:{type:String,default:"1"}};var K0=K({name:"VcImageryProviderBaidu",props:Y0,emits:dt,setup(e,t){const i=oe();i.cesiumClass="BaiduMapImageryProvider";const n=ut(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.BaiduMapImageryProvider=Cesium.BaiduMapImageryProvider||EO,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const o=n.transformProps(e);return new Cesium.BaiduMapImageryProvider(o)},()=>{var o;return ie(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const eg={url:{type:[String,Object],default:"https://dev.virtualearth.net"},bmKey:String,tileProtocol:String,mapStyle:{type:String,default:"Aerial"},culture:{type:String,default:""},...$e,...jo};var tg=K({name:"VcImageryProviderBing",props:eg,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="BingMapsImageryProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const ig={...wi,...$e,...jo,...St,metadata:Object};var ng=K({name:"VcImageryProviderGoogle",props:ig,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="GoogleEarthEnterpriseImageryProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const og={...ki,...$e,cells:{type:Number,default:8},color:{type:[String,Object,Array],default:()=>[1,1,1,.4],watcherOptions:{cesiumObjectBuilder:Te}},...Uu,glowWidth:{type:Number,default:6},backgroundColor:{type:[String,Array,Object],default:()=>[0,.5,0,.2],watcherOptions:{cesiumObjectBuilder:Te}},...Gi,...Ui,canvasSize:{type:Number,default:256}};var ag=K({name:"VcImageryProviderGrid",props:og,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="GridImageryProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const OO={};var sg=K({name:"VcImageryProviderIon",props:{assetId:Number,...Sr,server:[String,Object]},emits:dt,setup(e,t){const i=oe();i.cesiumClass="IonImageryProvider";const n=ut(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{const o=n.transformProps(e);return nn(Cesium.VERSION,"1.104")&&typeof Cesium[i.cesiumClass].fromAssetId=="function"?await Cesium.IonImageryProvider.fromAssetId(o.assetId,o):new Cesium.IonImageryProvider(o)},()=>{var o;return ie(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const rg={url:{type:[String,Object],default:"https://api.mapbox.com/styles/v1/"},username:{type:String,default:"mapbox"},styleId:String,...Sr,tilesize:{type:Number,default:512},scaleFactor:Boolean,...$e,...di,...oi,...Dt,...St};var lg=K({name:"VcImageryProviderMapbox",props:rg,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="MapboxStyleImageryProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const cg={url:{type:String,default:"https://a.tile.openstreetmap.org"},...Pr,...Dt,...di,...oi,...$e,credit:{type:[String,Object],default:"MapQuest, Open Street Map and contributors, CC-BY-SA"}};var ug=K({name:"VcImageryProviderOsm",props:cg,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="OpenStreetMapImageryProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const dg={...wi,...Dt,...St,...$e,...Gi,...Ui};var hg=K({name:"VcImageryProviderSingletile",props:dg,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="SingleTileImageryProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const pa={NONE:0,STORING:1,STORED:2,FAILED:3};class PO{constructor(t){if(!Cesium.defined(t.name))throw new Cesium.DeveloperError("options.name is required.");const i=window.indexedDB.open(this.dbname);this.layer=t.layer||null,this.storageType=t.storageType||"arrayBuffer",this.creatingTable=!1,this.cachestatus={},this.dbname=t.name;const n=this;return new Promise((o,s)=>{i.onsuccess=a=>{n.db=a.target.result,n.version=n.db.version,n.cachestatus=n.cachestatus||{},o(n)},i.onupgradeneeded=a=>{n.db=a.target.result,n.version=n.db.version,o(n)},i.onerror=a=>{n.db=null,s("create database fail, error code : "+a.target.errorcode)}})}checkObjectStoreExist(t){return Cesium.defined(this.db)?this.db.objectStoreNames.contains(t):!1}createObjectStore(t){return new Promise((i,n)=>{if(this.creatingTable)n(!1);else{if(this.db.objectStoreNames.contains(t)){n(!1);return}this.creatingTable=!0;const o=parseInt(this.db.version);this.db.close();const s=this,a=window.indexedDB.open(this.dbname,o+1);a.onupgradeneeded=r=>{const l=r.target.result;s.db=l;const c=l.createObjectStore(t,{keyPath:"id"});if(Cesium.defined(c)){c.createIndex("value","value",{unique:!1}),s.creatingTable=!1,s.cachestatus=s.cachestatus||{},s.cachestatus[t]={},s.db.close();const u=window.indexedDB.open(s.dbname);u.onsuccess=d=>{s.db=d.target.result,i(!0)}}else s.creatingTable=!1,i(!1)},a.onsuccess=r=>{r.target.result.close(),i(!0)},a.onerror=r=>{s.creatingTable=!1,n(!1)}}})}putElementInDB(t,i,n){return new Promise((o,s)=>{if(!Cesium.defined(this.db)){s(!1);return}const{cachestatus:a,db:r}=this;if(Cesium.defined(a[t])&&Cesium.defined(a[t][i]&&(a[t][i]===pa.STORING||a[t][i]===pa.STORED))){o(!1);return}if(r.objectStoreNames.contains(t)){a[t]=a[t]||{};try{const l=r.transaction([t],"readwrite").objectStore(t).add({id:i,value:n});a[t][i]=pa.STORING,l.onsuccess=c=>{a[t][i]=pa.STORED,o(!0)},l.onerror=c=>{a[t][i]=pa.FAILED,o(!1)}}catch(l){s(null);return}}else this.createObjectStore(t).then(()=>{const l=r.transaction([t],"readwrite").objectStore(t).add({id:i,value:n});l.onsuccess=function(c){o(!0)},l.onerror=function(c){s(!1)}},()=>{s(!1)})})}getElementFromDB(t,i){return new Promise((n,o)=>{const{db:s}=this;if(!Cesium.defined(s)||!s.objectStoreNames.contains(t))return null;try{const a=s.transaction([t]).objectStore(t).get(i);a.onsuccess=r=>Cesium.defined(r.target.result)?n(r.target.result.value):o(null),a.onerror=r=>{o(null)}}catch(a){o(null)}})}updateElementInDB(t,i,n){return new Promise((o,s)=>{const{db:a}=this;if(!Cesium.defined(a)){o(!1);return}if(!a.objectStoreNames.contains(t)){o(!1);return}try{const r=a.transaction([t],"readwrite").objectStore(t).put({id:i,value:n});r.onsuccess=()=>{o(!0)},r.onerror=()=>{o(!1)}}catch(r){o(!1)}})}removeElementFromDB(t,i){return new Promise((n,o)=>{const{db:s}=this;if(!Cesium.defined(s)){n(!1);return}if(!s.objectStoreNames.contains(t)){n(!1);return}try{const a=s.transaction([t],"readwrite").objectStore(t).delete(i);a.onsuccess=()=>{n(!0)},a.onerror=()=>{n(!1)}}catch(a){n(!1)}})}clear(t){return new Promise((i,n)=>{const{db:o}=this;if(!Cesium.defined(o)){i(!1);return}if(!o.objectStoreNames.contains(t)){i(!1);return}try{const s=o.transaction([t],"readwrite").objectStore(t).clear();s.onsuccess=()=>{i(!0)},s.onerror=()=>{i(!1)}}catch(s){i(!1)}})}}class SO{constructor(t){const{appendForwardSlash:i,Credit:n,defaultValue:o,defined:s,DeveloperError:a,Event:r,Resource:l,Math:c}=Cesium;t=o(t,{});const{url:u}=t;if(!s(u))throw new a("options.url is required.");const d=u.substring(0,u.indexOf("datas"));this.tablename=u.substring(0,u.indexOf("datas/")+6,u.length);const h=this;new PO({name:d+this.tablename}).then(b=>{h._indexedDBScheduler=b}),this._indexedDBSetting={isOpen:!1,clear:()=>{h._indexedDBScheduler.clear(h.tablename)}},this.isSci=!1,this.isTileMap=!1;const p=i(u);if(p.indexOf("rest/maps")>-1)this.isTileMap=!0,this.layersID=t.layersID;else{if(!(p.indexOf("rest/realspace")>-1))throw new a("The url type is not supported!");this.isSci=!0,this.layersID=void 0}this._url=p,this._resource=l.createIfNeeded(p),this._transparent=o(t.transparent,!0),this._name=t.name||"",this._urlTemplate=void 0,this._errorEvent=new r,this._fileExtension="png",this._tileWidth=256,this._tileHeight=256,this._minimumLevel=o(t.minimumLevel,0),this._maximumLevel=t.maximumLevel,this._rectangle=void 0,this._tilingScheme=void 0,this._tileDiscardPolicy=t.tileDiscardPolicy,this._fRatio=o(t.ratio,c.DEGREES_PER_RADIAN/6378137),this._scales=[],this._coordUnit="DEGREE";let v=o(t.credit,new n("MapQuest, SuperMap iServer Imagery"));typeof v=="string"&&(v=new n(v)),this._credit=v,this._ready=!1,this._readyPromise=qo(),this._options=t}get url(){return this._url}get name(){return this._name}set name(t){this._name=t}get tileWidth(){if(!this._ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this._ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this._ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this._ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}get tilingScheme(){if(!this._ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this._ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get errorEvent(){return this._errorEvent}get ready(){return this._ready}get credit(){return this._credit}get hasAlphaChannel(){return!0}get readyPromise(){return this._readyPromise.promise}get ratio(){return this._fRatio}set ratio(t){this._fRatio=t}get tileDiscardPolicy(){return this._tileDiscardPolicy}getTileCredits(t,i,n){if(!this.ready)throw new Cesium.DeveloperError("getTileCredits must not be called before the imagery provider is ready.")}requestImage(t,i,n,o){const{defined:s,DeveloperError:a,ImageryProvider:r}=Cesium;if(!this.ready)throw new a("requestImage must not be called before the imagery provider is ready.");const l=IO.call(this,t,i,n),c=this._resource.getDerivedResource({url:l,request:o}),u=this;if(this._indexedDBSetting.isOpen){if(s(this._indexedDBScheduler)){const d=this._indexedDBScheduler.getElementFromDB(this.tablename,l);try{return d.then(h=>{if(s(h)){const p=new Image;return p.src=h,p}return r.loadImage(u,c)})}catch(h){return r.loadImage(u,c)}}}else return r.loadImage(this,c)}pickFeatures(t,i,n,o,s){}async init(){await AO.call(this)}}let mg={};const Fc=["1.690163571602655E-9","3.3803271432053056E-9","6.760654286410611E-9","1.3521308572821242E-8","2.7042617145642484E-8","5.408523429128511E-8","1.0817046858256998E-7","2.1634093716513974E-7","4.3268187433028044E-7","8.653637486605571E-7","1.7307274973211203E-6","3.4614549946422405E-6","6.9229099892844565E-6","1.3845819978568952E-5","2.7691639957137904E-5","5.53832799142758E-5","1.107665598285516E-4","2.215331196571032E-4","4.430662393142064E-4","8.861324786284128E-4","1.772264957256826E-3","3.544529914513652E-3"],TO=[1690163571602655e-24,33803271432053056e-25,6760654286410611e-24,13521308572821242e-24,27042617145642484e-24,5408523429128511e-23,10817046858256998e-23,21634093716513974e-23,43268187433028044e-23,8653637486605571e-22,17307274973211203e-22,34614549946422405e-22,69229099892844565e-22,13845819978568952e-21,27691639957137904e-21,553832799142758e-19,.0001107665598285516,.0002215331196571032,.0004430662393142064,.0008861324786284128,.001772264957256826,.003544529914513652];function IO(e,t,i){let n;if(this.isTileMap){if(this._coordUnit==="DEGREE"){const o=Fc[i+1]||Fc[i];n=this._urlTemplate.replace("{x}",e).replace("{y}",t).replace("{scale}",o)}else if(this._coordUnit==="METER"){const o=Fc[i];n=this._urlTemplate.replace("{x}",e).replace("{y}",t).replace("{scale}",o)}}else n=this._urlTemplate.replace("{x}",e).replace("{y}",t).replace("{level}",i).replace("{fileExtension}",this._fileExtension);return n}async function AO(){const{Resource:e}=Cesium;if(this.isTileMap){const t=e.fetchJsonp({url:this._options.url+".jsonp",queryParameters:{f:"json"}});try{t.then(i=>{FO.call(this,i)})}catch(i){vg.call(this)}}else try{const t=await e.fetchText({url:this.url+"config"});BO.call(this,t)}catch(t){vg.call(this)}}function DO(e){for(let t=TO.length;t--;)if(e[t]<=e)return t}function BO(e){const t=LO.call(this,e),{defaultValue:i,defined:n,GeographicTilingScheme:o,Math:s,Rectangle:a}=Cesium;this._fileExtension=i(t.fileExtentName,"png"),this._tileWidth=i(t.imageSizeWidth,256),this._tileHeight=i(t.imageSizeHeight,256);const r=t.levels,l=r.length;if(this._minimumLevel=i(r[0],0),this._maximumLevel=i(r[l-1],l-1),n(this._tilingScheme)||(this._tilingScheme=new o({ellipsoid:this._options.ellipsoid})),!n(this._rectangle)&&t.left&&t.right&&t.top&&t.bottom){const h=s.toRadians(t.left),p=s.toRadians(t.right),v=s.toRadians(t.bottom),b=s.toRadians(t.top);this._rectangle=new a(h,v,p,b)}const c=this._tilingScheme;this._rectangle.west<c.rectangle.west&&(this._rectangle.west=c.rectangle.west),this._rectangle.east>c.rectangle.east&&(this._rectangle.east=c.rectangle.east),this._rectangle.south<c.rectangle.south&&(this._rectangle.south=c.rectangle.south),this._rectangle.north>c.rectangle.north&&(this._rectangle.north=c.rectangle.north);const u=c.positionToTileXY(a.southwest(this._rectangle),this._minimumLevel),d=c.positionToTileXY(a.northeast(this._rectangle),this._minimumLevel);(window.Math.abs(d.x-u.x)+1)*(window.Math.abs(d.y-u.y)+1)>4&&(this._minimumLevel=0),this._tilingScheme=c,this._urlTemplate=this._url+"data/index/{y}/{x}.{fileExtension}?level={level}",this._ready=!0,this._readyPromise.resolve(!0)}function LO(e){e=new DOMParser().parseFromString(e,"application/xml");const t="http://www.supermap.com/SuperMapCache/sci3d",i=e.childNodes[0],n=ks(i,"Levels",t),o=jO(n,"Level",t)||[],s=[];for(let b=0;b<o.length;b++)s.push(parseInt(o[b].textContent,10));const a=ks(i,"Bounds",t),r=_o(a,"Left",t),l=_o(a,"Right",t),c=_o(a,"Top",t),u=_o(a,"Bottom",t),d=pg(i,"FileExtentName",t),h=_o(i,"CellWidth",t),p=_o(i,"CellHeight",t),v=pg(i,"CacheName",t);return this._name=v||"",{left:r,right:l,top:c,bottom:u,fileExtentName:d,levels:s,imageSizeWidth:h,imageSizeHeight:p}}function pg(e,t,i){const n=ks(e,t,i);return Cesium.defined(n)?n.textContent.trim():void 0}function _o(e,t,i){const n=ks(e,t,i);if(Cesium.defined(n)){const o=parseFloat(n.textContent);return isNaN(o)?void 0:o}}function ks(e,t,i){if(Cesium.defined(e)){const n=e.childNodes,o=n.length;for(let s=0;s<o;s++){const a=n[s];if(a.localName===t&&i.indexOf(a.namespaceURI)!==-1)return a}}}function jO(e,t,i){if(Cesium.defined(e)){const n=[],o=e.getElementsByTagNameNS("*",t),s=o.length;for(let a=0;a<s;a++){const r=o[a];r.localName===t&&i.indexOf(r.namespaceURI)!==-1&&n.push(r)}return n}}function FO(e){const{Cartesian3:t,defaultValue:i,defined:n,GeographicTilingScheme:o,Math:s,Rectangle:a,WebMercatorTilingScheme:r}=Cesium,l=e.prjCoordSys.coordUnit;this._coordUnit=l;const c=e.bounds,u=e.visibleScales;if(n(u)&&u.length>1&&n(this._maximumLevel)){const d=u[u.length-1];this._maximumLevel=DO(d)}if(l==="DEGREE")this._tilingScheme=new o,c.left=s.clamp(c.left,-180,180),c.bottom=s.clamp(c.bottom,-90,90),c.right=s.clamp(c.right,-180,180),c.top=s.clamp(c.top,-90,90),this._rectangle=a.fromDegrees(c.left,c.bottom,c.right,c.top),this._urlTemplate=this._url+'tileImage.png?transparent={transparent}&cacheEnabled=true&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":-180,"y":90}';else{const d=new t(c.left,c.bottom,0);d.x=Math.max(-20037508342789244e-9,d.x),d.y=Math.max(-20037508342789244e-9,d.y);const h=new t(c.right,c.top,0);h.x=Math.min(20037508342789244e-9,h.x),h.y=Math.min(20037508342789244e-9,h.y),this._tilingScheme=new r;const p=this._tilingScheme.projection.unproject(d),v=this._tilingScheme.projection.unproject(h);this._rectangle=new a(p.longitude,p.latitude,v.longitude,v.latitude),this._urlTemplate=this._url+'tileImage.png?transparent={transparent}&cacheEnabled=true&width=256&height=256&x={x}&y={y}&scale={scale}&redirect=false&overlapDisplayed=false&origin={"x":-20037508.342789248 ,"y":20037508.342789095}'}this._urlTemplate=this._urlTemplate.replace("{transparent}",this._transparent),this.layersID&&(this._urlTemplate=this._urlTemplate+"&layersID="+this.layersID),this._rectangle||(this._rectangle=i(this._options.rectangle,this._tilingScheme.rectangle)),this._ready=!0,this._readyPromise.resolve(!0)}function vg(){const{TileProviderError:e,RuntimeError:t}=Cesium,i="An error occurred while accessing "+this._url+".";mg=e.reportError(mg,this,this._errorEvent,i,0,0,0,new Error(i)),this._readyPromise.reject(new t(i))}const fg={url:String,...di,...oi,name:String,transparent:{type:Boolean,default:!0},credit:{type:[String,Object],default:"MapQuest, SuperMap iServer Imagery"},...Ln};var gg=K({name:"VcImageryProviderSupermap",props:fg,emits:dt,setup(e,t){const i=oe();i.cesiumClass="SuperMapImageryProvider";const n=ut(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.SuperMapImageryProvider=Cesium.SuperMapImageryProvider||SO,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const o=n.transformProps(e),s=new Cesium.SuperMapImageryProvider(o);return Cesium.SuperMapVersion||await s.init(),s},()=>{var o;return ie(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const yg={img:"//p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg&scene=0",terrain:"//p{s}.map.gtimg.com/demTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg&scene=0",vector:"//rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&type=vector&styleid={style}&scene=0"};class kO{constructor(t){const{Resource:i,defaultValue:n,Credit:o,Event:s}=Cesium;this._subdomains=t.subdomains||["1","2","3"],this._url=t.url||[t.protocol||"",yg[t.mapStyle]||yg.vector].join("");const a=i.createIfNeeded(this._url);a.appendForwardSlash(),this._ready=!1,this._resource=a,this._tileDiscardPolicy=t.tileDiscardPolicy,this._tileWidth=256,this._tileHeight=256,this._minimumLevel=t.minimumLevel||0,this._maximumLevel=t.maximumLevel||20,this._tilingScheme=new Cesium.WebMercatorTilingScheme,this._rectangle=n(t.rectangle,this._tilingScheme.rectangle);let r=t.credit;typeof r=="string"&&(r=new o(r)),this._credit=r,this.enablePickFeatures=n(t.enablePickFeatures,!1),this._hasAlphaChannel=n(t.hasAlphaChannel,!0),this._errorEvent=new s,this._readyPromise=qo(),this._ready=!0,this._readyPromise.resolve(!0),this._style=t.styleId}get url(){return this._resource._url}get proxy(){return this._resource.proxy}get tileWidth(){if(!this._ready)throw new Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this._ready)throw new Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this._ready)throw new Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return this._minimumLevel}get tilingScheme(){if(!this._ready)throw new Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new Cesium.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get tileDiscardPolicy(){if(!this.ready)throw new Cesium.DeveloperError("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}get errorEvent(){return this._errorEvent}get ready(){return this._ready}get readyPromise(){return this._readyPromise.promise}get credit(){if(!this.ready)throw new Cesium.DeveloperError("credit must not be called before the imagery provider is ready.");return this._credit}get hasAlphaChannel(){if(!this.ready)throw new Cesium.DeveloperError("hasAlphaChannel must not be called before the imagery provider is ready.");return this._hasAlphaChannel}getTileCredits(t,i,n){if(!this.ready)throw new Cesium.DeveloperError("getTileCredits must not be called before the imagery provider is ready.")}requestImage(t,i,n,o){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");return Cesium.ImageryProvider.loadImage(this,RO.call(this,t,i,n,o))}pickFeatures(t,i,n,o,s){}}function RO(e,t,i,n){let o=this._url;const s=this._subdomains,a=this.tilingScheme.getNumberOfYTilesAtLevel(i)-t-1;return o=o.replace("{s}",s[(e+t+i)%s.length]).replace("{style}",this._style).replace("{x}",e).replace("{y}",-t).replace("{z}",i).replace("{sx}",e>>4).replace("{sy}",(1<<i)-t>>4).replace("{reverseY}",a),this._resource.getDerivedResource({url:o,request:n})}const bg={...wi,subdomains:{type:Array,default:()=>["1","2","3"]},mapStyle:{type:String,default:"vector"},styleId:{type:String,default:"1"},protocol:String,...St,...di,...oi,...Dt,...ki,...Ln};var Cg=K({name:"VcImageryProviderTencent",props:bg,emits:dt,setup(e,t){const i=oe();i.cesiumClass="TencentImageryProvider";const n=ut(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.TencentImageryProvider=Cesium.TencentImageryProvider||kO,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const o=n.transformProps(e);return new Cesium.TencentImageryProvider(o)},()=>{var o;return ie(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const Ht={IMG_W:"img_w",IMG_C:"img_c",CIA_W:"cia_w",CIA_C:"cia_c",VEC_W:"vec_w",VEC_C:"vec_c",TER_W:"ter_w",TER_C:"ter_c",CVA_W:"cva_w",CVA_C:"cva_c",CTA_W:"cta_w",CTA_C:"cta_c",EIA_W:"eia_w",EIA_C:"eia_c",EVA_W:"eva_w",EVA_C:"eva_c",IBO_C:"ibo_c",IBO_W:"ibo_w"};var kc={exports:{}},va={exports:{}};/*! https://mths.be/punycode v1.4.0 by @mathias */va.exports;var wg;function $O(){return wg||(wg=1,function(e,t){(function(i){var n=t&&!t.nodeType&&t,o=e&&!e.nodeType&&e,s=typeof fn=="object"&&fn;(s.global===s||s.window===s||s.self===s)&&(i=s);var a,r=2147483647,l=36,c=1,u=26,d=38,h=700,p=72,v=128,b="-",y=/^xn--/,x=/[^\x20-\x7E]/,M=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=l-c,O=Math.floor,I=String.fromCharCode,R;function D(L){throw new RangeError(g[L])}function P(L,B){for(var F=L.length,q=[];F--;)q[F]=B(L[F]);return q}function k(L,B){var F=L.split("@"),q="";F.length>1&&(q=F[0]+"@",L=F[1]),L=L.replace(M,".");var Z=L.split("."),H=P(Z,B).join(".");return q+H}function N(L){for(var B=[],F=0,q=L.length,Z,H;F<q;)Z=L.charCodeAt(F++),Z>=55296&&Z<=56319&&F<q?(H=L.charCodeAt(F++),(H&64512)==56320?B.push(((Z&1023)<<10)+(H&1023)+65536):(B.push(Z),F--)):B.push(Z);return B}function $(L){return P(L,function(B){var F="";return B>65535&&(B-=65536,F+=I(B>>>10&1023|55296),B=56320|B&1023),F+=I(B),F}).join("")}function m(L){return L-48<10?L-22:L-65<26?L-65:L-97<26?L-97:l}function f(L,B){return L+22+75*(L<26)-((B!=0)<<5)}function C(L,B,F){var q=0;for(L=F?O(L/h):L>>1,L+=O(L/B);L>w*u>>1;q+=l)L=O(L/w);return O(q+(w+1)*L/(L+d))}function T(L){var B=[],F=L.length,q,Z=0,H=v,V=p,j,G,J,U,z,Y,Q,te,X;for(j=L.lastIndexOf(b),j<0&&(j=0),G=0;G<j;++G)L.charCodeAt(G)>=128&&D("not-basic"),B.push(L.charCodeAt(G));for(J=j>0?j+1:0;J<F;){for(U=Z,z=1,Y=l;J>=F&&D("invalid-input"),Q=m(L.charCodeAt(J++)),(Q>=l||Q>O((r-Z)/z))&&D("overflow"),Z+=Q*z,te=Y<=V?c:Y>=V+u?u:Y-V,!(Q<te);Y+=l)X=l-te,z>O(r/X)&&D("overflow"),z*=X;q=B.length+1,V=C(Z-U,q,U==0),O(Z/q)>r-H&&D("overflow"),H+=O(Z/q),Z%=q,B.splice(Z++,0,H)}return $(B)}function _(L){var B,F,q,Z,H,V,j,G,J,U,z,Y=[],Q,te,X,ne;for(L=N(L),Q=L.length,B=v,F=0,H=p,V=0;V<Q;++V)z=L[V],z<128&&Y.push(I(z));for(q=Z=Y.length,Z&&Y.push(b);q<Q;){for(j=r,V=0;V<Q;++V)z=L[V],z>=B&&z<j&&(j=z);for(te=q+1,j-B>O((r-F)/te)&&D("overflow"),F+=(j-B)*te,B=j,V=0;V<Q;++V)if(z=L[V],z<B&&++F>r&&D("overflow"),z==B){for(G=F,J=l;U=J<=H?c:J>=H+u?u:J-H,!(G<U);J+=l)ne=G-U,X=l-U,Y.push(I(f(U+ne%X,0))),G=O(ne/X);Y.push(I(f(G,0))),H=C(F,te,q==Z),F=0,++q}++F,++B}return Y.join("")}function E(L){return k(L,function(B){return y.test(B)?T(B.slice(4).toLowerCase()):B})}function A(L){return k(L,function(B){return x.test(B)?"xn--"+_(B):B})}if(a={version:"1.3.2",ucs2:{decode:N,encode:$},decode:T,encode:_,toASCII:A,toUnicode:E},n&&o)if(e.exports==n)o.exports=a;else for(R in a)a.hasOwnProperty(R)&&(n[R]=a[R]);else i.punycode=a})(fn)}(va,va.exports)),va.exports}var Rs={exports:{}};/*!
* URI.js - Mutating URLs
* IPv6 Support
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/Rs.exports;var _g;function NO(){return _g||(_g=1,function(e){(function(t,i){e.exports?e.exports=i():t.IPv6=i(t)})(fn,function(t){var i=t&&t.IPv6;function n(s){var a=s.toLowerCase(),r=a.split(":"),l=r.length,c=8;r[0]===""&&r[1]===""&&r[2]===""?(r.shift(),r.shift()):r[0]===""&&r[1]===""?r.shift():r[l-1]===""&&r[l-2]===""&&r.pop(),l=r.length,r[l-1].indexOf(".")!==-1&&(c=7);var u;for(u=0;u<l&&r[u]!=="";u++);if(u<c)for(r.splice(u,1,"0000");r.length<c;)r.splice(u,0,"0000");for(var d,h=0;h<c;h++){d=r[h].split("");for(var p=0;p<3&&(d[0]==="0"&&d.length>1);p++)d.splice(0,1);r[h]=d.join("")}var v=-1,b=0,y=0,x=-1,M=!1;for(h=0;h<c;h++)M?r[h]==="0"?y+=1:(M=!1,y>b&&(v=x,b=y)):r[h]==="0"&&(M=!0,x=h,y=1);y>b&&(v=x,b=y),b>1&&r.splice(v,b,""),l=r.length;var g="";for(r[0]===""&&(g=":"),h=0;h<l&&(g+=r[h],h!==l-1);h++)g+=":";return r[l-1]===""&&(g+=":"),g}function o(){return t.IPv6===this&&(t.IPv6=i),this}return{best:n,noConflict:o}})}(Rs)),Rs.exports}var $s={exports:{}};/*!
* URI.js - Mutating URLs
* Second Level Domain (SLD) Support
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/$s.exports;var xg;function VO(){return xg||(xg=1,function(e){(function(t,i){e.exports?e.exports=i():t.SecondLevelDomains=i(t)})(fn,function(t){var i=t&&t.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(o){var s=o.lastIndexOf(".");if(s<=0||s>=o.length-1)return!1;var a=o.lastIndexOf(".",s-1);if(a<=0||a>=s-1)return!1;var r=n.list[o.slice(s+1)];return r?r.indexOf(" "+o.slice(a+1,s)+" ")>=0:!1},is:function(o){var s=o.lastIndexOf(".");if(s<=0||s>=o.length-1)return!1;var a=o.lastIndexOf(".",s-1);if(a>=0)return!1;var r=n.list[o.slice(s+1)];return r?r.indexOf(" "+o.slice(0,s)+" ")>=0:!1},get:function(o){var s=o.lastIndexOf(".");if(s<=0||s>=o.length-1)return null;var a=o.lastIndexOf(".",s-1);if(a<=0||a>=s-1)return null;var r=n.list[o.slice(s+1)];return!r||r.indexOf(" "+o.slice(a+1,s)+" ")<0?null:o.slice(a+1)},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=i),this}};return n})}($s)),$s.exports}/*!
* URI.js - Mutating URLs
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/kc.exports,function(e){(function(t,i){e.exports?e.exports=i($O(),NO(),VO()):t.URI=i(t.punycode,t.IPv6,t.SecondLevelDomains,t)})(fn,function(t,i,n,o){var s=o&&o.URI;function a(m,f){var C=arguments.length>=1,T=arguments.length>=2;if(!(this instanceof a))return C?T?new a(m,f):new a(m):new a;if(m===void 0){if(C)throw new TypeError("undefined is not a valid argument for URI");typeof location!="undefined"?m=location.href+"":m=""}if(m===null&&C)throw new TypeError("null is not a valid argument for URI");return this.href(m),f!==void 0?this.absoluteTo(f):this}function r(m){return/^[0-9]+$/.test(m)}a.version="1.19.11";var l=a.prototype,c=Object.prototype.hasOwnProperty;function u(m){return m.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function d(m){return m===void 0?"Undefined":String(Object.prototype.toString.call(m)).slice(8,-1)}function h(m){return d(m)==="Array"}function p(m,f){var C={},T,_;if(d(f)==="RegExp")C=null;else if(h(f))for(T=0,_=f.length;T<_;T++)C[f[T]]=!0;else C[f]=!0;for(T=0,_=m.length;T<_;T++){var E=C&&C[m[T]]!==void 0||!C&&f.test(m[T]);E&&(m.splice(T,1),_--,T--)}return m}function v(m,f){var C,T;if(h(f)){for(C=0,T=f.length;C<T;C++)if(!v(m,f[C]))return!1;return!0}var _=d(f);for(C=0,T=m.length;C<T;C++)if(_==="RegExp"){if(typeof m[C]=="string"&&m[C].match(f))return!0}else if(m[C]===f)return!0;return!1}function b(m,f){if(!h(m)||!h(f)||m.length!==f.length)return!1;m.sort(),f.sort();for(var C=0,T=m.length;C<T;C++)if(m[C]!==f[C])return!1;return!0}function y(m){var f=/^\/+|\/+$/g;return m.replace(f,"")}a._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:a.preventInvalidHostname,duplicateQueryParameters:a.duplicateQueryParameters,escapeQuerySpace:a.escapeQuerySpace}},a.preventInvalidHostname=!1,a.duplicateQueryParameters=!1,a.escapeQuerySpace=!0,a.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,a.idn_expression=/[^a-z0-9\._-]/i,a.punycode_expression=/(xn--)/i,a.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,a.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,a.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},a.getDomAttribute=function(m){if(!(!m||!m.nodeName)){var f=m.nodeName.toLowerCase();if(!(f==="input"&&m.type!=="image"))return a.domAttributes[f]}};function x(m){return escape(m)}function M(m){return encodeURIComponent(m).replace(/[!'()*]/g,x).replace(/\*/g,"%2A")}a.encode=M,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=M,a.decode=decodeURIComponent},a.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},a.encodeQuery=function(m,f){var C=a.encode(m+"");return f===void 0&&(f=a.escapeQuerySpace),f?C.replace(/%20/g,"+"):C},a.decodeQuery=function(m,f){m+="",f===void 0&&(f=a.escapeQuerySpace);try{return a.decode(f?m.replace(/\+/g,"%20"):m)}catch(C){return m}};var g={encode:"encode",decode:"decode"},w,O=function(m,f){return function(C){try{return a[f](C+"").replace(a.characters[m][f].expression,function(T){return a.characters[m][f].map[T]})}catch(T){return C}}};for(w in g)a[w+"PathSegment"]=O("pathname",g[w]),a[w+"UrnPathSegment"]=O("urnpath",g[w]);var I=function(m,f,C){return function(T){var _;C?_=function(B){return a[f](a[C](B))}:_=a[f];for(var E=(T+"").split(m),A=0,L=E.length;A<L;A++)E[A]=_(E[A]);return E.join(m)}};a.decodePath=I("/","decodePathSegment"),a.decodeUrnPath=I(":","decodeUrnPathSegment"),a.recodePath=I("/","encodePathSegment","decode"),a.recodeUrnPath=I(":","encodeUrnPathSegment","decode"),a.encodeReserved=O("reserved","encode"),a.parse=function(m,f){var C;return f||(f={preventInvalidHostname:a.preventInvalidHostname}),m=m.replace(a.leading_whitespace_expression,""),m=m.replace(a.ascii_tab_whitespace,""),C=m.indexOf("#"),C>-1&&(f.fragment=m.substring(C+1)||null,m=m.substring(0,C)),C=m.indexOf("?"),C>-1&&(f.query=m.substring(C+1)||null,m=m.substring(0,C)),m=m.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),m=m.replace(/^[/\\]{2,}/i,"//"),m.substring(0,2)==="//"?(f.protocol=null,m=m.substring(2),m=a.parseAuthority(m,f)):(C=m.indexOf(":"),C>-1&&(f.protocol=m.substring(0,C)||null,f.protocol&&!f.protocol.match(a.protocol_expression)?f.protocol=void 0:m.substring(C+1,C+3).replace(/\\/g,"/")==="//"?(m=m.substring(C+3),m=a.parseAuthority(m,f)):(m=m.substring(C+1),f.urn=!0))),f.path=m,f},a.parseHost=function(m,f){m||(m=""),m=m.replace(/\\/g,"/");var C=m.indexOf("/"),T,_;if(C===-1&&(C=m.length),m.charAt(0)==="[")T=m.indexOf("]"),f.hostname=m.substring(1,T)||null,f.port=m.substring(T+2,C)||null,f.port==="/"&&(f.port=null);else{var E=m.indexOf(":"),A=m.indexOf("/"),L=m.indexOf(":",E+1);L!==-1&&(A===-1||L<A)?(f.hostname=m.substring(0,C)||null,f.port=null):(_=m.substring(0,C).split(":"),f.hostname=_[0]||null,f.port=_[1]||null)}return f.hostname&&m.substring(C).charAt(0)!=="/"&&(C++,m="/"+m),f.preventInvalidHostname&&a.ensureValidHostname(f.hostname,f.protocol),f.port&&a.ensureValidPort(f.port),m.substring(C)||"/"},a.parseAuthority=function(m,f){return m=a.parseUserinfo(m,f),a.parseHost(m,f)},a.parseUserinfo=function(m,f){var C=m,T=m.indexOf("\\");T!==-1&&(m=m.replace(/\\/g,"/"));var _=m.indexOf("/"),E=m.lastIndexOf("@",_>-1?_:m.length-1),A;return E>-1&&(_===-1||E<_)?(A=m.substring(0,E).split(":"),f.username=A[0]?a.decode(A[0]):null,A.shift(),f.password=A[0]?a.decode(A.join(":")):null,m=C.substring(E+1)):(f.username=null,f.password=null),m},a.parseQuery=function(m,f){if(!m)return{};if(m=m.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!m)return{};for(var C={},T=m.split("&"),_=T.length,E,A,L,B=0;B<_;B++)E=T[B].split("="),A=a.decodeQuery(E.shift(),f),L=E.length?a.decodeQuery(E.join("="),f):null,A!=="__proto__"&&(c.call(C,A)?((typeof C[A]=="string"||C[A]===null)&&(C[A]=[C[A]]),C[A].push(L)):C[A]=L);return C},a.build=function(m){var f="",C=!1;return m.protocol&&(f+=m.protocol+":"),!m.urn&&(f||m.hostname)&&(f+="//",C=!0),f+=a.buildAuthority(m)||"",typeof m.path=="string"&&(m.path.charAt(0)!=="/"&&C&&(f+="/"),f+=m.path),typeof m.query=="string"&&m.query&&(f+="?"+m.query),typeof m.fragment=="string"&&m.fragment&&(f+="#"+m.fragment),f},a.buildHost=function(m){var f="";if(m.hostname)a.ip6_expression.test(m.hostname)?f+="["+m.hostname+"]":f+=m.hostname;else return"";return m.port&&(f+=":"+m.port),f},a.buildAuthority=function(m){return a.buildUserinfo(m)+a.buildHost(m)},a.buildUserinfo=function(m){var f="";return m.username&&(f+=a.encode(m.username)),m.password&&(f+=":"+a.encode(m.password)),f&&(f+="@"),f},a.buildQuery=function(m,f,C){var T="",_,E,A,L;for(E in m)if(E!=="__proto__"&&c.call(m,E))if(h(m[E]))for(_={},A=0,L=m[E].length;A<L;A++)m[E][A]!==void 0&&_[m[E][A]+""]===void 0&&(T+="&"+a.buildQueryParameter(E,m[E][A],C),f!==!0&&(_[m[E][A]+""]=!0));else m[E]!==void 0&&(T+="&"+a.buildQueryParameter(E,m[E],C));return T.substring(1)},a.buildQueryParameter=function(m,f,C){return a.encodeQuery(m,C)+(f!==null?"="+a.encodeQuery(f,C):"")},a.addQuery=function(m,f,C){if(typeof f=="object")for(var T in f)c.call(f,T)&&a.addQuery(m,T,f[T]);else if(typeof f=="string"){if(m[f]===void 0){m[f]=C;return}else typeof m[f]=="string"&&(m[f]=[m[f]]);h(C)||(C=[C]),m[f]=(m[f]||[]).concat(C)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},a.setQuery=function(m,f,C){if(typeof f=="object")for(var T in f)c.call(f,T)&&a.setQuery(m,T,f[T]);else if(typeof f=="string")m[f]=C===void 0?null:C;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},a.removeQuery=function(m,f,C){var T,_,E;if(h(f))for(T=0,_=f.length;T<_;T++)m[f[T]]=void 0;else if(d(f)==="RegExp")for(E in m)f.test(E)&&(m[E]=void 0);else if(typeof f=="object")for(E in f)c.call(f,E)&&a.removeQuery(m,E,f[E]);else if(typeof f=="string")C!==void 0?d(C)==="RegExp"?!h(m[f])&&C.test(m[f])?m[f]=void 0:m[f]=p(m[f],C):m[f]===String(C)&&(!h(C)||C.length===1)?m[f]=void 0:h(m[f])&&(m[f]=p(m[f],C)):m[f]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},a.hasQuery=function(m,f,C,T){switch(d(f)){case"String":break;case"RegExp":for(var _ in m)if(c.call(m,_)&&f.test(_)&&(C===void 0||a.hasQuery(m,_,C)))return!0;return!1;case"Object":for(var E in f)if(c.call(f,E)&&!a.hasQuery(m,E,f[E]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(d(C)){case"Undefined":return f in m;case"Boolean":var A=!!(h(m[f])?m[f].length:m[f]);return C===A;case"Function":return!!C(m[f],f,m);case"Array":if(!h(m[f]))return!1;var L=T?v:b;return L(m[f],C);case"RegExp":return h(m[f])?T?v(m[f],C):!1:!!(m[f]&&m[f].match(C));case"Number":C=String(C);case"String":return h(m[f])?T?v(m[f],C):!1:m[f]===C;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},a.joinPaths=function(){for(var m=[],f=[],C=0,T=0;T<arguments.length;T++){var _=new a(arguments[T]);m.push(_);for(var E=_.segment(),A=0;A<E.length;A++)typeof E[A]=="string"&&f.push(E[A]),E[A]&&C++}if(!f.length||!C)return new a("");var L=new a("").segment(f);return(m[0].path()===""||m[0].path().slice(0,1)==="/")&&L.path("/"+L.path()),L.normalize()},a.commonPath=function(m,f){var C=Math.min(m.length,f.length),T;for(T=0;T<C;T++)if(m.charAt(T)!==f.charAt(T)){T--;break}return T<1?m.charAt(0)===f.charAt(0)&&m.charAt(0)==="/"?"/":"":((m.charAt(T)!=="/"||f.charAt(T)!=="/")&&(T=m.substring(0,T).lastIndexOf("/")),m.substring(0,T+1))},a.withinString=function(m,f,C){C||(C={});var T=C.start||a.findUri.start,_=C.end||a.findUri.end,E=C.trim||a.findUri.trim,A=C.parens||a.findUri.parens,L=/[a-z0-9-]=["']?$/i;for(T.lastIndex=0;;){var B=T.exec(m);if(!B)break;var F=B.index;if(C.ignoreHtml){var q=m.slice(Math.max(F-3,0),F);if(q&&L.test(q))continue}for(var Z=F+m.slice(F).search(_),H=m.slice(F,Z),V=-1;;){var j=A.exec(H);if(!j)break;var G=j.index+j[0].length;V=Math.max(V,G)}if(V>-1?H=H.slice(0,V)+H.slice(V).replace(E,""):H=H.replace(E,""),!(H.length<=B[0].length)&&!(C.ignore&&C.ignore.test(H))){Z=F+H.length;var J=f(H,F,Z,m);if(J===void 0){T.lastIndex=Z;continue}J=String(J),m=m.slice(0,F)+J+m.slice(Z),T.lastIndex=F+J.length}}return T.lastIndex=0,m},a.ensureValidHostname=function(m,f){var C=!!m,T=!!f,_=!1;if(T&&(_=v(a.hostProtocols,f)),_&&!C)throw new TypeError("Hostname cannot be empty, if protocol is "+f);if(m&&m.match(a.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+m+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(m).match(a.invalid_hostname_characters))throw new TypeError('Hostname "'+m+'" contains characters other than [A-Z0-9.-:_]')}},a.ensureValidPort=function(m){if(m){var f=Number(m);if(!(r(f)&&f>0&&f<65536))throw new TypeError('Port "'+m+'" is not a valid port')}},a.noConflict=function(m){if(m){var f={URI:this.noConflict()};return o.URITemplate&&typeof o.URITemplate.noConflict=="function"&&(f.URITemplate=o.URITemplate.noConflict()),o.IPv6&&typeof o.IPv6.noConflict=="function"&&(f.IPv6=o.IPv6.noConflict()),o.SecondLevelDomains&&typeof o.SecondLevelDomains.noConflict=="function"&&(f.SecondLevelDomains=o.SecondLevelDomains.noConflict()),f}else o.URI===this&&(o.URI=s);return this},l.build=function(m){return m===!0?this._deferred_build=!0:(m===void 0||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},l.clone=function(){return new a(this)},l.valueOf=l.toString=function(){return this.build(!1)._string};function R(m){return function(f,C){return f===void 0?this._parts[m]||"":(this._parts[m]=f||null,this.build(!C),this)}}function D(m,f){return function(C,T){return C===void 0?this._parts[m]||"":(C!==null&&(C=C+"",C.charAt(0)===f&&(C=C.substring(1))),this._parts[m]=C,this.build(!T),this)}}l.protocol=R("protocol"),l.username=R("username"),l.password=R("password"),l.hostname=R("hostname"),l.port=R("port"),l.query=D("query","?"),l.fragment=D("fragment","#"),l.search=function(m,f){var C=this.query(m,f);return typeof C=="string"&&C.length?"?"+C:C},l.hash=function(m,f){var C=this.fragment(m,f);return typeof C=="string"&&C.length?"#"+C:C},l.pathname=function(m,f){if(m===void 0||m===!0){var C=this._parts.path||(this._parts.hostname?"/":"");return m?(this._parts.urn?a.decodeUrnPath:a.decodePath)(C):C}else return this._parts.urn?this._parts.path=m?a.recodeUrnPath(m):"":this._parts.path=m?a.recodePath(m):"/",this.build(!f),this},l.path=l.pathname,l.href=function(m,f){var C;if(m===void 0)return this.toString();this._string="",this._parts=a._parts();var T=m instanceof a,_=typeof m=="object"&&(m.hostname||m.path||m.pathname);if(m.nodeName){var E=a.getDomAttribute(m);m=m[E]||"",_=!1}if(!T&&_&&m.pathname!==void 0&&(m=m.toString()),typeof m=="string"||m instanceof String)this._parts=a.parse(String(m),this._parts);else if(T||_){var A=T?m._parts:m;for(C in A)C!=="query"&&c.call(this._parts,C)&&(this._parts[C]=A[C]);A.query&&this.query(A.query,!1)}else throw new TypeError("invalid input");return this.build(!f),this},l.is=function(m){var f=!1,C=!1,T=!1,_=!1,E=!1,A=!1,L=!1,B=!this._parts.urn;switch(this._parts.hostname&&(B=!1,C=a.ip4_expression.test(this._parts.hostname),T=a.ip6_expression.test(this._parts.hostname),f=C||T,_=!f,E=_&&n&&n.has(this._parts.hostname),A=_&&a.idn_expression.test(this._parts.hostname),L=_&&a.punycode_expression.test(this._parts.hostname)),m.toLowerCase()){case"relative":return B;case"absolute":return!B;case"domain":case"name":return _;case"sld":return E;case"ip":return f;case"ip4":case"ipv4":case"inet4":return C;case"ip6":case"ipv6":case"inet6":return T;case"idn":return A;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return L}return null};var P=l.protocol,k=l.port,N=l.hostname;l.protocol=function(m,f){if(m&&(m=m.replace(/:(\/\/)?$/,""),!m.match(a.protocol_expression)))throw new TypeError('Protocol "'+m+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return P.call(this,m,f)},l.scheme=l.protocol,l.port=function(m,f){return this._parts.urn?m===void 0?"":this:(m!==void 0&&(m===0&&(m=null),m&&(m+="",m.charAt(0)===":"&&(m=m.substring(1)),a.ensureValidPort(m))),k.call(this,m,f))},l.hostname=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m!==void 0){var C={preventInvalidHostname:this._parts.preventInvalidHostname},T=a.parseHost(m,C);if(T!=="/")throw new TypeError('Hostname "'+m+'" contains characters other than [A-Z0-9.-]');m=C.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(m,this._parts.protocol)}return N.call(this,m,f)},l.origin=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0){var C=this.protocol(),T=this.authority();return T?(C?C+"://":"")+this.authority():""}else{var _=a(m);return this.protocol(_.protocol()).authority(_.authority()).build(!f),this}},l.host=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0)return this._parts.hostname?a.buildHost(this._parts):"";var C=a.parseHost(m,this._parts);if(C!=="/")throw new TypeError('Hostname "'+m+'" contains characters other than [A-Z0-9.-]');return this.build(!f),this},l.authority=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0)return this._parts.hostname?a.buildAuthority(this._parts):"";var C=a.parseAuthority(m,this._parts);if(C!=="/")throw new TypeError('Hostname "'+m+'" contains characters other than [A-Z0-9.-]');return this.build(!f),this},l.userinfo=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0){var C=a.buildUserinfo(this._parts);return C&&C.substring(0,C.length-1)}else return m[m.length-1]!=="@"&&(m+="@"),a.parseUserinfo(m,this._parts),this.build(!f),this},l.resource=function(m,f){var C;return m===void 0?this.path()+this.search()+this.hash():(C=a.parse(m),this._parts.path=C.path,this._parts.query=C.query,this._parts.fragment=C.fragment,this.build(!f),this)},l.subdomain=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0){if(!this._parts.hostname||this.is("IP"))return"";var C=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,C)||""}else{var T=this._parts.hostname.length-this.domain().length,_=this._parts.hostname.substring(0,T),E=new RegExp("^"+u(_));if(m&&m.charAt(m.length-1)!=="."&&(m+="."),m.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return m&&a.ensureValidHostname(m,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(E,m),this.build(!f),this}},l.domain=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(typeof m=="boolean"&&(f=m,m=void 0),m===void 0){if(!this._parts.hostname||this.is("IP"))return"";var C=this._parts.hostname.match(/\./g);if(C&&C.length<2)return this._parts.hostname;var T=this._parts.hostname.length-this.tld(f).length-1;return T=this._parts.hostname.lastIndexOf(".",T-1)+1,this._parts.hostname.substring(T)||""}else{if(!m)throw new TypeError("cannot set domain empty");if(m.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(m,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=m;else{var _=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(_,m)}return this.build(!f),this}},l.tld=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(typeof m=="boolean"&&(f=m,m=void 0),m===void 0){if(!this._parts.hostname||this.is("IP"))return"";var C=this._parts.hostname.lastIndexOf("."),T=this._parts.hostname.substring(C+1);return f!==!0&&n&&n.list[T.toLowerCase()]&&n.get(this._parts.hostname)||T}else{var _;if(m)if(m.match(/[^a-zA-Z0-9-]/))if(n&&n.is(m))_=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(_,m);else throw new TypeError('TLD "'+m+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");_=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(_,m)}else throw new TypeError("cannot set TLD empty");return this.build(!f),this}},l.directory=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0||m===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var C=this._parts.path.length-this.filename().length-1,T=this._parts.path.substring(0,C)||(this._parts.hostname?"/":"");return m?a.decodePath(T):T}else{var _=this._parts.path.length-this.filename().length,E=this._parts.path.substring(0,_),A=new RegExp("^"+u(E));return this.is("relative")||(m||(m="/"),m.charAt(0)!=="/"&&(m="/"+m)),m&&m.charAt(m.length-1)!=="/"&&(m+="/"),m=a.recodePath(m),this._parts.path=this._parts.path.replace(A,m),this.build(!f),this}},l.filename=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(typeof m!="string"){if(!this._parts.path||this._parts.path==="/")return"";var C=this._parts.path.lastIndexOf("/"),T=this._parts.path.substring(C+1);return m?a.decodePathSegment(T):T}else{var _=!1;m.charAt(0)==="/"&&(m=m.substring(1)),m.match(/\.?\//)&&(_=!0);var E=new RegExp(u(this.filename())+"$");return m=a.recodePath(m),this._parts.path=this._parts.path.replace(E,m),_?this.normalizePath(f):this.build(!f),this}},l.suffix=function(m,f){if(this._parts.urn)return m===void 0?"":this;if(m===void 0||m===!0){if(!this._parts.path||this._parts.path==="/")return"";var C=this.filename(),T=C.lastIndexOf("."),_,E;return T===-1?"":(_=C.substring(T+1),E=/^[a-z0-9%]+$/i.test(_)?_:"",m?a.decodePathSegment(E):E)}else{m.charAt(0)==="."&&(m=m.substring(1));var A=this.suffix(),L;if(A)m?L=new RegExp(u(A)+"$"):L=new RegExp(u("."+A)+"$");else{if(!m)return this;this._parts.path+="."+a.recodePath(m)}return L&&(m=a.recodePath(m),this._parts.path=this._parts.path.replace(L,m)),this.build(!f),this}},l.segment=function(m,f,C){var T=this._parts.urn?":":"/",_=this.path(),E=_.substring(0,1)==="/",A=_.split(T);if(m!==void 0&&typeof m!="number"&&(C=f,f=m,m=void 0),m!==void 0&&typeof m!="number")throw new Error('Bad segment "'+m+'", must be 0-based integer');if(E&&A.shift(),m<0&&(m=Math.max(A.length+m,0)),f===void 0)return m===void 0?A:A[m];if(m===null||A[m]===void 0)if(h(f)){A=[];for(var L=0,B=f.length;L<B;L++)!f[L].length&&(!A.length||!A[A.length-1].length)||(A.length&&!A[A.length-1].length&&A.pop(),A.push(y(f[L])))}else(f||typeof f=="string")&&(f=y(f),A[A.length-1]===""?A[A.length-1]=f:A.push(f));else f?A[m]=y(f):A.splice(m,1);return E&&A.unshift(""),this.path(A.join(T),C)},l.segmentCoded=function(m,f,C){var T,_,E;if(typeof m!="number"&&(C=f,f=m,m=void 0),f===void 0){if(T=this.segment(m,f,C),!h(T))T=T!==void 0?a.decode(T):void 0;else for(_=0,E=T.length;_<E;_++)T[_]=a.decode(T[_]);return T}if(!h(f))f=typeof f=="string"||f instanceof String?a.encode(f):f;else for(_=0,E=f.length;_<E;_++)f[_]=a.encode(f[_]);return this.segment(m,f,C)};var $=l.query;return l.query=function(m,f){if(m===!0)return a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof m=="function"){var C=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace),T=m.call(this,C);return this._parts.query=a.buildQuery(T||C,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!f),this}else return m!==void 0&&typeof m!="string"?(this._parts.query=a.buildQuery(m,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!f),this):$.call(this,m,f)},l.setQuery=function(m,f,C){var T=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof m=="string"||m instanceof String)T[m]=f!==void 0?f:null;else if(typeof m=="object")for(var _ in m)c.call(m,_)&&(T[_]=m[_]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=a.buildQuery(T,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof m!="string"&&(C=f),this.build(!C),this},l.addQuery=function(m,f,C){var T=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.addQuery(T,m,f===void 0?null:f),this._parts.query=a.buildQuery(T,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof m!="string"&&(C=f),this.build(!C),this},l.removeQuery=function(m,f,C){var T=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.removeQuery(T,m,f),this._parts.query=a.buildQuery(T,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof m!="string"&&(C=f),this.build(!C),this},l.hasQuery=function(m,f,C){var T=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.hasQuery(T,m,f,C)},l.setSearch=l.setQuery,l.addSearch=l.addQuery,l.removeSearch=l.removeQuery,l.hasSearch=l.hasQuery,l.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},l.normalizeProtocol=function(m){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!m)),this},l.normalizeHostname=function(m){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&i&&(this._parts.hostname=i.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!m)),this},l.normalizePort=function(m){return typeof this._parts.protocol=="string"&&this._parts.port===a.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!m)),this},l.normalizePath=function(m){var f=this._parts.path;if(!f)return this;if(this._parts.urn)return this._parts.path=a.recodeUrnPath(this._parts.path),this.build(!m),this;if(this._parts.path==="/")return this;f=a.recodePath(f);var C,T="",_,E;for(f.charAt(0)!=="/"&&(C=!0,f="/"+f),(f.slice(-3)==="/.."||f.slice(-2)==="/.")&&(f+="/"),f=f.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),C&&(T=f.substring(1).match(/^(\.\.\/)+/)||"",T&&(T=T[0]));_=f.search(/\/\.\.(\/|$)/),_!==-1;){if(_===0){f=f.substring(3);continue}E=f.substring(0,_).lastIndexOf("/"),E===-1&&(E=_),f=f.substring(0,E)+f.substring(_+3)}return C&&this.is("relative")&&(f=T+f.substring(1)),this._parts.path=f,this.build(!m),this},l.normalizePathname=l.normalizePath,l.normalizeQuery=function(m){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(a.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!m)),this},l.normalizeFragment=function(m){return this._parts.fragment||(this._parts.fragment=null,this.build(!m)),this},l.normalizeSearch=l.normalizeQuery,l.normalizeHash=l.normalizeFragment,l.iso8859=function(){var m=a.encode,f=a.decode;a.encode=escape,a.decode=decodeURIComponent;try{this.normalize()}finally{a.encode=m,a.decode=f}return this},l.unicode=function(){var m=a.encode,f=a.decode;a.encode=M,a.decode=unescape;try{this.normalize()}finally{a.encode=m,a.decode=f}return this},l.readable=function(){var m=this.clone();m.username("").password("").normalize();var f="";if(m._parts.protocol&&(f+=m._parts.protocol+"://"),m._parts.hostname&&(m.is("punycode")&&t?(f+=t.toUnicode(m._parts.hostname),m._parts.port&&(f+=":"+m._parts.port)):f+=m.host()),m._parts.hostname&&m._parts.path&&m._parts.path.charAt(0)!=="/"&&(f+="/"),f+=m.path(!0),m._parts.query){for(var C="",T=0,_=m._parts.query.split("&"),E=_.length;T<E;T++){var A=(_[T]||"").split("=");C+="&"+a.decodeQuery(A[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),A[1]!==void 0&&(C+="="+a.decodeQuery(A[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}f+="?"+C.substring(1)}return f+=a.decodeQuery(m.hash(),!0),f},l.absoluteTo=function(m){var f=this.clone(),C=["protocol","username","password","hostname","port"],T,_,E;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(m instanceof a||(m=new a(m)),f._parts.protocol||(f._parts.protocol=m._parts.protocol,this._parts.hostname))return f;for(_=0;E=C[_];_++)f._parts[E]=m._parts[E];return f._parts.path?(f._parts.path.substring(-2)===".."&&(f._parts.path+="/"),f.path().charAt(0)!=="/"&&(T=m.directory(),T=T||(m.path().indexOf("/")===0?"/":""),f._parts.path=(T?T+"/":"")+f._parts.path,f.normalizePath())):(f._parts.path=m._parts.path,f._parts.query||(f._parts.query=m._parts.query)),f.build(),f},l.relativeTo=function(m){var f=this.clone().normalize(),C,T,_,E,A;if(f._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(m=new a(m).normalize(),C=f._parts,T=m._parts,E=f.path(),A=m.path(),E.charAt(0)!=="/")throw new Error("URI is already relative");if(A.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(C.protocol===T.protocol&&(C.protocol=null),C.username!==T.username||C.password!==T.password||C.protocol!==null||C.username!==null||C.password!==null)return f.build();if(C.hostname===T.hostname&&C.port===T.port)C.hostname=null,C.port=null;else return f.build();if(E===A)return C.path="",f.build();if(_=a.commonPath(E,A),!_)return f.build();var L=T.path.substring(_.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return C.path=L+C.path.substring(_.length)||"./",f.build()},l.equals=function(m){var f=this.clone(),C=new a(m),T={},_={},E={},A,L,B;if(f.normalize(),C.normalize(),f.toString()===C.toString())return!0;if(A=f.query(),L=C.query(),f.query(""),C.query(""),f.toString()!==C.toString()||A.length!==L.length)return!1;T=a.parseQuery(A,this._parts.escapeQuerySpace),_=a.parseQuery(L,this._parts.escapeQuerySpace);for(B in T)if(c.call(T,B)){if(h(T[B])){if(!b(T[B],_[B]))return!1}else if(T[B]!==_[B])return!1;E[B]=!0}for(B in _)if(c.call(_,B)&&!E[B])return!1;return!0},l.preventInvalidHostname=function(m){return this._parts.preventInvalidHostname=!!m,this},l.duplicateQueryParameters=function(m){return this._parts.duplicateQueryParameters=!!m,this},l.escapeQuerySpace=function(m){return this._parts.escapeQuerySpace=!!m,this},a})}(kc);var zO=kc.exports,GO=Zl(zO);const Eg={},Mg={},Rc={},Og={},$c={},xo={};class UO{constructor(t){Object.keys(Ht).forEach(u=>{switch(Eg[Ht[u]]=t.protocol+"://{s}.tianditu.gov.cn/"+Ht[u]+"/wmts",Mg[Ht[u]]=Ht[u].slice(0,3),Rc[Ht[u]]=Ht[u].slice(4),Og[Ht[u]]="tiles",Rc[Ht[u]]==="w"?$c[Ht[u]]="900913":$c[Ht[u]]="4490",Ht[u]){case"img_w":case"img_c":case"cia_w":case"cia_c":case"cta_w":case"cta_c":xo[Ht[u]]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18"];break;case"vec_w":case"vec_c":case"cva_w":case"cva_c":xo[Ht[u]]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"];break;case"ter_w":case"ter_c":xo[Ht[u]]=["1","2","3","4","5","6","7","8","9","10","11","12","13","14"];break;case"eia_w":case"eia_c":case"eva_w":case"eva_c":case"ibo_c":case"ibo_w":xo[Ht[u]]=["1","2","3","4","5","6","7","8","9","10"];break}});const{Credit:i,Resource:n,defaultValue:o,Event:s,GeographicTilingScheme:a,WebMercatorTilingScheme:r}=Cesium;t=o(t,{}),this._mapStyle=o(t.mapStyle,Ht.IMG_W),this._url=t.url||o(t.url,Eg[this._mapStyle]);const l=n.createIfNeeded(this._url);l.appendForwardSlash(),this._ready=!1,this._resource=l,this._token=t.token,this._layer=o(t.layer,Mg[this._mapStyle]),this._style=o(t.style,"default"),this._tileMatrixSetID=o(t.tileMatrixSetID,Rc[this._mapStyle]),this._tileMatrixLabels=o(t.tileMatrixLabels,xo[this._mapStyle]),this._format=o(t.format,Og[this._mapStyle]),this._epsgCode=$c[this._mapStyle],this._tilingScheme=this._epsgCode==="900913"?new r:new a,this._tileWidth=o(t.tileWidth,256),this._tileHeight=o(t.tileHeight,256),this._minimumLevel=o(t.minimumLevel,0),this._maximumLevel=o(t.maximumLevel,xo[this._mapStyle].length),this._rectangle=o(t.rectangle,this._tilingScheme.rectangle),this._errorEvent=new s;const c=o(t.credit,"\u5929\u5730\u56FE\u5168\u7403\u5F71\u50CF\u670D\u52A1");this._credit=typeof c=="string"?new i(c):c,this._subdomains=o(t.subdomains,["t0","t1","t2","t3","t4","t5","t6","t7"]),this._tileDiscardPolicy=t.tileDiscardPolicy,this._ready=!0}getTileCredits(t,i,n){if(!this.ready)throw new Cesium.DeveloperError("getTileCredits must not be called before the imagery provider is ready.")}requestImage(t,i,n,o){if(!this.ready)throw new Cesium.DeveloperError("requestImage must not be called before the imagery provider is ready.");const s=HO.call(this,t,i,n,o);return Cesium.ImageryProvider.loadImage(this,s)}pickFeatures(t,i,n,o,s){}get url(){return this._resource.url}get proxy(){return this._resource.proxy}get mapStyle(){return this._mapStyle}get tileWidth(){return this._tileWidth}get tileHeight(){return this._tileHeight}get maximumLevel(){return this._maximumLevel}get minimumLevel(){return this._minimumLevel}get tilingScheme(){return this._tilingScheme}get rectangle(){return this._rectangle}get errorEvent(){return this._errorEvent}get ready(){return!0}get credit(){return this._credit}get hasAlphaChannel(){return!0}get tileDiscardPolicy(){return this._tileDiscardPolicy}}function HO(e,t,i,n){var o;const{combine:s,defined:a,defaultValue:r,queryToObject:l,objectToQuery:c}=Cesium,u=Object.freeze,d=u({service:"WMTS",version:"1.0.0",request:"GetTile"});this._epsgCode==="900913"&&(i-=1);const h=this._tileMatrixLabels,p=a(h)?h[i]:i.toString(),v=this._subdomains;let b=this._url.replace("{s}",v[(e+t+i)%v.length]);const y=new GO(b);let x=l(r((o=y.query)==null?void 0:o.call(y),""));x=s(d,x),x.tilematrix=p,x.layer=this._layer,x.style=this._style,x.tilerow=t,x.tilecol=e,x.tilematrixset=this._tileMatrixSetID,x.format=this._format;const M=c(x);return b=y.toString()+"?"+M,a(this._proxy)&&(b=this._proxy.getURL(b)),a(this._token)&&(b+="&tk="+this._token),this._resource.getDerivedResource({url:b,request:n})}const Pg={...wi,...di,...oi,...Dt,mapStyle:{type:String,default:"img_w",validator:e=>["cia_c","cia_w","cta_c","cta_w","cva_c","cva_w","eia_c","eia_w","eva_c","eva_w","img_c","img_w","ter_c","ter_w","vec_c","vec_w","ibo_c","ibo_w"].includes(e)},token:String,protocol:{type:String,default:"https"},credit:{type:[String,Object],default:"\u5929\u5730\u56FE\u5168\u7403\u5F71\u50CF\u670D\u52A1"},...Ln};var Sg=K({name:"VcImageryProviderTianditu",props:Pg,emits:dt,setup(e,t){const i=oe();i.cesiumClass="TiandituImageryProvider";const n=ut(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{Cesium.TiandituImageryProvider=Cesium.TiandituImageryProvider||UO,n.unwatchFns.length===0&&n.setPropsWatcher(!0);const o=n.transformProps(e);return new Cesium.TiandituImageryProvider(o)},()=>{var o;return ie(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const Tg={...ki,...$e,color:{type:[Object,String,Array],default:"YELLOW"},...Gi,...Ui};var Ig=K({name:"VcImageryProviderTileCoordinates",props:Tg,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="TileCoordinatesImageryProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Ag={url:[String,Object],...Pr,...St,...di,...oi,...Dt,...ki,...$e,...Gi,...Ui,flipXY:Boolean,...Ln};var Dg=K({name:"VcImageryProviderTms",props:Ag,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="TileMapServiceImageryProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Bg={...wi,...Tr,...St,...di,...oi,...Dt,...ki,...$e,...Gi,...Ui,dir:{type:String,reqiured:!0},scales:{type:Array,default:()=>[1/295829355,1/147914678,1/73957339,1/36978669,1/18489335,1/9244667,1/4622334,1/2311167,1/1155583,1/577792,1/288896,1/144448,1/72224,1/36112,1/18056,1/9026,1/4514]}};var Lg=K({name:"VcImageryProviderTiledcache",props:Bg,emits:dt,setup(e,t){const i=oe();i.cesiumClass="UrlTemplateImageryProvider";const n=ut(e,t,i);if(n===void 0)return;i.createCesiumObject=async()=>{const s=n.transformProps(e),{Credit:a,defined:r,defaultValue:l,DeveloperError:c,Ellipsoid:u,GeographicTilingScheme:d,Rectangle:h,Resource:p,UrlTemplateImageryProvider:v}=Cesium,{url:b,dir:y,format:x}=s;if(!r(b))throw new c("options.url is required.");if(!r(y))throw new c("options.dir is required.");const M=p.createIfNeeded(b);M.url+=`?dir=${y}&scale={scale}&col={x}&row={y}&format=${x}`;const g=l(s.tilingScheme,new d({ellipsoid:l(s.ellipsoid,u.WGS84),numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:1})),w=l(s.tileWidth,256),O=l(s.tileHeight,256),I=s.maximumLevel,R=l(s.minimumLevel,0),D=l(s.rectangle,g.rectangle),P=g.positionToTileXY(h.southwest(D),R),k=g.positionToTileXY(h.northeast(D),R),N=(Math.abs(k.x-P.x)+1)*(Math.abs(k.y-P.y)+1);if(N>4)throw new c("The rectangle and minimumLevel indicate that there are "+N+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");let $=l(s.credit,"");return typeof $=="string"&&($=new a($)),new v({url:M,credit:$,tilingScheme:g,tileWidth:w,tileHeight:O,minimumLevel:R,maximumLevel:I,rectangle:D,customTags:{scale:(m,f,C,T)=>{const _=1/e.scales[T];return o(m,"{scale}",_)}}})};const o=(s,a,r)=>{if(s&&s.urlSchemeZeroPadding&&Object.prototype.hasOwnProperty.call(s.urlSchemeZeroPadding,a)){const l=s.urlSchemeZeroPadding[a];if(typeof l=="string"){const c=l.length;c>1&&(r=r.length>=c?r:new Array(c-r.toString().length+1).join("0")+r)}}return r};return()=>{var s;return ie(se(((s=i.proxy)==null?void 0:s.$options.name)||""))}}});const jg={...wi,pickFeaturesUrl:[String,Object],urlSchemeZeroPadding:Object,...qa,...St,...di,...oi,...Dt,...ki,...$e,...Gi,...Ui,hasAlphaChannel:{type:Boolean,default:!0},...Ir,...Wa,customTags:Object,...Ln};var Fg=K({name:"VcImageryProviderUrltemplate",props:jg,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="UrlTemplateImageryProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const kg={...wi,...Or,parameters:Object,getFeatureInfoParameters:Object,...Wa,...Ir,...Dt,...ki,...$e,...Gi,...Ui,...di,...oi,crs:String,srs:String,...St,...qa,...Fo,...Ar,getFeatureInfoUrl:[String,Object]};var Rg=K({name:"VcImageryProviderWms",props:kg,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="WebMapServiceImageryProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const $g={...wi,...Tr,layer:{type:String,required:!0},wmtsStyle:{type:String,required:!0},tileMatrixSetID:{type:String,required:!0},tileMatrixLabels:Array,...Fo,...Ar,dimensions:Object,...Gi,...Ui,...ki,...Dt,...di,...oi,...$e,...St,...qa};var Ng=K({name:"VcImageryProviderWmts",props:$g,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="WebMapTileServiceImageryProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Vg={url:[String,Object],requestVertexNormals:{type:Boolean,default:!1},requestWaterMask:{type:Boolean,default:!1},requestMetadata:{type:Boolean,default:!0},assetId:Number,...$e,...St};var zg=K({name:"VcTerrainProviderCesium",props:Vg,emits:dt,setup(e,t){const i=oe();i.cesiumClass="CesiumTerrainProvider";const n=ut(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{n.unwatchFns.length===0&&n.setPropsWatcher(!0);const o=n.transformProps(e);return Cesium.defined(e.assetId)&&typeof Cesium[i.cesiumClass].fromIonAssetId=="function"?await Cesium.CesiumTerrainProvider.fromIonAssetId(e.assetId,o):typeof Cesium[i.cesiumClass].fromUrl=="function"?Cesium.defined(o.url)?await Cesium.CesiumTerrainProvider.fromUrl(o.url,o):await Cesium.createWorldTerrainAsync({requestVertexNormals:o.requestVertexNormals,requestWaterMask:o.requestWaterMask}):Cesium.defined(o.url)?new Cesium.CesiumTerrainProvider(o):Cesium.createWorldTerrain({requestVertexNormals:o.requestVertexNormals,requestWaterMask:o.requestWaterMask})},()=>{var o;return ie(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const Gg={url:{type:[String,Object],default:"https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"},...$e,...Mr};var Ug=K({name:"VcTerrainProviderArcgis",props:Gg,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="ArcGISTiledElevationTerrainProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const Hg={url:{type:[String,Object],default:"https://www.vr-theworld.com/vr-theworld/tiles1.0.0/73/"},...$e,...St};var Wg=K({name:"VcTerrainProviderVrTheworld",props:Hg,emits:dt,setup(e,t){const i=oe();return i.cesiumClass="VRTheWorldTerrainProvider",ut(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const qg={url:{type:String,default:"https://{s}.tianditu.gov.cn/"},subdomains:{type:Array,default:()=>["t0","t1","t2","t3","t4","t5","t6","t7"]},pluginPath:{type:String,default:"https://api.tianditu.gov.cn/cdn/plugins/cesium/cesiumTdt.js"},dataType:{type:String,default:"int",validator:e=>["int","float"].includes(e)},tileType:{type:String,default:"heightmap",validator:e=>["heightmap","quantized-mesh"].includes(e)},token:String};var Qg=K({name:"VcTerrainProviderTianditu",props:qg,emits:dt,setup(e,t){const i=oe();i.cesiumClass="GeoTerrainProvider";const n=ut(e,t,i);if(n===void 0)return;const{emit:o}=t,s=sl();let a;return i.createCesiumObject=async()=>new Promise((r,l)=>{a=document.createElement("script"),document.body.appendChild(a),a.src=e.pluginPath,a.onload=()=>{n.unwatchFns.length===0&&n.setPropsWatcher(!0);const c=[];for(let u=0;u<e.subdomains.length;u++){const d=e.url.replace("{s}",e.subdomains[u])+"mapservice/swdx?tk="+e.token;c.push(d)}r(new Cesium.GeoTerrainProvider({urls:c}))}}),i.unmount=async()=>{var r;const l=new Cesium.EllipsoidTerrainProvider;return(r=l==null?void 0:l.readyPromise)==null||r.then(()=>{Pe(i,"readyPromise")&&o("readyPromise",l,s==null?void 0:s.viewer,i.proxy)}),s&&(s.viewer.terrainProvider=l),a==null||a.parentNode.removeChild(a),!0},()=>{var r;return ie(se(((r=i.proxy)==null?void 0:r.$options.name)||""))}}});const WO=[Q0,J0,K0,tg,ng,ag,sg,lg,ug,hg,gg,Cg,Sg,Ig,Dg,Lg,Fg,Rg,Ng,zg,Ug,Wg,Qg];WO.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Zg=Q0,Jg=J0,Xg=K0,Yg=tg,Kg=ng,ey=ag,ty=sg,iy=lg,ny=ug,oy=hg,ay=gg,sy=Cg,ry=Sg,ly=Ig,cy=Dg,uy=Lg,dy=Fg,hy=Rg,my=Ng,py=zg,vy=Ug,fy=Wg,gy=Qg,yy={...Ie,...Qe,entities:{type:Array,default:()=>[]},name:String,destroy:{type:Boolean,default:!1}};var by=K({name:"VcDatasourceCustom",props:yy,emits:Yo,setup(e,t){const i=oe();return i.cesiumClass="CustomDataSource",Uo(e,t,i),i.createCesiumObject=async()=>new Cesium.CustomDataSource(e.name),()=>{var n,o;return t.slots.default?S("i",{class:se(((n=i.proxy)==null?void 0:n.$options.name)||""),style:{display:"none !important"}},Je(t.slots.default)):ie(se(((o=i.proxy)==null?void 0:o.$options.name)||""))}}});const Cy={...Ie,...Qe,entities:{type:Array,default:()=>[]},czml:{type:[String,Object,Array],required:!0},...Xa,...St,destroy:{type:Boolean,default:!1}};var wy=K({name:"VcDatasourceCzml",props:Cy,emits:Yo,setup(e,t){const i=oe();i.cesiumClass="CzmlDataSource";const n=Uo(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{const o=n.transformProps(e);return Cesium.CzmlDataSource.load(e.czml,o)},()=>{var o,s;return t.slots.default?S("i",{class:se(((o=i.proxy)==null?void 0:o.$options.name)||""),style:{display:"none !important"}},Je(t.slots.default)):ie(se(((s=i.proxy)==null?void 0:s.$options.name)||""))}}});const _y={...Ie,...Qe,entities:{type:Array,default:()=>[]},...Wr,...Xa,describe:[Function,Object],markerSize:{type:Number,default:48},markerSymbol:String,markerColor:{type:[Object,String,Array],default:()=>({x:.2549019607843137,y:.4117647058823529,z:.8823529411764706}),watcherOptions:{cesiumObjectBuilder:Te}},stroke:{type:[Object,String,Array],default:()=>({x:1,y:1,z:0}),watcherOptions:{cesiumObjectBuilder:Te}},strokeWidth:{type:Number,default:2},fill:{type:[Object,String,Array],default:()=>({x:1,y:1,z:0,w:.39215686274509803}),watcherOptions:{cesiumObjectBuilder:Te}},...Lo,...St,destroy:{type:Boolean,default:!1}};var xy=K({name:"VcDatasourceGeojson",props:_y,emits:Yo,setup(e,t){const i=oe();i.cesiumClass="GeoJsonDataSource";const n=Uo(e,t,i);if(n!==void 0)return i.createCesiumObject=async()=>{const o=n.transformProps(e);return Cesium.GeoJsonDataSource.load(e.data,o)},()=>{var o,s;return t.slots.default?S("i",{class:se(((o=i.proxy)==null?void 0:o.$options.name)||""),style:{display:"none !important"}},Je(t.slots.default)):ie(se(((s=i.proxy)==null?void 0:s.$options.name)||""))}}});const Ey={...Ie,...Qe,entities:{type:Array,default:()=>[]},...Wr,camera:Object,canvas:HTMLCanvasElement,...Xa,...Lo,...$e,...St,destroy:{type:Boolean,default:!1},screenOverlayContainer:[Element,String]};var My=K({name:"VcDatasourceKml",props:Ey,emits:Yo,setup(e,t){const i=oe();i.cesiumClass="KmlDataSource";const n=Uo(e,t,i),o=sl();return i.createCesiumObject=async()=>{const s=n==null?void 0:n.transformProps(e);return s.camera||(s.camera=o==null?void 0:o.viewer.camera),s.canvas||(s.canvas=o==null?void 0:o.viewer.canvas),Cesium.KmlDataSource.load(e.data||"",s)},()=>{var s,a;return t.slots.default?S("i",{class:se(((s=i.proxy)==null?void 0:s.$options.name)||""),style:{display:"none !important"}},Je(t.slots.default)):ie(se(((a=i.proxy)==null?void 0:a.$options.name)||""))}}});const qO=[by,wy,xy,My];qO.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Oy=by,Py=wy,Sy=xy,Ty=My,Iy={...Oa,...In,...Zn,...So,...To,...Ao,...Zt,...on,...an,...nr,...Pa,...Bi,...$t,...An,...Dn,...Io,...Tn,...Ie,...ft,...Eu};var Ay=K({name:"VcGraphicsBillboard",props:Iy,emits:Xo,setup(e,t){const i=oe();return i.cesiumClass="BillboardGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Dy={...Ie,...Sa,...Zt,...Li,...ii,...ji,...qt,...Jt,...Nt,...ft};var By=K({name:"VcGraphicsBox",props:Dy,emits:Xo,setup(e,t){const i=oe();return i.cesiumClass="BoxGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const QO={...Ie,...ni,...Bi,...$t,...Zt,...Xt,...Do,...Bn,...st,...Li,...ii,...ji,...qt,...Jt,...Nt,...ft,...Fi,...Jn};var Ly=K({name:"VcGraphicsCorridor",props:QO,emits:Xo,setup(e,t){const i=oe();return i.cesiumClass="CorridorGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const jy={...Ie,...Ta,...Ia,...Aa,...Zt,...Li,...ii,...ji,...qt,...Jt,...Xn,...Da,...Nt,...ft};var Fy=K({name:"VcGraphicsCylinder",props:jy,emits:Xo,setup(e,t){const i=oe();return i.cesiumClass="CylinderGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const ky={...Ie,...Ba,...La,...$t,...Zt,...Xt,...Do,...an,...zi,...st,...Li,...ii,...ji,...qt,...Jt,...Xn,...Nt,...ft,...Fi,...Jn};var Ry=K({name:"VcGraphicsEllipse",props:ky,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="EllipseGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const $y={...Ie,...ja,...Fa,...ka,...Ra,...$a,...Na,...Zt,...Li,...ii,...ji,...qt,...Jt,...Yn,...Kn,...Va,...Nt,...ft};var Ny=K({name:"VcGraphicsEllipsoid",props:$y,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="EllipsoidGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Vy={...Ie,...or,...ar,...sr,...In,...rr,...lr,...cr,...Zn,...So,...To,...Ao,...Zt,...ur,...qt,...Jt,...Dn,...Io,...An,...ft,...Tn};var zy=K({name:"VcGraphicsLabel",props:Vy,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="LabelGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Gy={...Ie,...dr,...In,...hr,...mr,...pr,...Mu,...vr,...Nt,...Zt,...fr,...gr,...on,...yr,...br,...za,...Cr,...ft,...Ou,...Pu,...Bo};var Uy=K({name:"VcGraphicsModel",props:Gy,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="ModelGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Hy={...Ie,leadTime:[Number,Object,Function],trailTime:[Number,Object,Function],...Bi,resolution:{type:[Number,Object,Function],default:60},...ii,...ft};var Wy=K({name:"VcGraphicsPath",props:Hy,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="PathGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||""))}}});const qy={...Ie,...Su,dimensions:{type:[Object,Array,Function],watcherOptions:{cesiumObjectBuilder:ht}},...Li,...ii,...ji,...qt,...Jt,...Nt,...ft};var Qy=K({name:"VcGraphicsPlane",props:qy,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="PlaneGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Zy={...Ie,...wr,...Zt,...on,...qt,...Jt,...An,...Dn,...ft,...Tn};var Jy=K({name:"VcGraphicsPoint",props:Zy,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="PointGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Xy={...Ie,...Tu,...$t,...Zt,...Xt,...Do,...zi,...st,...Li,...ii,...ji,...qt,...Jt,...Ga,..._r,...xr,...sn,...Nt,...ft,...Fi,...Jn};var Yy=K({name:"VcGraphicsPolygon",props:Xy,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="PolygonGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const Ky={...Ie,...ni,...Bi,...st,...ii,...Iu,...sn,...Lo,...Nt,...ft,...Fi,...Jn};var eb=K({name:"VcGraphicsPolyline",props:Ky,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="PolylineGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const tb={...Ie,...ni,...Au,...Bn,...st,...Li,...ii,...ji,...qt,...Jt,...Nt,...ft};var ib=K({name:"VcGraphicsPolylineVolume",props:tb,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="PolylineVolumeGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const nb={...Ie,...Du,...$t,...Zt,...Xt,...Do,...an,...zi,...st,...Li,...ii,...ji,...qt,...Jt,...Nt,...ft,...Fi,...Jn};var ob=K({name:"VcGraphicsRectangle",props:nb,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="RectangleGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const ab={...Ie,...dr,...Er};var sb=K({name:"VcGraphicsTileset",props:ab,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="Cesium3DTilesetGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const rb={...Ie,...ni,...Ua,...Ha,...st,...Li,...ii,...ji,...qt,...Jt,...Nt,...ft};var lb=K({name:"VcGraphicsWall",props:rb,emits:Ce,setup(e,t){const i=oe();return i.cesiumClass="WallGraphics",Bt(e,t,i),()=>{var n;return ie(se(((n=i.proxy)==null?void 0:n.$options.name)||"v-if"))}}});const ZO=[Ay,By,Ly,Fy,Ry,Ny,zy,Uy,Wy,Qy,Jy,Yy,eb,ib,ob,sb,lb];ZO.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const cb=Ay,ub=By,db=Ly,hb=Fy,mb=Ry,pb=Ny,vb=zy,fb=Uy,gb=Wy,yb=Qy,bb=Jy,Cb=Yy,wb=eb,_b=ib,xb=ob,Eb=sb,Mb=lb,JO={fragmentShader:String,uniforms:Object,textureScale:{type:Number,default:1},forcePowerOfTwo:{type:Boolean,default:!1},sampleMode:Number,pixelFormat:Number,pixelDatatype:Number,...Hu,...Wu,name:String},Ob=JO;var Nc=K({name:"VcPostProcessStage",props:Ob,emits:Ce,setup(e,t){const i=oe();i.cesiumClass="PostProcessStage",i.cesiumEvents=[];const n=Ne(e,t,i);if(n===void 0)return;const{$services:o}=n;return i.mount=async()=>{const{postProcessStages:s}=o,a=s.add(i.cesiumObject);return s.contains(a)},i.unmount=async()=>{const{postProcessStages:s}=o;return s==null?void 0:s.remove(i.cesiumObject)},()=>{var s;return ie(se(((s=i.proxy)==null?void 0:s.$options.name)||""))}}}),XO=`
uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
in vec2 v_textureCoordinates;
uniform vec4 u_scanCenterEC;
uniform vec3 u_scanPlaneNormalEC;
uniform vec3 u_scanLineNormalEC;
uniform float u_radius;
uniform vec4 u_scanColor;
vec4 toEye(in vec2 uv, in float depth)
{
vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));
vec4 posInCamera =czm_inverseProjection * vec4(xy, depth, 1.0);
posInCamera =posInCamera / posInCamera.w;
return posInCamera;
}
bool isPointOnLineRight(in vec3 ptOnLine, in vec3 lineNormal, in vec3 testPt)
{
vec3 v01 = testPt - ptOnLine;
normalize(v01);
vec3 temp = cross(v01, lineNormal);
float d = dot(temp, u_scanPlaneNormalEC);
return d > 0.5;
}
vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point)
{
vec3 v01 = point -planeOrigin;
float d = dot(planeNormal, v01) ;
return (point - planeNormal * d);
}
float distancePointToLine(in vec3 ptOnLine, in vec3 lineNormal, in vec3 testPt)
{
vec3 tempPt = pointProjectOnPlane(lineNormal, ptOnLine, testPt);
return length(tempPt - ptOnLine);
}
float getDepth(in vec4 depth)
{
float z_window = czm_unpackDepth(depth);
z_window = czm_reverseLogDepth(z_window);
float n_range = czm_depthRange.near;
float f_range = czm_depthRange.far;
return (2.0 * z_window - n_range - f_range) / (f_range - n_range);
}
void main()
{
out_FragColor = texture(colorTexture, v_textureCoordinates);
float depth = getDepth( texture(depthTexture, v_textureCoordinates));
vec4 viewPos = toEye(v_textureCoordinates, depth);
vec3 prjOnPlane = pointProjectOnPlane(u_scanPlaneNormalEC.xyz, u_scanCenterEC.xyz, viewPos.xyz);
float dis = length(prjOnPlane.xyz - u_scanCenterEC.xyz);
float twou_radius = u_radius * 2.0;
if(dis < u_radius)
{
float f0 = 1.0 -abs(u_radius - dis) / u_radius;
f0 = pow(f0, 64.0);
vec3 lineEndPt = vec3(u_scanCenterEC.xyz) + u_scanLineNormalEC * u_radius;
float f = 0.0;
if(isPointOnLineRight(u_scanCenterEC.xyz, u_scanLineNormalEC.xyz, prjOnPlane.xyz))
{
float dis1= length(prjOnPlane.xyz - lineEndPt);
f = abs(twou_radius -dis1) / twou_radius;
f = pow(f, 3.0);
}
out_FragColor = mix(out_FragColor, u_scanColor, f + f0);
}
}
`;function YO(e){return{webgl:t=>{var i;const{viewer:n}=e,o=(i=e.viewer.scene.context)==null?void 0:i.webgl2;let s=XO;o||(s=s.replace("in vec2 v_textureCoordinates;","varying vec2 v_textureCoordinates;"),s=s.replace(/texture\(/g,"texture2D("),s=s.replace(/out_FragColor/g,"gl_FragColor"));const a=Cesium.Cartographic.fromCartesian(t.position,n.scene.globe.ellipsoid),r=Cesium.Cartographic.toCartesian(a,n.scene.globe.ellipsoid),l=new Cesium.Cartesian4(r.x,r.y,r.z,1),c=new Cesium.Cartographic(a.longitude,a.latitude,a.height+500),u=Cesium.Cartographic.toCartesian(c,n.scene.globe.ellipsoid),d=new Cesium.Cartesian4(u.x,u.y,u.z,1),h=new Cesium.Cartographic(a.longitude+Cesium.Math.toRadians(.001),a.latitude,a.height),p=Cesium.Cartographic.toCartesian(h,n.scene.globe.ellipsoid),v=new Cesium.Cartesian4(p.x,p.y,p.z,1),b=new Cesium.Quaternion,y=new Cesium.Matrix3,x=new Date().getTime(),M=new Cesium.Cartesian4,g=new Cesium.Cartesian4,w=new Cesium.Cartesian4,O=new Cesium.Cartesian3,I=new Cesium.Cartesian3,R={u_scanCenterEC:function(){return Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,l,M)},u_scanPlaneNormalEC:function(){const D=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,l,M),P=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,d,g);return O.x=P.x-D.x,O.y=P.y-D.y,O.z=P.z-D.z,Cesium.Cartesian3.normalize(O,O),O},u_radius:t.radius,u_scanLineNormalEC:function(){const D=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,l,M),P=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,d,g),k=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,v,w);O.x=P.x-D.x,O.y=P.y-D.y,O.z=P.z-D.z,Cesium.Cartesian3.normalize(O,O),I.x=k.x-D.x,I.y=k.y-D.y,I.z=k.z-D.z;const N=(new Date().getTime()-x)%t.interval/t.interval;return Cesium.Quaternion.fromAxisAngle(O,N*Cesium.Math.PI*2,b),Cesium.Matrix3.fromQuaternion(b,y),Cesium.Matrix3.multiplyByVector(y,I,I),Cesium.Cartesian3.normalize(I,I),I},u_scanColor:t.color};return{shaderSource:s,uniforms:R}}}}var KO=`
uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
in vec2 v_textureCoordinates;
uniform vec4 u_scanCenterEC;
uniform vec3 u_scanPlaneNormalEC;
uniform float u_radius;
uniform vec4 u_scanColor;
vec4 toEye(in vec2 uv, in float depth)
{
vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));
vec4 posInCamera =czm_inverseProjection * vec4(xy, depth, 1.0);
posInCamera =posInCamera / posInCamera.w;
return posInCamera;
}
vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point)
{
vec3 v01 = point -planeOrigin;
float d = dot(planeNormal, v01) ;
return (point - planeNormal * d);
}
float getDepth(in vec4 depth)
{
float z_window = czm_unpackDepth(depth);
z_window = czm_reverseLogDepth(z_window);
float n_range = czm_depthRange.near;
float f_range = czm_depthRange.far;
return (2.0 * z_window - n_range - f_range) / (f_range - n_range);
}
void main()
{
out_FragColor = texture(colorTexture, v_textureCoordinates);
float depth = getDepth( texture(depthTexture, v_textureCoordinates));
vec4 viewPos = toEye(v_textureCoordinates, depth);
vec3 prjOnPlane = pointProjectOnPlane(u_scanPlaneNormalEC.xyz, u_scanCenterEC.xyz, viewPos.xyz);
float dis = length(prjOnPlane.xyz - u_scanCenterEC.xyz);
if(dis < u_radius)
{
float f = 1.0 -abs(u_radius - dis) / u_radius;
f = pow(f, 4.0);
out_FragColor = mix(out_FragColor, u_scanColor, f);
}
}
`;function eP(e){return{webgl:t=>{var i;const{viewer:n}=e,o=(i=n.scene.context)==null?void 0:i.webgl2;let s=KO;o||(s=s.replace("in vec2 v_textureCoordinates;","varying vec2 v_textureCoordinates;"),s=s.replace(/texture\(/g,"texture2D("),s=s.replace(/out_FragColor/g,"gl_FragColor"));const a=Cesium.Cartographic.fromCartesian(t.position,n.scene.globe.ellipsoid),r=Cesium.Cartographic.toCartesian(a,n.scene.globe.ellipsoid),l=new Cesium.Cartesian4(r.x,r.y,r.z,1),c=new Cesium.Cartographic(a.longitude,a.latitude,a.height+500),u=Cesium.Cartographic.toCartesian(c,n.scene.globe.ellipsoid),d=new Cesium.Cartesian4(u.x,u.y,u.z,1),h=new Date().getTime(),p=new Cesium.Cartesian4,v=new Cesium.Cartesian4,b=new Cesium.Cartesian3,y={u_scanCenterEC:function(){return Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,l,p)},u_scanPlaneNormalEC:function(){const x=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,l,p),M=Cesium.Matrix4.multiplyByVector(n.camera.viewMatrix,d,v);return b.x=M.x-x.x,b.y=M.y-x.y,b.z=M.z-x.z,Cesium.Cartesian3.normalize(b,b),b},u_radius:function(){return t.radius*((new Date().getTime()-h)%t.interval)/t.interval},u_scanColor:t.color};return{shaderSource:s,uniforms:y}}}}const tP={position:[0,0],radius:1500,interval:3500,color:[0,0,0,255]},Pb={type:{type:String,default:"radar"},options:Object};var Sb=K({name:"VcPostProcessStageScan",props:Pb,emits:Ce,setup(e,t){const i=oe();i.cesiumClass="VcPostProcessStageScan",i.cesiumEvents=[];const n=Ne(e,t,i);if(n===void 0)return;const o=ee(""),s=ee(null),{$services:a}=n,r=YO(a),l=eP(a);let c=[];const u=ae(()=>Object.assign({},tP,e.options));return c.push(de(()=>u,d=>{i.mounted&&i.proxy.reload()},{deep:!0})),i.createCesiumObject=async()=>{const d=n.transformProps(u.value);let h;return e.type==="radar"?h=r.webgl(d):e.type==="circle"&&(h=l.webgl(d)),o.value=h.shaderSource,s.value=h.uniforms,!0},nt(()=>{c.forEach(d=>d()),c=[]}),()=>S(Nc,{fragmentShader:o.value,uniforms:s.value})}});const Tb={postProcesses:{type:Array,default:()=>[]}};var Ib=K({name:"VcPostProcessStageCollection",props:Tb,emits:Ce,setup(e,t){const i=oe();i.cesiumClass="PostProcessStageCollection",i.cesiumEvents=[];const n=Ne(e,t,i);if(n===void 0)return;const{$services:o}=n,s=[];let a=[];return a.push(de(()=>e.postProcesses,r=>{var l,c;i.mounted&&((c=(l=i.proxy).reload)==null||c.call(l))},{deep:!0})),i.createCesiumObject=async()=>s,i.mount=async()=>{const{postProcessStages:r}=o;return e.postProcesses.forEach(l=>{const c=n.transformProps(l);s.push(r.add(new Cesium.PostProcessStage(c)))}),!0},i.unmount=async()=>{const{postProcessStages:r}=o;return s.forEach(l=>{r.remove(l)}),s.length=0,!0},nt(()=>{a.forEach(r=>r()),a=[]}),()=>{var r,l;return t.slots.default?S("i",{class:se(((r=i.proxy)==null?void 0:r.$options.name)||""),style:{display:"none !important"}},Je(t.slots.default)):ie(se(((l=i.proxy)==null?void 0:l.$options.name)||""))}}});const iP=[Nc,Sb,Ib];iP.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Ab=Nc,Db=Sb,Bb=Ib;var Ns=K({name:"VcConfigProvider",props:{locale:{type:Object,default:()=>Qu},cesiumPath:{type:String,default:"https://unpkg.com/cesium@latest/Build/Cesium/Cesium.js"},accessToken:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2OGE2MjZlOC1mMzhiLTRkZjQtOWEwZi1jZTE0MWY0YzhlMTAiLCJpZCI6MjU5LCJpYXQiOjE2NDM3MjU1NzZ9.ptZ5tVXvMmuWRC0WhjtYTg-17nQh14fgxBsx0HJiVXQ"},reloadMode:{type:String,default:"all"}},setup(e,{slots:t}){const i=ou(e);return()=>Hb(t,"default",{config:i==null?void 0:i.value})}});Ns.install=e=>{e.component(Ns.name,Ns)};const Lb=Ns,nP=Lb,oP={...Ce,stop:e=>!0};var jb=K({name:"VcAnalysisFlood",props:{minHeight:{type:Number,default:-1},maxHeight:{type:Number,default:8888},speed:{type:Number,default:10},loop:{type:Boolean,default:!1},color:{type:[Object,Array,String],default:"rgba(40,150,200,0.6)"},...kn},emits:oP,setup(e,t){var i;const n=oe();n.cesiumClass="VcAnalysisFlood",n.cesiumEvents=[];const o=Ne(e,t,n);if(o===void 0)return;const{emit:s}=t,a=ee(!1);(i=Pt(n).proxy.creatingPromise)==null||i.then(()=>{a.value=!0});const r=ee(!1),l=ee(null),c=ee(-1),u=ee(null);let d=!1,h=[];h.push(de(()=>e.minHeight,x=>{c.value=x})),n.createCesiumObject=async()=>{const{ColorGeometryInstanceAttribute:x}=Cesium;return l.value={color:x.fromColor(Te(e.color))},u.value},n.mount=async()=>{const{viewer:x}=o.$services;return x.clock.onTick.addEventListener(p),!0},n.unmount=async()=>{const{viewer:x}=o.$services;return x.clock.onTick.removeEventListener(p),c.value=-1,r.value=!1,!0};const p=()=>{r.value&&(c.value<=e.maxHeight?(c.value+=e.speed,d=!1):(Pe(n,"stop")&&s("stop",u.value),d=!0,e.loop?c.value=e.minHeight:r.value=!1))},v=x=>{c.value=Cesium.defined(x)?x:e.minHeight,r.value=!0},b=()=>{r.value=!r.value,d&&(c.value=e.minHeight)},y=()=>{c.value=-1,r.value=!1};return nt(()=>{h.forEach(x=>x()),h=[]}),Object.assign(n.proxy,{start:v,pause:b,stop:y,getCurrentHeight:()=>c.value}),()=>{if(a.value){const{createGuid:x}=Cesium;return S(Ec,{asynchronous:!1,ref:u},()=>S(_n,{id:x(),attributes:l.value},()=>S(Tc,{extrudedHeight:c.value,polygonHierarchy:e.polygonHierarchy})))}else return ie("v-if")}}});const aP=Object.assign({},gt,{icon:"vc-icons-analysis-sightline"}),sP=Object.assign({},vc,{polylineOpts:Object.assign({},go,{colors:["#51ff00","red"]}),primitiveOpts:Object.assign({},Un,{appearance:{type:"PolylineColorAppearance"},depthFailAppearance:{type:"PolylineColorAppearance"}}),sightlineType:"polyline"}),rP=Object.assign({},gt,{icon:"vc-icons-analysis-viewshed"}),lP=Object.assign({},Ps,{pointOpts:Object.assign({},Cn,{show:!1}),polylineOpts:Object.assign({},go,{width:15}),primitiveOpts:Object.assign({},Un,{show:!1,appearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"PolylineArrow",uniforms:{color:[255,255,0,255]}}}}},depthFailAppearance:{type:"PolylineMaterialAppearance",options:{material:{fabric:{type:"PolylineArrow",uniforms:{color:[255,255,0,255]}}}}}}),editorOpts:{pixelOffset:[16,-8],delay:1e3,hideDelay:1e3,move:Object.assign({},Mt),removeAll:Object.assign({},Mt,{icon:"vc-icons-delete"})},viewshedOpts:{fovH:90,fovV:60,offsetHeight:1.8,visibleColor:"#00ff00",invisibleColor:"#ff0000",showGridLine:!0,faceColor:"rgba(255,255,255,0.1)",lineColor:"rgba(255,255,255,0.4)"}}),cP=Object.assign({},{}),uP=Object.assign({},gt,{direction:"right",icon:"vc-icons-analysis-button",activeIcon:"vc-icons-analysis-button",verticalActionsAlign:"center",hideIcon:!1,persistent:!1,modelValue:!0,hideActionOnClick:!1,color:"info"}),Fb=["sightline","viewshed"],dP=e=>{let t=!0;return e.forEach(i=>{Fb.includes(i)||(console.error(`VueCesium: unknown analysis type: ${i}`),t=!1)}),t},Vc={...gc,analyses:{type:Array,default:()=>Fb,validator:dP},mainFabOpts:{type:Object,default:()=>uP},fabActionOpts:{type:Object,default:()=>cP},sightlineActionOpts:{type:Object,default:()=>aP},sightlineAnalysisOpts:{type:Object,default:()=>sP},viewshedActionOpts:{type:Object,default:()=>rP},viewshedAnalysisOpts:{type:Object,default:()=>lP}},Mn=bi(Vc);var kb=K({name:"VcAnalysisSightline",props:{...Ut,polylineOpts:Object,polygonOpts:Object,primitiveOpts:Object,sightlineType:{type:String,default:"polyline"}},emits:xt,setup(e,t){if(e.sightlineType==="segment"||e.sightlineType==="circle")return ln(e,t,"VcAnalysisSightline");if(e.sightlineType==="polyline")return wo(e,t,"VcAnalysisSightline")}}),Rb=K({name:"VcAnalysisViewshed",props:{...Ut,polylineOpts:Object,primitiveOpts:Object,viewshedOpts:Object},emits:xt,setup(e,t){return ln(e,t,"VcAnalysisViewshed")}});const hP={...xt,fabUpdated:e=>!0,clearEvt:(e,t)=>!0};var $b=K({name:"VcAnalyses",props:Vc,emits:hP,setup(e,t){var i;const n=oe();n.cesiumClass="VcAnalyses";const{t:o}=Ct(),s={},a=Ee(Object.assign({},Mn.clearActionOpts,e.clearActionOpts)),r=Ee(Object.assign({},Mn.mainFabOpts,e.mainFabOpts)),l=Ee(Object.assign({},Mn.fabActionOpts,e.fabActionOpts)),c=Ee(Object.assign({},Mn.sightlineActionOpts,b("sightlineActionOpts"))),u=Ee(at(Ve(Mn.sightlineAnalysisOpts),e.sightlineAnalysisOpts)),d=Ee(Object.assign({},Mn.viewshedActionOpts,b("viewshedActionOpts"))),h=Ee(at(Ve(Mn.viewshedAnalysisOpts),e.viewshedAnalysisOpts));s.sightlineActionOpts=c,s.sightlineAnalysisOpts=u,s.viewshedActionOpts=d,s.viewshedAnalysisOpts=h,s.clearActionOpts=a;const p=ae(()=>e.analyses.map(y=>({name:y,type:"analysis",actionStyle:{background:s[`${Rt(y)}ActionOpts`].color,color:s[`${Rt(y)}ActionOpts`].textColor},actionClass:`vc-analysis-${y} vc-analysis-button`,actionRef:ee(null),actionOpts:s[`${Rt(y)}ActionOpts`],cmp:v(y),cmpRef:ee(null),cmpOpts:s[`${Rt(y)}AnalysisOpts`],tip:s[`${Rt(y)}ActionOpts`].tooltip.tip||o(`vc.analysis.${Rt(y)}.tip`),isActive:!1})));function v(y){switch(y){case"sightline":return kb;case"viewshed":return Rb;default:return}}function b(y){return ba(Mn[y],e[y])?l:Object.assign({},l,e[y])}return(i=Bc(e,t,n,p,r,a,"analysis"))==null?void 0:i.renderContent}});const mP=[jb,$b];mP.forEach(e=>{e.install=t=>{t.component(e.name,e)}});const Nb=jb,Vb=$b;var pP=[Oh,Um,Hm,Wm,qm,Qm,Zm,Jm,Xm,Ym,Km,ep,tp,$0,W0,xc,Zg,Jg,Xg,Yg,Kg,ey,ty,iy,ny,oy,ay,sy,ry,ly,cy,uy,dy,hy,my,py,vy,fy,gy,Oy,Py,Sy,Ty,_c,cb,ub,db,hb,mb,pb,vb,fb,gb,yb,bb,Cb,wb,_b,xb,Eb,Mb,Ec,Mc,Is,kp,wn,Rp,$p,zp,Gp,Up,Np,Hp,Sc,Ov,bo,Co,Pv,Hn,Sv,Tv,Iv,Av,Dv,Wn,Lv,zf,Gf,Uf,Hf,Wf,qf,Qf,Zf,Jf,Xf,Yf,Kf,e0,t0,i0,n0,Ls,o0,a0,Tc,s0,xn,r0,l0,c0,u0,d0,h0,m0,p0,v0,En,M0,P0,S0,O0,T0,Ab,Db,Bb,ai,pn,At,xh,Rl,gh,cs,yh,bh,Ch,Bl,Ll,jl,Fl,wh,kl,_h,$l,us,Eh,Lb,Nb,Vb],zc=su([...pP]);const vP=zc.install,fP=zc.version;export{_t as AngleUnits,wt as AreaUnits,bd as DebugCameraPrimitive,It as DistanceUnits,Me as DrawStatus,ll as DynamicOverlay,mu as MaterialExtend,mt as MeasureUnits,rl as PolygonPrimitive,xd as PrimitiveCluster,Sd as RectangleExtend,id as Ripple,Td as ShadowMapShaderExtend,as as Spinner,bl as SpinnerBall,Cl as SpinnerBars,wl as SpinnerDots,_l as SpinnerGears,xl as SpinnerHourglass,El as SpinnerIos,Ml as SpinnerOrbit,Ol as SpinnerOval,Pl as SpinnerPuff,Sl as SpinnerRings,Tl as SpinnerTail,Ka as TouchHold,sd as TouchPan,$1 as TouchRepeat,xh as VcAjaxBar,Vb as VcAnalyses,Nb as VcAnalysisFlood,kb as VcAnalysisSightline,Rb as VcAnalysisViewshed,Sv as VcBillboard,ai as VcBtn,qn as VcCircleWaveMaterialProperty,Sc as VcCollectionBillboard,Ov as VcCollectionCloud,bo as VcCollectionLabel,Co as VcCollectionPoint,Pv as VcCollectionPolyline,Hn as VcCollectionPrimitive,Um as VcCompass,Xm as VcCompassSm,nP as VcConfigProvider,Tv as VcCumulusCloud,Oy as VcDatasourceCustom,Py as VcDatasourceCzml,Sy as VcDatasourceGeojson,Ty as VcDatasourceKml,Zm as VcDistanceLegend,V0 as VcDrawingPin,z0 as VcDrawingPoint,U0 as VcDrawingPolygon,G0 as VcDrawingPolyline,H0 as VcDrawingRectangle,jc as VcDrawingRegular,bO as VcDrawings,OM as VcEntity,$l as VcFab,us as VcFabAction,zf as VcGeometryBox,Gf as VcGeometryBoxOutline,Uf as VcGeometryCircle,Hf as VcGeometryCircleOutline,Qf as VcGeometryCorridor,Zf as VcGeometryCorridorOutline,Jf as VcGeometryCylinder,Xf as VcGeometryCylinderOutline,Yf as VcGeometryEllipse,Kf as VcGeometryEllipseOutline,e0 as VcGeometryEllipsoid,t0 as VcGeometryEllipsoidOutline,i0 as VcGeometryFrustum,n0 as VcGeometryFrustumOutline,Ls as VcGeometryGroundPolyline,_n as VcGeometryInstance,o0 as VcGeometryPlane,a0 as VcGeometryPlaneOutline,Tc as VcGeometryPolygon,Wf as VcGeometryPolygonCoplanar,qf as VcGeometryPolygonCoplanarOutline,s0 as VcGeometryPolygonOutline,xn as VcGeometryPolyline,r0 as VcGeometryPolylineVolume,l0 as VcGeometryPolylineVolumeOutline,c0 as VcGeometryRectangle,u0 as VcGeometryRectangleOutline,d0 as VcGeometrySimplePolyline,h0 as VcGeometrySphere,m0 as VcGeometrySphereOutline,p0 as VcGeometryWall,v0 as VcGeometryWallOutline,cb as VcGraphicsBillboard,ub as VcGraphicsBox,db as VcGraphicsCorridor,hb as VcGraphicsCylinder,mb as VcGraphicsEllipse,pb as VcGraphicsEllipsoid,vb as VcGraphicsLabel,fb as VcGraphicsModel,gb as VcGraphicsPath,yb as VcGraphicsPlane,bb as VcGraphicsPoint,Cb as VcGraphicsPolygon,wb as VcGraphicsPolyline,_b as VcGraphicsPolylineVolume,xb as VcGraphicsRectangle,Eb as VcGraphicsTileset,Mb as VcGraphicsWall,pn as VcIcon,Zg as VcImageryProviderAmap,Jg as VcImageryProviderArcgis,Xg as VcImageryProviderBaidu,Yg as VcImageryProviderBing,Kg as VcImageryProviderGoogle,ey as VcImageryProviderGrid,ty as VcImageryProviderIon,iy as VcImageryProviderMapbox,ny as VcImageryProviderOsm,oy as VcImageryProviderSingletile,ay as VcImageryProviderSupermap,sy as VcImageryProviderTencent,ry as VcImageryProviderTianditu,ly as VcImageryProviderTileCoordinates,uy as VcImageryProviderTiledcache,cy as VcImageryProviderTms,dy as VcImageryProviderUrltemplate,hy as VcImageryProviderWms,my as VcImageryProviderWmts,Iv as VcLabel,TM as VcLayerImagery,ga as VcLineFlowMaterialProperty,F0 as VcMeasurementArea,I0 as VcMeasurementDistance,L0 as VcMeasurementHeight,D0 as VcMeasurementHorizontal,j0 as VcMeasurementPoint,A0 as VcMeasurementPolyline,k0 as VcMeasurementRectangle,R0 as VcMeasurementRegular,B0 as VcMeasurementVertical,lO as VcMeasurements,qm as VcMyLocation,Jm as VcNavigation,Km as VcNavigationSm,S0 as VcOverlayDynamic,O0 as VcOverlayEcharts,M0 as VcOverlayHeatmap,En as VcOverlayHtml,T0 as VcOverlayTyphoon,P0 as VcOverlayWind,ep as VcOverviewMap,Av as VcPoint,Wn as VcPolygon,Dv as VcPolyline,Ab as VcPostProcessStage,Bb as VcPostProcessStageCollection,Db as VcPostProcessStageScan,wn as VcPrimitive,Ec as VcPrimitiveClassification,Hp as VcPrimitiveCluster,Mc as VcPrimitiveGround,Is as VcPrimitiveGroundPolyline,Gp as VcPrimitiveI3sDataProvider,kp as VcPrimitiveModel,$p as VcPrimitiveOsmBuildings,Np as VcPrimitiveParticle,Rp as VcPrimitiveTileset,zp as VcPrimitiveTimeDynamicPointCloud,Up as VcPrimitiveVoxel,Wm as VcPrint,tp as VcSelectionIndicator,Rl as VcSkeleton,Eh as VcSlider,_h as VcSpinner,gh as VcSpinnerBall,cs as VcSpinnerBars,yh as VcSpinnerDots,bh as VcSpinnerGears,Ch as VcSpinnerHourglass,Bl as VcSpinnerIos,Ll as VcSpinnerOrbit,jl as VcSpinnerOval,Fl as VcSpinnerPuff,wh as VcSpinnerRings,kl as VcSpinnerTail,Qm as VcStatusBar,vy as VcTerrainProviderArcgis,py as VcTerrainProviderCesium,gy as VcTerrainProviderTianditu,fy as VcTerrainProviderVrTheworld,cC as VcTimeline,At as VcTooltip,Oh as VcViewer,Vp as VcViewshed,Hm as VcZoomControl,Ym as VcZoomControlSm,Id as Viewshed,md as VisibilityState,zt as VolumeUnits,Yd as ajaxBarProps,q0 as amapImageryProviderProps,Vc as analysesProps,Z0 as arcgisImageryProviderProps,Gg as arcgisTerrainProviderProps,Y0 as baiduImageryProviderProps,Iy as billboarGraphicsProps,ov as billboardCollectionProps,sv as billboardProps,eg as bingImageryProviderProps,jv as boxGeometryProps,Dy as boxGraphicsProps,kv as boxOutlineGeometryProps,Nd as btnProps,Xu as buildLocaleContext,Zu as buildTranslator,Vg as cesiumTerrainProviderProps,$v as circleGeometryProps,Vv as circleOutlineGeometryProps,hp as classificationPrimitiveProps,cv as cloudCollectionProps,Ce as commonEmits,Dh as compassProps,Lm as compassSmProps,qv as corridorGeometryProps,Zv as corridorOutlineGeometryProps,lv as cumulusCloudProps,yy as customDatasourceProps,Xv as cylinderGeometryProps,jy as cylinderGraphicsProps,Kv as cylinderOutlineGeometryProps,Cy as czmlDatasourceProps,Yo as datasourceEmits,zc as default,Im as distanceLegendProps,xt as drawingEmit,Lc as drawingsProps,iv as dynamicOverlayProps,Qp as echartsOverlayProps,tf as ellipseGeometryProps,ky as ellipseGraphicsProps,of as ellipseOutlineGeometryProps,sf as ellipsoidGeometryProps,$y as ellipsoidGraphicsProps,up as entityProps,dh as fabActionProps,lh as fabProps,cf as frustumGeometryProps,df as frustumOutlineGeometryProps,_y as geojsonDatasourceProps,Bv as geometryInstanceProps,ig as googleImageryProviderProps,Xo as graphicsEmits,og as gridImageryProviderProps,mf as groundPolylineGeometryProps,fp as groundPolylinePrimitiveProps,pp as groundPrimitiveProps,Wp as heatmapOverlayProps,cp as htmlOverlayProps,Ap as i3sDataProviderProps,kd as iconProps,dp as imageryLayerProps,vP as install,OO as ionImageryProviderProps,Ey as kmlDatasourceProps,dv as labelCollectionProps,Vy as labelGraphicsProps,mv as labelProps,su as makeInstaller,rg as mapboxImageryProviderProps,bc as measurementsProps,Gy as modelGraphicsProps,yp as modelPrimitiveProps,kh as myLocationProps,Dm as navigationProps,Rm as navigationSmProps,Ep as osmBuildingsProps,cg as osmImageryProviderProps,Nm as overviewProps,Op as particlePrimitiveProps,Hy as pathGraphicsProps,Jo as pickEventEmits,vf as planeGeometryProps,qy as planeGraphicsProps,vv as pointCollectionProps,Zy as pointGraphicsProps,gv as pointProps,Hv as polygonCoplanarOutlineProps,Gv as polygonCoplanarProps,yf as polygonGeometryProps,Xy as polygonGraphicsProps,Cf as polygonOutlineGeometryProps,Ev as polygonProps,_f as polylineGeometryProps,Ky as polylineGraphicsProps,Cv as polylineProps,Ef as polylineVolumeGeometryProps,tb as polylineVolumeGraphicsProps,Of as polylineVolumeOutlineGeometryProps,Tb as postProcessStageCollectionProps,Ob as postProcessStageProps,Pb as postProcessStageScanProps,jp as primitiveClusterProps,Si as primitiveCollectionEmits,_v as primitiveCollectionProps,pi as primitiveEmits,Cp as primitiveProps,jh as printProps,dt as providerEmits,Sf as rectangleGeometryProps,nb as rectangleGraphicsProps,If as rectangleOutlineGeometryProps,zm as selectionIndicatorProps,Df as simplePolylineGeometryProps,dg as singletileImageryProviderProps,nh as skeletonAnimations,oh as skeletonProps,ih as skeletonTypes,vh as sliderProps,Ff as sphereGeometryOutlineProps,Lf as sphereGeometryProps,Sm as statusBarProps,fg as supermapImageryProviderProps,bg as tencentImageryProviderProps,Pg as tiandituImageryProviderProps,qg as tiandituTerrainProviderProps,Tg as tileCoordinatesImageryProviderProps,Bg as tiledcacheImageryProviderProps,ab as tilesetGraphicsProps,_p as tilesetPrimitiveProps,Tp as timeDynamicPointCloudProps,Ag as tmsImageryProviderProps,Zd as tooltipProps,Ju as translate,x0 as typhoonOverlayProps,jg as urltemplateImageryProviderProps,Ne as useCommon,Uo as useDatasources,qr as useEvents,He as useGeometries,Bt as useGraphics,rd as useHandler,Ct as useLocale,$n as usePrimitiveCollectionItems,Nn as usePrimitiveCollections,mi as usePrimitives,ut as useProviders,sl as useVueCesium,Vi as vcKey,fP as version,Dd as viewerProps,Sp as viewshedProps,Bp as voxelPromitiveProps,Hg as vrTheworldImageryProviderProps,Rf as wallGeometryProps,rb as wallGraphicsProps,Nf as wallOutlineProps,ev as windmapOverlayProps,kg as wmsImageryProviderProps,$g as wmtsImageryProviderProps,Bh as zoomControlProps,jm as zoomControlSmProps};
//# sourceMappingURL=index.full.min.mjs.map