ow-eengine-power 2.1.3 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/OW_EEngine_Power.js
CHANGED
|
@@ -44214,7 +44214,7 @@ function DD(e, t, n, i) {
|
|
|
44214
44214
|
}
|
|
44215
44215
|
return s.push(t), s;
|
|
44216
44216
|
}
|
|
44217
|
-
class
|
|
44217
|
+
class PD {
|
|
44218
44218
|
constructor() {
|
|
44219
44219
|
oe(this, "LineID", "myEntity1");
|
|
44220
44220
|
oe(this, "Tag", "");
|
|
@@ -44236,7 +44236,7 @@ class BD {
|
|
|
44236
44236
|
oe(this, "wireWidth", 1);
|
|
44237
44237
|
}
|
|
44238
44238
|
}
|
|
44239
|
-
class
|
|
44239
|
+
class BD {
|
|
44240
44240
|
constructor() {
|
|
44241
44241
|
// 杆塔id
|
|
44242
44242
|
oe(this, "id", "");
|
|
@@ -44265,7 +44265,7 @@ class RD {
|
|
|
44265
44265
|
oe(this, "Insulators", []);
|
|
44266
44266
|
}
|
|
44267
44267
|
}
|
|
44268
|
-
class
|
|
44268
|
+
class RD {
|
|
44269
44269
|
constructor() {
|
|
44270
44270
|
// 绝缘子串id
|
|
44271
44271
|
oe(this, "id", "");
|
|
@@ -44294,7 +44294,7 @@ class LD {
|
|
|
44294
44294
|
oe(this, "InsulatorPoint", []);
|
|
44295
44295
|
}
|
|
44296
44296
|
}
|
|
44297
|
-
class
|
|
44297
|
+
class LD {
|
|
44298
44298
|
constructor() {
|
|
44299
44299
|
oe(this, "name", "");
|
|
44300
44300
|
oe(this, "X", -45);
|
|
@@ -44303,7 +44303,7 @@ class zD {
|
|
|
44303
44303
|
}
|
|
44304
44304
|
}
|
|
44305
44305
|
var en = /* @__PURE__ */ ((e) => (e[e.A相 = 0] = "A相", e[e.B相 = 1] = "B相", e[e.C相 = 2] = "C相", e[e.地线1 = 3] = "地线1", e[e.地线2 = 4] = "地线2", e))(en || {}), ss = /* @__PURE__ */ ((e) => (e[e.直线塔 = 0] = "直线塔", e[e.耐张塔 = 1] = "耐张塔", e[e.门架塔 = 2] = "门架塔", e[e.换位塔 = 3] = "换位塔", e))(ss || {}), OD = /* @__PURE__ */ ((e) => (e[e.交流单回路 = 0] = "交流单回路", e[e.交流双回路 = 1] = "交流双回路", e[e.直流单回路 = 2] = "直流单回路", e[e.直流双回路 = 3] = "直流双回路", e[e.交流四回路 = 4] = "交流四回路", e))(OD || {}), pa = /* @__PURE__ */ ((e) => (e[e.地线 = 0] = "地线", e[e.回路一 = 1] = "回路一", e[e.回路二 = 2] = "回路二", e[e.回路三 = 3] = "回路三", e[e.回路四 = 4] = "回路四", e))(pa || {}), Ht = /* @__PURE__ */ ((e) => (e[e.悬垂串 = 0] = "悬垂串", e[e.耐张串 = 1] = "耐张串", e[e.跳线串 = 2] = "跳线串", e[e.硬跳串 = 3] = "硬跳串", e[e.V串 = 4] = "V串", e[e.地线串 = 5] = "地线串", e[e.绕跳临时 = 6] = "绕跳临时", e))(Ht || {}), $ = /* @__PURE__ */ ((e) => (e[e.单分裂 = 0] = "单分裂", e[e.双分裂 = 1] = "双分裂", e[e.四分裂 = 2] = "四分裂", e[e.六分裂 = 3] = "六分裂", e[e.八分裂 = 4] = "八分裂", e))($ || {});
|
|
44306
|
-
class
|
|
44306
|
+
class zD {
|
|
44307
44307
|
// 类的构造函数,用于初始化属性
|
|
44308
44308
|
constructor(t, n, i) {
|
|
44309
44309
|
//三维场景
|
|
@@ -45342,7 +45342,7 @@ class ND {
|
|
|
45342
45342
|
this.Keym == "OW_JPS_EEngin_001" && (this.viewer.dataSources.remove(this.dataSource2), this.entityCollection2.show = !1);
|
|
45343
45343
|
}
|
|
45344
45344
|
}
|
|
45345
|
-
class
|
|
45345
|
+
class ND {
|
|
45346
45346
|
constructor() {
|
|
45347
45347
|
// 杆塔id
|
|
45348
45348
|
oe(this, "id", "");
|
|
@@ -45398,28 +45398,6 @@ function vD(e) {
|
|
|
45398
45398
|
}
|
|
45399
45399
|
return { TowerNodes: n, connections: i };
|
|
45400
45400
|
}
|
|
45401
|
-
function WD(e) {
|
|
45402
|
-
const t = e.split(`
|
|
45403
|
-
`), n = [];
|
|
45404
|
-
for (const i of t) {
|
|
45405
|
-
if (!i.trim()) continue;
|
|
45406
|
-
const s = i.trim().split(/\s+/).filter((f) => f !== ""), a = parseInt(s[0]);
|
|
45407
|
-
if (isNaN(a)) continue;
|
|
45408
|
-
const r = [];
|
|
45409
|
-
for (let f = 1; f < s.length; f += 3) {
|
|
45410
|
-
const c = parseFloat(s[f]), h = parseFloat(s[f + 1]), d = parseFloat(s[f + 2]);
|
|
45411
|
-
if (!isNaN(c) && !isNaN(h) && !isNaN(d)) {
|
|
45412
|
-
const p = Math.floor((f - 1) / 3) + 1;
|
|
45413
|
-
r.push({ timeStep: p, x: c, y: h, z: d });
|
|
45414
|
-
}
|
|
45415
|
-
}
|
|
45416
|
-
n.push({
|
|
45417
|
-
nodeId: a,
|
|
45418
|
-
displacements: r
|
|
45419
|
-
});
|
|
45420
|
-
}
|
|
45421
|
-
return n;
|
|
45422
|
-
}
|
|
45423
45401
|
function ld(e) {
|
|
45424
45402
|
const t = {};
|
|
45425
45403
|
return e.forEach((n) => {
|
|
@@ -45431,7 +45409,7 @@ function ld(e) {
|
|
|
45431
45409
|
});
|
|
45432
45410
|
}), t;
|
|
45433
45411
|
}
|
|
45434
|
-
class
|
|
45412
|
+
class FD {
|
|
45435
45413
|
// 类的构造函数,用于初始化属性
|
|
45436
45414
|
constructor(t, n, i) {
|
|
45437
45415
|
//三维场景
|
|
@@ -45456,7 +45434,7 @@ class MD {
|
|
|
45456
45434
|
if (this.Keym != "OW_JPS_EEngin_001")
|
|
45457
45435
|
return;
|
|
45458
45436
|
const { TowerNodes: t, connections: n } = vD(this.TowerFZS.towerFZinfo);
|
|
45459
|
-
this.TowerNodes = t, this.connections = n
|
|
45437
|
+
this.TowerNodes = t, this.connections = n;
|
|
45460
45438
|
debugger;
|
|
45461
45439
|
}
|
|
45462
45440
|
//单塔仿真加载
|
|
@@ -45594,17 +45572,17 @@ class MD {
|
|
|
45594
45572
|
}
|
|
45595
45573
|
}
|
|
45596
45574
|
export {
|
|
45597
|
-
|
|
45598
|
-
|
|
45575
|
+
LD as GUAPoint,
|
|
45576
|
+
RD as InsulatorInfo,
|
|
45599
45577
|
Ht as InsulatorType,
|
|
45600
45578
|
pa as LineNum,
|
|
45601
45579
|
OD as LineType,
|
|
45602
|
-
|
|
45603
|
-
|
|
45580
|
+
FD as OWEEgineFZManager,
|
|
45581
|
+
zD as OWEEgineManager,
|
|
45604
45582
|
en as PhaseSType,
|
|
45605
|
-
|
|
45606
|
-
|
|
45607
|
-
|
|
45583
|
+
ND as TowerFZInfo,
|
|
45584
|
+
BD as TowerInfo,
|
|
45585
|
+
PD as TowerLineInfo,
|
|
45608
45586
|
ss as TowerType,
|
|
45609
45587
|
$ as WairnumType,
|
|
45610
45588
|
vs as drawModel
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(ot,zt){typeof exports=="object"&&typeof module<"u"?zt(exports):typeof define=="function"&&define.amd?define(["exports"],zt):(ot=typeof globalThis<"u"?globalThis:ot||self,zt(ot.OW_EEngine_Power={}))})(this,function(ot){"use strict";var
|
|
1
|
+
(function(ot,zt){typeof exports=="object"&&typeof module<"u"?zt(exports):typeof define=="function"&&define.amd?define(["exports"],zt):(ot=typeof globalThis<"u"?globalThis:ot||self,zt(ot.OW_EEngine_Power={}))})(this,function(ot){"use strict";var Hx=Object.defineProperty;var jx=(ot,zt,l)=>zt in ot?Hx(ot,zt,{enumerable:!0,configurable:!0,writable:!0,value:l}):ot[zt]=l;var se=(ot,zt,l)=>jx(ot,typeof zt!="symbol"?zt+"":zt,l);var zt=typeof document<"u"?document.currentScript:null;function l(e){return e!=null}function C(e){this.name="DeveloperError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(C.prototype=Object.create(Error.prototype),C.prototype.constructor=C),C.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=`
|
|
2
2
|
${this.stack.toString()}`),e},C.throwInstantiationError=function(){throw new C("This function defines an interface and should not be called directly.")};const _={};_.typeOf={};function U0(e){return`${e} is required, actual value was undefined`}function Co(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}_.defined=function(e,t){if(!l(t))throw new C(U0(e))},_.typeOf.func=function(e,t){if(typeof t!="function")throw new C(Co(typeof t,"function",e))},_.typeOf.string=function(e,t){if(typeof t!="string")throw new C(Co(typeof t,"string",e))},_.typeOf.number=function(e,t){if(typeof t!="number")throw new C(Co(typeof t,"number",e))},_.typeOf.number.lessThan=function(e,t,n){if(_.typeOf.number(e,t),t>=n)throw new C(`Expected ${e} to be less than ${n}, actual value was ${t}`)},_.typeOf.number.lessThanOrEquals=function(e,t,n){if(_.typeOf.number(e,t),t>n)throw new C(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)},_.typeOf.number.greaterThan=function(e,t,n){if(_.typeOf.number(e,t),t<=n)throw new C(`Expected ${e} to be greater than ${n}, actual value was ${t}`)},_.typeOf.number.greaterThanOrEquals=function(e,t,n){if(_.typeOf.number(e,t),t<n)throw new C(`Expected ${e} to be greater than or equal to ${n}, actual value was ${t}`)},_.typeOf.object=function(e,t){if(typeof t!="object")throw new C(Co(typeof t,"object",e))},_.typeOf.bool=function(e,t){if(typeof t!="boolean")throw new C(Co(typeof t,"boolean",e))},_.typeOf.bigint=function(e,t){if(typeof t!="bigint")throw new C(Co(typeof t,"bigint",e))},_.typeOf.number.equals=function(e,t,n,i){if(_.typeOf.number(e,n),_.typeOf.number(t,i),n!==i)throw new C(`${e} must be equal to ${t}, the actual values are ${n} and ${i}`)};function g(e,t){return e??t}g.EMPTY_OBJECT=Object.freeze({});var wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var di=function(e){e==null&&(e=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,e.constructor==Array?this.init_by_array(e,e.length):this.init_seed(e)};di.prototype.init_seed=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++){var e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((e&4294901760)>>>16)*1812433253<<16)+(e&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}},di.prototype.init_by_array=function(e,t){var n,i,o;for(this.init_seed(19650218),n=1,i=0,o=this.N>t?this.N:t;o;o--){var a=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((a&4294901760)>>>16)*1664525<<16)+(a&65535)*1664525)+e[i]+i,this.mt[n]>>>=0,n++,i++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1),i>=t&&(i=0)}for(o=this.N-1;o;o--){var a=this.mt[n-1]^this.mt[n-1]>>>30;this.mt[n]=(this.mt[n]^(((a&4294901760)>>>16)*1566083941<<16)+(a&65535)*1566083941)-n,this.mt[n]>>>=0,n++,n>=this.N&&(this.mt[0]=this.mt[this.N-1],n=1)}this.mt[0]=2147483648},di.prototype.random_int=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var n;for(this.mti==this.N+1&&this.init_seed(5489),n=0;n<this.N-this.M;n++)e=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+this.M]^e>>>1^t[e&1];for(;n<this.N-1;n++)e=this.mt[n]&this.UPPER_MASK|this.mt[n+1]&this.LOWER_MASK,this.mt[n]=this.mt[n+(this.M-this.N)]^e>>>1^t[e&1];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[e&1],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^=e>>>18,e>>>0},di.prototype.random_int31=function(){return this.random_int()>>>1},di.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},di.prototype.random=function(){return this.random_int()*(1/4294967296)},di.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},di.prototype.random_long=function(){var e=this.random_int()>>>5,t=this.random_int()>>>6;return(e*67108864+t)*(1/9007199254740992)};var k0=di;const wf=lr(k0),S={};S.EPSILON1=.1,S.EPSILON2=.01,S.EPSILON3=.001,S.EPSILON4=1e-4,S.EPSILON5=1e-5,S.EPSILON6=1e-6,S.EPSILON7=1e-7,S.EPSILON8=1e-8,S.EPSILON9=1e-9,S.EPSILON10=1e-10,S.EPSILON11=1e-11,S.EPSILON12=1e-12,S.EPSILON13=1e-13,S.EPSILON14=1e-14,S.EPSILON15=1e-15,S.EPSILON16=1e-16,S.EPSILON17=1e-17,S.EPSILON18=1e-18,S.EPSILON19=1e-19,S.EPSILON20=1e-20,S.EPSILON21=1e-21,S.GRAVITATIONALPARAMETER=3986004418e5,S.SOLAR_RADIUS=6955e5,S.LUNAR_RADIUS=1737400,S.SIXTY_FOUR_KILOBYTES=64*1024,S.FOUR_GIGABYTES=4*1024*1024*1024,S.sign=g(Math.sign,function(t){return t=+t,t===0||t!==t?t:t>0?1:-1}),S.signNotZero=function(e){return e<0?-1:1},S.toSNorm=function(e,t){return t=g(t,255),Math.round((S.clamp(e,-1,1)*.5+.5)*t)},S.fromSNorm=function(e,t){return t=g(t,255),S.clamp(e,0,t)/t*2-1},S.normalize=function(e,t,n){return n=Math.max(n-t,0),n===0?0:S.clamp((e-t)/n,0,1)},S.sinh=g(Math.sinh,function(t){return(Math.exp(t)-Math.exp(-t))/2}),S.cosh=g(Math.cosh,function(t){return(Math.exp(t)+Math.exp(-t))/2}),S.lerp=function(e,t,n){return(1-n)*e+n*t},S.PI=Math.PI,S.ONE_OVER_PI=1/Math.PI,S.PI_OVER_TWO=Math.PI/2,S.PI_OVER_THREE=Math.PI/3,S.PI_OVER_FOUR=Math.PI/4,S.PI_OVER_SIX=Math.PI/6,S.THREE_PI_OVER_TWO=3*Math.PI/2,S.TWO_PI=2*Math.PI,S.ONE_OVER_TWO_PI=1/(2*Math.PI),S.RADIANS_PER_DEGREE=Math.PI/180,S.DEGREES_PER_RADIAN=180/Math.PI,S.RADIANS_PER_ARCSECOND=S.RADIANS_PER_DEGREE/3600,S.toRadians=function(e){if(!l(e))throw new C("degrees is required.");return e*S.RADIANS_PER_DEGREE},S.toDegrees=function(e){if(!l(e))throw new C("radians is required.");return e*S.DEGREES_PER_RADIAN},S.convertLongitudeRange=function(e){if(!l(e))throw new C("angle is required.");const t=S.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n},S.clampToLatitudeRange=function(e){if(!l(e))throw new C("angle is required.");return S.clamp(e,-1*S.PI_OVER_TWO,S.PI_OVER_TWO)},S.negativePiToPi=function(e){if(!l(e))throw new C("angle is required.");return e>=-S.PI&&e<=S.PI?e:S.zeroToTwoPi(e+S.PI)-S.PI},S.zeroToTwoPi=function(e){if(!l(e))throw new C("angle is required.");if(e>=0&&e<=S.TWO_PI)return e;const t=S.mod(e,S.TWO_PI);return Math.abs(t)<S.EPSILON14&&Math.abs(e)>S.EPSILON14?S.TWO_PI:t},S.mod=function(e,t){if(!l(e))throw new C("m is required.");if(!l(t))throw new C("n is required.");if(t===0)throw new C("divisor cannot be 0.");return S.sign(e)===S.sign(t)&&Math.abs(e)<Math.abs(t)?e:(e%t+t)%t},S.equalsEpsilon=function(e,t,n,i){if(!l(e))throw new C("left is required.");if(!l(t))throw new C("right is required.");n=g(n,0),i=g(i,n);const o=Math.abs(e-t);return o<=i||o<=n*Math.max(Math.abs(e),Math.abs(t))},S.lessThan=function(e,t,n){if(!l(e))throw new C("first is required.");if(!l(t))throw new C("second is required.");if(!l(n))throw new C("absoluteEpsilon is required.");return e-t<-n},S.lessThanOrEquals=function(e,t,n){if(!l(e))throw new C("first is required.");if(!l(t))throw new C("second is required.");if(!l(n))throw new C("absoluteEpsilon is required.");return e-t<n},S.greaterThan=function(e,t,n){if(!l(e))throw new C("first is required.");if(!l(t))throw new C("second is required.");if(!l(n))throw new C("absoluteEpsilon is required.");return e-t>n},S.greaterThanOrEquals=function(e,t,n){if(!l(e))throw new C("first is required.");if(!l(t))throw new C("second is required.");if(!l(n))throw new C("absoluteEpsilon is required.");return e-t>-n};const ur=[1];S.factorial=function(e){if(typeof e!="number"||e<0)throw new C("A number greater than or equal to 0 is required.");const t=ur.length;if(e>=t){let n=ur[t-1];for(let i=t;i<=e;i++){const o=n*i;ur.push(o),n=o}}return ur[e]},S.incrementWrap=function(e,t,n){if(n=g(n,0),!l(e))throw new C("n is required.");if(t<=n)throw new C("maximumValue must be greater than minimumValue.");return++e,e>t&&(e=n),e},S.isPowerOfTwo=function(e){if(typeof e!="number"||e<0||e>4294967295)throw new C("A number between 0 and (2^32)-1 is required.");return e!==0&&(e&e-1)===0},S.nextPowerOfTwo=function(e){if(typeof e!="number"||e<0||e>2147483648)throw new C("A number between 0 and 2^31 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e},S.previousPowerOfTwo=function(e){if(typeof e!="number"||e<0||e>4294967295)throw new C("A number between 0 and (2^32)-1 is required.");return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e|=e>>32,e=(e>>>0)-(e>>>1),e},S.clamp=function(e,t,n){return _.typeOf.number("value",e),_.typeOf.number("min",t),_.typeOf.number("max",n),e<t?t:e>n?n:e};let Af=new wf;S.setRandomNumberSeed=function(e){if(!l(e))throw new C("seed is required.");Af=new wf(e)},S.nextRandomNumber=function(){return Af.random()},S.randomBetween=function(e,t){return S.nextRandomNumber()*(t-e)+e},S.acosClamped=function(e){if(!l(e))throw new C("value is required.");return Math.acos(S.clamp(e,-1,1))},S.asinClamped=function(e){if(!l(e))throw new C("value is required.");return Math.asin(S.clamp(e,-1,1))},S.chordLength=function(e,t){if(!l(e))throw new C("angle is required.");if(!l(t))throw new C("radius is required.");return 2*t*Math.sin(e*.5)},S.logBase=function(e,t){if(!l(e))throw new C("number is required.");if(!l(t))throw new C("base is required.");return Math.log(e)/Math.log(t)},S.cbrt=g(Math.cbrt,function(t){const n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n}),S.log2=g(Math.log2,function(t){return Math.log(t)*Math.LOG2E}),S.fog=function(e,t){const n=e*t;return 1-Math.exp(-(n*n))},S.fastApproximateAtan=function(e){return _.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},S.fastApproximateAtan2=function(e,t){_.typeOf.number("x",e),_.typeOf.number("y",t);let n,i=Math.abs(e);n=Math.abs(t);const o=Math.max(i,n);n=Math.min(i,n);const a=n/o;if(isNaN(a))throw new C("either x or y must be nonzero");return i=S.fastApproximateAtan(a),i=Math.abs(t)>Math.abs(e)?S.PI_OVER_TWO-i:i,i=e<0?S.PI-i:i,i=t<0?-i:i,i};function u(e,t,n){this.x=g(e,0),this.y=g(t,0),this.z=g(n,0)}u.fromSpherical=function(e,t){_.typeOf.object("spherical",e),l(t)||(t=new u);const n=e.clock,i=e.cone,o=g(e.magnitude,1),a=o*Math.sin(i);return t.x=a*Math.cos(n),t.y=a*Math.sin(n),t.z=o*Math.cos(i),t},u.fromElements=function(e,t,n,i){return l(i)?(i.x=e,i.y=t,i.z=n,i):new u(e,t,n)},u.clone=function(e,t){if(l(e))return l(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new u(e.x,e.y,e.z)},u.fromCartesian4=u.clone,u.packedLength=3,u.pack=function(e,t,n){return _.typeOf.object("value",e),_.defined("array",t),n=g(n,0),t[n++]=e.x,t[n++]=e.y,t[n]=e.z,t},u.unpack=function(e,t,n){return _.defined("array",e),t=g(t,0),l(n)||(n=new u),n.x=e[t++],n.y=e[t++],n.z=e[t],n},u.packArray=function(e,t){_.defined("array",e);const n=e.length,i=n*3;if(!l(t))t=new Array(i);else{if(!Array.isArray(t)&&t.length!==i)throw new C("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==i&&(t.length=i)}for(let o=0;o<n;++o)u.pack(e[o],t,o*3);return t},u.unpackArray=function(e,t){if(_.defined("array",e),_.typeOf.number.greaterThanOrEquals("array.length",e.length,3),e.length%3!==0)throw new C("array length must be a multiple of 3.");const n=e.length;l(t)?t.length=n/3:t=new Array(n/3);for(let i=0;i<n;i+=3){const o=i/3;t[o]=u.unpack(e,i,t[o])}return t},u.fromArray=u.unpack,u.maximumComponent=function(e){return _.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z)},u.minimumComponent=function(e){return _.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z)},u.minimumByComponent=function(e,t,n){return _.typeOf.object("first",e),_.typeOf.object("second",t),_.typeOf.object("result",n),n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n},u.maximumByComponent=function(e,t,n){return _.typeOf.object("first",e),_.typeOf.object("second",t),_.typeOf.object("result",n),n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n},u.clamp=function(e,t,n,i){_.typeOf.object("value",e),_.typeOf.object("min",t),_.typeOf.object("max",n),_.typeOf.object("result",i);const o=S.clamp(e.x,t.x,n.x),a=S.clamp(e.y,t.y,n.y),r=S.clamp(e.z,t.z,n.z);return i.x=o,i.y=a,i.z=r,i},u.magnitudeSquared=function(e){return _.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z},u.magnitude=function(e){return Math.sqrt(u.magnitudeSquared(e))};const dr=new u;u.distance=function(e,t){return _.typeOf.object("left",e),_.typeOf.object("right",t),u.subtract(e,t,dr),u.magnitude(dr)},u.distanceSquared=function(e,t){return _.typeOf.object("left",e),_.typeOf.object("right",t),u.subtract(e,t,dr),u.magnitudeSquared(dr)},u.normalize=function(e,t){_.typeOf.object("cartesian",e),_.typeOf.object("result",t);const n=u.magnitude(e);if(t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new C("normalized result is not a number");return t},u.dot=function(e,t){return _.typeOf.object("left",e),_.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z},u.multiplyComponents=function(e,t,n){return _.typeOf.object("left",e),_.typeOf.object("right",t),_.typeOf.object("result",n),n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n},u.divideComponents=function(e,t,n){return _.typeOf.object("left",e),_.typeOf.object("right",t),_.typeOf.object("result",n),n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n},u.add=function(e,t,n){return _.typeOf.object("left",e),_.typeOf.object("right",t),_.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n},u.subtract=function(e,t,n){return _.typeOf.object("left",e),_.typeOf.object("right",t),_.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n},u.multiplyByScalar=function(e,t,n){return _.typeOf.object("cartesian",e),_.typeOf.number("scalar",t),_.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n},u.divideByScalar=function(e,t,n){return _.typeOf.object("cartesian",e),_.typeOf.number("scalar",t),_.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n},u.negate=function(e,t){return _.typeOf.object("cartesian",e),_.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t},u.abs=function(e,t){return _.typeOf.object("cartesian",e),_.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};const Ef=new u;u.lerp=function(e,t,n,i){return _.typeOf.object("start",e),_.typeOf.object("end",t),_.typeOf.number("t",n),_.typeOf.object("result",i),u.multiplyByScalar(t,n,Ef),i=u.multiplyByScalar(e,1-n,i),u.add(Ef,i,i)};const pr=new u,Ma=new u;u.angleBetween=function(e,t){_.typeOf.object("left",e),_.typeOf.object("right",t),u.normalize(e,pr),u.normalize(t,Ma);const n=u.dot(pr,Ma),i=u.magnitude(u.cross(pr,Ma,pr));return Math.atan2(i,n)};const V0=new u;u.mostOrthogonalAxis=function(e,t){_.typeOf.object("cartesian",e),_.typeOf.object("result",t);const n=u.normalize(e,V0);return u.abs(n,n),n.x<=n.y?n.x<=n.z?t=u.clone(u.UNIT_X,t):t=u.clone(u.UNIT_Z,t):n.y<=n.z?t=u.clone(u.UNIT_Y,t):t=u.clone(u.UNIT_Z,t),t},u.projectVector=function(e,t,n){_.defined("a",e),_.defined("b",t),_.defined("result",n);const i=u.dot(e,t)/u.dot(t,t);return u.multiplyByScalar(t,i,n)},u.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},u.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]},u.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&S.equalsEpsilon(e.x,t.x,n,i)&&S.equalsEpsilon(e.y,t.y,n,i)&&S.equalsEpsilon(e.z,t.z,n,i)},u.cross=function(e,t,n){_.typeOf.object("left",e),_.typeOf.object("right",t),_.typeOf.object("result",n);const i=e.x,o=e.y,a=e.z,r=t.x,f=t.y,c=t.z,h=o*c-a*f,d=a*r-i*c,p=i*f-o*r;return n.x=h,n.y=d,n.z=p,n},u.midpoint=function(e,t,n){return _.typeOf.object("left",e),_.typeOf.object("right",t),_.typeOf.object("result",n),n.x=(e.x+t.x)*.5,n.y=(e.y+t.y)*.5,n.z=(e.z+t.z)*.5,n},u.fromDegrees=function(e,t,n,i,o){return _.typeOf.number("longitude",e),_.typeOf.number("latitude",t),e=S.toRadians(e),t=S.toRadians(t),u.fromRadians(e,t,n,i,o)};let En=new u,Ao=new u;u._ellipsoidRadiiSquared=new u(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9),u.fromRadians=function(e,t,n,i,o){_.typeOf.number("longitude",e),_.typeOf.number("latitude",t),n=g(n,0);const a=l(i)?i.radiiSquared:u._ellipsoidRadiiSquared,r=Math.cos(t);En.x=r*Math.cos(e),En.y=r*Math.sin(e),En.z=Math.sin(t),En=u.normalize(En,En),u.multiplyComponents(a,En,Ao);const f=Math.sqrt(u.dot(En,Ao));return Ao=u.divideByScalar(Ao,f,Ao),En=u.multiplyByScalar(En,n,En),l(o)||(o=new u),u.add(Ao,En,o)},u.fromDegreesArray=function(e,t,n){if(_.defined("coordinates",e),e.length<2||e.length%2!==0)throw new C("the number of coordinates must be a multiple of 2 and at least 2");const i=e.length;l(n)?n.length=i/2:n=new Array(i/2);for(let o=0;o<i;o+=2){const a=e[o],r=e[o+1],f=o/2;n[f]=u.fromDegrees(a,r,0,t,n[f])}return n},u.fromRadiansArray=function(e,t,n){if(_.defined("coordinates",e),e.length<2||e.length%2!==0)throw new C("the number of coordinates must be a multiple of 2 and at least 2");const i=e.length;l(n)?n.length=i/2:n=new Array(i/2);for(let o=0;o<i;o+=2){const a=e[o],r=e[o+1],f=o/2;n[f]=u.fromRadians(a,r,0,t,n[f])}return n},u.fromDegreesArrayHeights=function(e,t,n){if(_.defined("coordinates",e),e.length<3||e.length%3!==0)throw new C("the number of coordinates must be a multiple of 3 and at least 3");const i=e.length;l(n)?n.length=i/3:n=new Array(i/3);for(let o=0;o<i;o+=3){const a=e[o],r=e[o+1],f=e[o+2],c=o/3;n[c]=u.fromDegrees(a,r,f,t,n[c])}return n},u.fromRadiansArrayHeights=function(e,t,n){if(_.defined("coordinates",e),e.length<3||e.length%3!==0)throw new C("the number of coordinates must be a multiple of 3 and at least 3");const i=e.length;l(n)?n.length=i/3:n=new Array(i/3);for(let o=0;o<i;o+=3){const a=e[o],r=e[o+1],f=e[o+2],c=o/3;n[c]=u.fromRadians(a,r,f,t,n[c])}return n},u.ZERO=Object.freeze(new u(0,0,0)),u.ONE=Object.freeze(new u(1,1,1)),u.UNIT_X=Object.freeze(new u(1,0,0)),u.UNIT_Y=Object.freeze(new u(0,1,0)),u.UNIT_Z=Object.freeze(new u(0,0,1)),u.prototype.clone=function(e){return u.clone(this,e)},u.prototype.equals=function(e){return u.equals(this,e)},u.prototype.equalsEpsilon=function(e,t,n){return u.equalsEpsilon(this,e,t,n)},u.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};function Z(e,t,n,i){this.x=g(e,0),this.y=g(t,0),this.z=g(n,0),this.w=g(i,0)}Z.fromElements=function(e,t,n,i,o){return l(o)?(o.x=e,o.y=t,o.z=n,o.w=i,o):new Z(e,t,n,i)},Z.fromColor=function(e,t){return _.typeOf.object("color",e),l(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new Z(e.red,e.green,e.blue,e.alpha)},Z.clone=function(e,t){if(l(e))return l(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new Z(e.x,e.y,e.z,e.w)},Z.packedLength=4,Z.pack=function(e,t,n){return _.typeOf.object("value",e),_.defined("array",t),n=g(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t},Z.unpack=function(e,t,n){return _.defined("array",e),t=g(t,0),l(n)||(n=new Z),n.x=e[t++],n.y=e[t++],n.z=e[t++],n.w=e[t],n},Z.packArray=function(e,t){_.defined("array",e);const n=e.length,i=n*4;if(!l(t))t=new Array(i);else{if(!Array.isArray(t)&&t.length!==i)throw new C("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==i&&(t.length=i)}for(let o=0;o<n;++o)Z.pack(e[o],t,o*4);return t},Z.unpackArray=function(e,t){if(_.defined("array",e),_.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!==0)throw new C("array length must be a multiple of 4.");const n=e.length;l(t)?t.length=n/4:t=new Array(n/4);for(let i=0;i<n;i+=4){const o=i/4;t[o]=Z.unpack(e,i,t[o])}return t},Z.fromArray=Z.unpack,Z.maximumComponent=function(e){return _.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z,e.w)},Z.minimumComponent=function(e){return _.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z,e.w)},Z.minimumByComponent=function(e,t,n){return _.typeOf.object("first",e),_.typeOf.object("second",t),_.typeOf.object("result",n),n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n.w=Math.min(e.w,t.w),n},Z.maximumByComponent=function(e,t,n){return _.typeOf.object("first",e),_.typeOf.object("second",t),_.typeOf.object("result",n),n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n.w=Math.max(e.w,t.w),n},Z.clamp=function(e,t,n,i){_.typeOf.object("value",e),_.typeOf.object("min",t),_.typeOf.object("max",n),_.typeOf.object("result",i);const o=S.clamp(e.x,t.x,n.x),a=S.clamp(e.y,t.y,n.y),r=S.clamp(e.z,t.z,n.z),f=S.clamp(e.w,t.w,n.w);return i.x=o,i.y=a,i.z=r,i.w=f,i},Z.magnitudeSquared=function(e){return _.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w},Z.magnitude=function(e){return Math.sqrt(Z.magnitudeSquared(e))};const mr=new Z;Z.distance=function(e,t){return _.typeOf.object("left",e),_.typeOf.object("right",t),Z.subtract(e,t,mr),Z.magnitude(mr)},Z.distanceSquared=function(e,t){return _.typeOf.object("left",e),_.typeOf.object("right",t),Z.subtract(e,t,mr),Z.magnitudeSquared(mr)},Z.normalize=function(e,t){_.typeOf.object("cartesian",e),_.typeOf.object("result",t);const n=Z.magnitude(e);if(t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t.w=e.w/n,isNaN(t.x)||isNaN(t.y)||isNaN(t.z)||isNaN(t.w))throw new C("normalized result is not a number");return t},Z.dot=function(e,t){return _.typeOf.object("left",e),_.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w},Z.multiplyComponents=function(e,t,n){return _.typeOf.object("left",e),_.typeOf.object("right",t),_.typeOf.object("result",n),n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n.w=e.w*t.w,n},Z.divideComponents=function(e,t,n){return _.typeOf.object("left",e),_.typeOf.object("right",t),_.typeOf.object("result",n),n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n.w=e.w/t.w,n},Z.add=function(e,t,n){return _.typeOf.object("left",e),_.typeOf.object("right",t),_.typeOf.object("result",n),n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n.w=e.w+t.w,n},Z.subtract=function(e,t,n){return _.typeOf.object("left",e),_.typeOf.object("right",t),_.typeOf.object("result",n),n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n.w=e.w-t.w,n},Z.multiplyByScalar=function(e,t,n){return _.typeOf.object("cartesian",e),_.typeOf.number("scalar",t),_.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n},Z.divideByScalar=function(e,t,n){return _.typeOf.object("cartesian",e),_.typeOf.number("scalar",t),_.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n},Z.negate=function(e,t){return _.typeOf.object("cartesian",e),_.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t},Z.abs=function(e,t){return _.typeOf.object("cartesian",e),_.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};const bf=new Z;Z.lerp=function(e,t,n,i){return _.typeOf.object("start",e),_.typeOf.object("end",t),_.typeOf.number("t",n),_.typeOf.object("result",i),Z.multiplyByScalar(t,n,bf),i=Z.multiplyByScalar(e,1-n,i),Z.add(bf,i,i)};const G0=new Z;Z.mostOrthogonalAxis=function(e,t){_.typeOf.object("cartesian",e),_.typeOf.object("result",t);const n=Z.normalize(e,G0);return Z.abs(n,n),n.x<=n.y?n.x<=n.z?n.x<=n.w?t=Z.clone(Z.UNIT_X,t):t=Z.clone(Z.UNIT_W,t):n.z<=n.w?t=Z.clone(Z.UNIT_Z,t):t=Z.clone(Z.UNIT_W,t):n.y<=n.z?n.y<=n.w?t=Z.clone(Z.UNIT_Y,t):t=Z.clone(Z.UNIT_W,t):n.z<=n.w?t=Z.clone(Z.UNIT_Z,t):t=Z.clone(Z.UNIT_W,t),t},Z.equals=function(e,t){return e===t||l(e)&&l(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},Z.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]&&e.w===t[n+3]},Z.equalsEpsilon=function(e,t,n,i){return e===t||l(e)&&l(t)&&S.equalsEpsilon(e.x,t.x,n,i)&&S.equalsEpsilon(e.y,t.y,n,i)&&S.equalsEpsilon(e.z,t.z,n,i)&&S.equalsEpsilon(e.w,t.w,n,i)},Z.ZERO=Object.freeze(new Z(0,0,0,0)),Z.ONE=Object.freeze(new Z(1,1,1,1)),Z.UNIT_X=Object.freeze(new Z(1,0,0,0)),Z.UNIT_Y=Object.freeze(new Z(0,1,0,0)),Z.UNIT_Z=Object.freeze(new Z(0,0,1,0)),Z.UNIT_W=Object.freeze(new Z(0,0,0,1)),Z.prototype.clone=function(e){return Z.clone(this,e)},Z.prototype.equals=function(e){return Z.equals(this,e)},Z.prototype.equalsEpsilon=function(e,t,n){return Z.equalsEpsilon(this,e,t,n)},Z.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const Ua=new Float32Array(1),jt=new Uint8Array(Ua.buffer),q0=new Uint32Array([287454020]),xf=new Uint8Array(q0.buffer)[0]===68;Z.packFloat=function(e,t){return _.typeOf.number("value",e),l(t)||(t=new Z),Ua[0]=e,xf?(t.x=jt[0],t.y=jt[1],t.z=jt[2],t.w=jt[3]):(t.x=jt[3],t.y=jt[2],t.z=jt[1],t.w=jt[0]),t},Z.unpackFloat=function(e){return _.typeOf.object("packedFloat",e),xf?(jt[0]=e.x,jt[1]=e.y,jt[2]=e.z,jt[3]=e.w):(jt[0]=e.w,jt[1]=e.z,jt[2]=e.y,jt[3]=e.x),Ua[0]};function G(e,t,n,i,o,a,r,f,c){this[0]=g(e,0),this[1]=g(i,0),this[2]=g(r,0),this[3]=g(t,0),this[4]=g(o,0),this[5]=g(f,0),this[6]=g(n,0),this[7]=g(a,0),this[8]=g(c,0)}G.packedLength=9,G.pack=function(e,t,n){return _.typeOf.object("value",e),_.defined("array",t),n=g(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t},G.unpack=function(e,t,n){return _.defined("array",e),t=g(t,0),l(n)||(n=new G),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n},G.packArray=function(e,t){_.defined("array",e);const n=e.length,i=n*9;if(!l(t))t=new Array(i);else{if(!Array.isArray(t)&&t.length!==i)throw new C("If result is a typed array, it must have exactly array.length * 9 elements");t.length!==i&&(t.length=i)}for(let o=0;o<n;++o)G.pack(e[o],t,o*9);return t},G.unpackArray=function(e,t){if(_.defined("array",e),_.typeOf.number.greaterThanOrEquals("array.length",e.length,9),e.length%9!==0)throw new C("array length must be a multiple of 9.");const n=e.length;l(t)?t.length=n/9:t=new Array(n/9);for(let i=0;i<n;i+=9){const o=i/9;t[o]=G.unpack(e,i,t[o])}return t},G.clone=function(e,t){if(l(e))return l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):new G(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},G.fromArray=G.unpack,G.fromColumnMajorArray=function(e,t){return _.defined("values",e),G.clone(e,t)},G.fromRowMajorArray=function(e,t){return _.defined("values",e),l(t)?(t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t):new G(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},G.fromQuaternion=function(e,t){_.typeOf.object("quaternion",e);const n=e.x*e.x,i=e.x*e.y,o=e.x*e.z,a=e.x*e.w,r=e.y*e.y,f=e.y*e.z,c=e.y*e.w,h=e.z*e.z,d=e.z*e.w,p=e.w*e.w,m=n-r-h+p,T=2*(i-d),y=2*(o+c),w=2*(i+d),A=-n+r-h+p,E=2*(f-a),b=2*(o-c),D=2*(f+a),O=-n-r+h+p;return l(t)?(t[0]=m,t[1]=w,t[2]=b,t[3]=T,t[4]=A,t[5]=D,t[6]=y,t[7]=E,t[8]=O,t):new G(m,T,y,w,A,E,b,D,O)},G.fromHeadingPitchRoll=function(e,t){_.typeOf.object("headingPitchRoll",e);const n=Math.cos(-e.pitch),i=Math.cos(-e.heading),o=Math.cos(e.roll),a=Math.sin(-e.pitch),r=Math.sin(-e.heading),f=Math.sin(e.roll),c=n*i,h=-o*r+f*a*i,d=f*r+o*a*i,p=n*r,m=o*i+f*a*r,T=-f*i+o*a*r,y=-a,w=f*n,A=o*n;return l(t)?(t[0]=c,t[1]=p,t[2]=y,t[3]=h,t[4]=m,t[5]=w,t[6]=d,t[7]=T,t[8]=A,t):new G(c,h,d,p,m,T,y,w,A)},G.fromScale=function(e,t){return _.typeOf.object("scale",e),l(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=e.y,t[5]=0,t[6]=0,t[7]=0,t[8]=e.z,t):new G(e.x,0,0,0,e.y,0,0,0,e.z)},G.fromUniformScale=function(e,t){return _.typeOf.number("scale",e),l(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=e,t):new G(e,0,0,0,e,0,0,0,e)},G.fromCrossProduct=function(e,t){return _.typeOf.object("vector",e),l(t)?(t[0]=0,t[1]=e.z,t[2]=-e.y,t[3]=-e.z,t[4]=0,t[5]=e.x,t[6]=e.y,t[7]=-e.x,t[8]=0,t):new G(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},G.fromRotationX=function(e,t){_.typeOf.number("angle",e);const n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=n,t[5]=i,t[6]=0,t[7]=-i,t[8]=n,t):new G(1,0,0,0,n,-i,0,i,n)},G.fromRotationY=function(e,t){_.typeOf.number("angle",e);const n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=n,t[1]=0,t[2]=-i,t[3]=0,t[4]=1,t[5]=0,t[6]=i,t[7]=0,t[8]=n,t):new G(n,0,i,0,1,0,-i,0,n)},G.fromRotationZ=function(e,t){_.typeOf.number("angle",e);const n=Math.cos(e),i=Math.sin(e);return l(t)?(t[0]=n,t[1]=i,t[2]=0,t[3]=-i,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new G(n,-i,0,i,n,0,0,0,1)},G.toArray=function(e,t){return _.typeOf.object("matrix",e),l(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},G.getElementIndex=function(e,t){return _.typeOf.number.greaterThanOrEquals("row",t,0),_.typeOf.number.lessThanOrEquals("row",t,2),_.typeOf.number.greaterThanOrEquals("column",e,0),_.typeOf.number.lessThanOrEquals("column",e,2),e*3+t},G.getColumn=function(e,t,n){_.typeOf.object("matrix",e),_.typeOf.number.greaterThanOrEquals("index",t,0),_.typeOf.number.lessThanOrEquals("index",t,2),_.typeOf.object("result",n);const i=t*3,o=e[i],a=e[i+1],r=e[i+2];return n.x=o,n.y=a,n.z=r,n},G.setColumn=function(e,t,n,i){_.typeOf.object("matrix",e),_.typeOf.number.greaterThanOrEquals("index",t,0),_.typeOf.number.lessThanOrEquals("index",t,2),_.typeOf.object("cartesian",n),_.typeOf.object("result",i),i=G.clone(e,i);const o=t*3;return i[o]=n.x,i[o+1]=n.y,i[o+2]=n.z,i},G.getRow=function(e,t,n){_.typeOf.object("matrix",e),_.typeOf.number.greaterThanOrEquals("index",t,0),_.typeOf.number.lessThanOrEquals("index",t,2),_.typeOf.object("result",n);const i=e[t],o=e[t+3],a=e[t+6];return n.x=i,n.y=o,n.z=a,n},G.setRow=function(e,t,n,i){return _.typeOf.object("matrix",e),_.typeOf.number.greaterThanOrEquals("index",t,0),_.typeOf.number.lessThanOrEquals("index",t,2),_.typeOf.object("cartesian",n),_.typeOf.object("result",i),i=G.clone(e,i),i[t]=n.x,i[t+3]=n.y,i[t+6]=n.z,i};const H0=new u;G.setScale=function(e,t,n){_.typeOf.object("matrix",e),_.typeOf.object("scale",t),_.typeOf.object("result",n);const i=G.getScale(e,H0),o=t.x/i.x,a=t.y/i.y,r=t.z/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3]*a,n[4]=e[4]*a,n[5]=e[5]*a,n[6]=e[6]*r,n[7]=e[7]*r,n[8]=e[8]*r,n};const j0=new u;G.setUniformScale=function(e,t,n){_.typeOf.object("matrix",e),_.typeOf.number("scale",t),_.typeOf.object("result",n);const i=G.getScale(e,j0),o=t/i.x,a=t/i.y,r=t/i.z;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=e[3]*a,n[4]=e[4]*a,n[5]=e[5]*a,n[6]=e[6]*r,n[7]=e[7]*r,n[8]=e[8]*r,n};const ka=new u;G.getScale=function(e,t){return _.typeOf.object("matrix",e),_.typeOf.object("result",t),t.x=u.magnitude(u.fromElements(e[0],e[1],e[2],ka)),t.y=u.magnitude(u.fromElements(e[3],e[4],e[5],ka)),t.z=u.magnitude(u.fromElements(e[6],e[7],e[8],ka)),t};const Sf=new u;G.getMaximumScale=function(e){return G.getScale(e,Sf),u.maximumComponent(Sf)};const Y0=new u;G.setRotation=function(e,t,n){_.typeOf.object("matrix",e),_.typeOf.object("result",n);const i=G.getScale(e,Y0);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.x,n[3]=t[3]*i.y,n[4]=t[4]*i.y,n[5]=t[5]*i.y,n[6]=t[6]*i.z,n[7]=t[7]*i.z,n[8]=t[8]*i.z,n};const X0=new u;G.getRotation=function(e,t){_.typeOf.object("matrix",e),_.typeOf.object("result",t);const n=G.getScale(e,X0);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[3]/n.y,t[4]=e[4]/n.y,t[5]=e[5]/n.y,t[6]=e[6]/n.z,t[7]=e[7]/n.z,t[8]=e[8]/n.z,t},G.multiply=function(e,t,n){_.typeOf.object("left",e),_.typeOf.object("right",t),_.typeOf.object("result",n);const i=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],o=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],a=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],r=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],f=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],c=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],h=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],d=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],p=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=i,n[1]=o,n[2]=a,n[3]=r,n[4]=f,n[5]=c,n[6]=h,n[7]=d,n[8]=p,n},G.add=function(e,t,n){return _.typeOf.object("left",e),_.typeOf.object("right",t),_.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n},G.subtract=function(e,t,n){return _.typeOf.object("left",e),_.typeOf.object("right",t),_.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n},G.multiplyByVector=function(e,t,n){_.typeOf.object("matrix",e),_.typeOf.object("cartesian",t),_.typeOf.object("result",n);const i=t.x,o=t.y,a=t.z,r=e[0]*i+e[3]*o+e[6]*a,f=e[1]*i+e[4]*o+e[7]*a,c=e[2]*i+e[5]*o+e[8]*a;return n.x=r,n.y=f,n.z=c,n},G.multiplyByScalar=function(e,t,n){return _.typeOf.object("matrix",e),_.typeOf.number("scalar",t),_.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},G.multiplyByScale=function(e,t,n){return _.typeOf.object("matrix",e),_.typeOf.object("scale",t),_.typeOf.object("result",n),n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.x,n[3]=e[3]*t.y,n[4]=e[4]*t.y,n[5]=e[5]*t.y,n[6]=e[6]*t.z,n[7]=e[7]*t.z,n[8]=e[8]*t.z,n},G.multiplyByUniformScale=function(e,t,n){return _.typeOf.object("matrix",e),_.typeOf.number("scale",t),_.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},G.negate=function(e,t){return _.typeOf.object("matrix",e),_.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},G.transpose=function(e,t){_.typeOf.object("matrix",e),_.typeOf.object("result",t);const n=e[0],i=e[3],o=e[6],a=e[1],r=e[4],f=e[7],c=e[2],h=e[5],d=e[8];return t[0]=n,t[1]=i,t[2]=o,t[3]=a,t[4]=r,t[5]=f,t[6]=c,t[7]=h,t[8]=d,t};function $0(e){let t=0;for(let n=0;n<9;++n){const i=e[n];t+=i*i}return Math.sqrt(t)}const Va=[1,0,0],Ga=[2,2,1];function Z0(e){let t=0;for(let n=0;n<3;++n){const i=e[G.getElementIndex(Ga[n],Va[n])];t+=2*i*i}return Math.sqrt(t)}function K0(e,t){const n=S.EPSILON15;let i=0,o=1;for(let h=0;h<3;++h){const d=Math.abs(e[G.getElementIndex(Ga[h],Va[h])]);d>i&&(o=h,i=d)}let a=1,r=0;const f=Va[o],c=Ga[o];if(Math.abs(e[G.getElementIndex(c,f)])>n){const h=e[G.getElementIndex(c,c)],d=e[G.getElementIndex(f,f)],p=e[G.getElementIndex(c,f)],m=(h-d)/2/p;let T;m<0?T=-1/(-m+Math.sqrt(1+m*m)):T=1/(m+Math.sqrt(1+m*m)),a=1/Math.sqrt(1+T*T),r=T*a}return t=G.clone(G.IDENTITY,t),t[G.getElementIndex(f,f)]=t[G.getElementIndex(c,c)]=a,t[G.getElementIndex(c,f)]=r,t[G.getElementIndex(f,c)]=-r,t}const _r=new G,If=new G;G.computeEigenDecomposition=function(e,t){_.typeOf.object("matrix",e);const n=S.EPSILON20,i=10;let o=0,a=0;l(t)||(t={});const r=t.unitary=G.clone(G.IDENTITY,t.unitary),f=t.diagonal=G.clone(e,t.diagonal),c=n*$0(f);for(;a<i&&Z0(f)>c;)K0(f,_r),G.transpose(_r,If),G.multiply(f,_r,f),G.multiply(If,f,f),G.multiply(r,_r,r),++o>2&&(++a,o=0);return t},G.abs=function(e,t){return _.typeOf.object("matrix",e),_.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},G.determinant=function(e){_.typeOf.object("matrix",e);const t=e[0],n=e[3],i=e[6],o=e[1],a=e[4],r=e[7],f=e[2],c=e[5],h=e[8];return t*(a*h-c*r)+o*(c*i-n*h)+f*(n*r-a*i)},G.inverse=function(e,t){_.typeOf.object("matrix",e),_.typeOf.object("result",t);const n=e[0],i=e[1],o=e[2],a=e[3],r=e[4],f=e[5],c=e[6],h=e[7],d=e[8],p=G.determinant(e);if(Math.abs(p)<=S.EPSILON15)throw new C("matrix is not invertible");t[0]=r*d-h*f,t[1]=h*o-i*d,t[2]=i*f-r*o,t[3]=c*f-a*d,t[4]=n*d-c*o,t[5]=a*o-n*f,t[6]=a*h-c*r,t[7]=c*i-n*h,t[8]=n*r-a*i;const m=1/p;return G.multiplyByScalar(t,m,t)};const Q0=new G;G.inverseTranspose=function(e,t){return _.typeOf.object("matrix",e),_.typeOf.object("result",t),G.inverse(G.transpose(e,Q0),t)},G.equals=function(e,t){return e===t||l(e)&&l(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},G.equalsEpsilon=function(e,t,n){return n=g(n,0),e===t||l(e)&&l(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n},G.IDENTITY=Object.freeze(new G(1,0,0,0,1,0,0,0,1)),G.ZERO=Object.freeze(new G(0,0,0,0,0,0,0,0,0)),G.COLUMN0ROW0=0,G.COLUMN0ROW1=1,G.COLUMN0ROW2=2,G.COLUMN1ROW0=3,G.COLUMN1ROW1=4,G.COLUMN1ROW2=5,G.COLUMN2ROW0=6,G.COLUMN2ROW1=7,G.COLUMN2ROW2=8,Object.defineProperties(G.prototype,{length:{get:function(){return G.packedLength}}}),G.prototype.clone=function(e){return G.clone(this,e)},G.prototype.equals=function(e){return G.equals(this,e)},G.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]},G.prototype.equalsEpsilon=function(e,t){return G.equalsEpsilon(this,e,t)},G.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})
|
|
3
3
|
(${this[1]}, ${this[4]}, ${this[7]})
|
|
4
4
|
(${this[2]}, ${this[5]}, ${this[8]})`};function dt(e){this.name="RuntimeError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(dt.prototype=Object.create(Error.prototype),dt.prototype.constructor=dt),dt.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=`
|
|
@@ -4950,7 +4950,7 @@ ${n.fragmentShaderSource}`;i.normalEC=a.indexOf("materialInput.normalEC")!==-1||
|
|
|
4950
4950
|
{
|
|
4951
4951
|
${a} czm_non_compressed_main();
|
|
4952
4952
|
}`;return[i,o,r,f].join(`
|
|
4953
|
-
`)}}function GA(e,t){const n=t.context,i=e._primitive;let o=HC;o=e._primitive._batchTable.getVertexShaderCallback()(o),o=Pe._appendDistanceDisplayConditionToShader(i,o),o=Pe._modifyShaderPosition(e,o,t.scene3DOnly),o=Pe._updateColorAttribute(i,o);const a=e._hasPlanarExtentsAttributes,r=a||e._hasSphericalExtentsAttribute;e._extruded&&(o=VA(i,o));const f=e._extruded?"EXTRUDED_GEOMETRY":"";let c=new Ae({defines:[f],sources:[o]});const h=new Ae({sources:[jC]}),d=e._primitive._attributeLocations,p=new qt(r,a,e.appearance);if(e._spStencil=lt.replaceCache({context:n,shaderProgram:e._spStencil,vertexShaderSource:c,fragmentShaderSource:h,attributeLocations:d}),e._primitive.allowPicking){let y=Ae.createPickVertexShaderSource(o);y=Pe._appendShowToShader(i,y),y=Pe._updatePickColorAttribute(y);const w=p.createPickFragmentShader(!1),A=p.createPickVertexShader([f],y,!1,t.mapProjection);if(e._spPick=lt.replaceCache({context:n,shaderProgram:e._spPick,vertexShaderSource:A,fragmentShaderSource:w,attributeLocations:d}),r){let E=n.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!l(E)){const b=p.createPickFragmentShader(!0),D=p.createPickVertexShader([f],y,!0,t.mapProjection);E=n.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:D,fragmentShaderSource:b,attributeLocations:d})}e._spPick2D=E}}else e._spPick=lt.fromCache({context:n,vertexShaderSource:c,fragmentShaderSource:h,attributeLocations:d});o=Pe._appendShowToShader(i,o),c=new Ae({defines:[f],sources:[o]}),e._sp=lt.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:c,fragmentShaderSource:h,attributeLocations:d});const m=p.createFragmentShader(!1),T=p.createVertexShader([f],o,!1,t.mapProjection);if(e._spColor=lt.replaceCache({context:n,shaderProgram:e._spColor,vertexShaderSource:T,fragmentShaderSource:m,attributeLocations:d}),r){let y=n.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!l(y)){const w=p.createFragmentShader(!0),A=p.createVertexShader([f],o,!0,t.mapProjection);y=n.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:A,fragmentShaderSource:w,attributeLocations:d})}e._spColor2D=y}}function qA(e,t){const n=e._primitive;let i=n._va.length*2;t.length=i;let o,a,r,f=0,c=n._batchTable.getUniformMapCallback()(e._uniformMap);const h=e._needs2DShader;for(o=0;o<i;o+=2){const T=n._va[f++];a=t[o],l(a)||(a=t[o]=new et({owner:e,primitiveType:n._primitiveType})),a.vertexArray=T,a.renderState=e._rsStencilDepthPass,a.shaderProgram=e._sp,a.uniformMap=c,a.pass=Nt.TERRAIN_CLASSIFICATION,r=et.shallowClone(a,a.derivedCommands.tileset),r.renderState=e._rsStencilDepthPass3DTiles,r.pass=Nt.CESIUM_3D_TILE_CLASSIFICATION,a.derivedCommands.tileset=r,a=t[o+1],l(a)||(a=t[o+1]=new et({owner:e,primitiveType:n._primitiveType})),a.vertexArray=T,a.renderState=e._rsColorPass,a.shaderProgram=e._spColor,a.pass=Nt.TERRAIN_CLASSIFICATION;const w=e.appearance.material;if(l(w)&&(c=hn(c,w._uniforms)),a.uniformMap=c,r=et.shallowClone(a,a.derivedCommands.tileset),r.pass=Nt.CESIUM_3D_TILE_CLASSIFICATION,a.derivedCommands.tileset=r,h){let A=et.shallowClone(a,a.derivedCommands.appearance2D);A.shaderProgram=e._spColor2D,a.derivedCommands.appearance2D=A,A=et.shallowClone(r,r.derivedCommands.appearance2D),A.shaderProgram=e._spColor2D,r.derivedCommands.appearance2D=A}}const d=e._commandsIgnoreShow,p=e._spStencil;let m=0;i=d.length=i/2;for(let T=0;T<i;++T){const y=d[T]=et.shallowClone(t[m],d[T]);y.shaderProgram=p,y.pass=Nt.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,m+=2}}function HA(e,t){const n=e._usePickOffsets,i=e._primitive;let o=i._va.length*2,a,r=0,f;n&&(a=i._pickOffsets,o=a.length*2),t.length=o;let c,h,d,p=0;const m=i._batchTable.getUniformMapCallback()(e._uniformMap),T=e._needs2DShader;for(c=0;c<o;c+=2){let y=i._va[p++];if(n&&(f=a[r++],y=i._va[f.index]),h=t[c],l(h)||(h=t[c]=new et({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),h.vertexArray=y,h.renderState=e._rsStencilDepthPass,h.shaderProgram=e._sp,h.uniformMap=m,h.pass=Nt.TERRAIN_CLASSIFICATION,n&&(h.offset=f.offset,h.count=f.count),d=et.shallowClone(h,h.derivedCommands.tileset),d.renderState=e._rsStencilDepthPass3DTiles,d.pass=Nt.CESIUM_3D_TILE_CLASSIFICATION,h.derivedCommands.tileset=d,h=t[c+1],l(h)||(h=t[c+1]=new et({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),h.vertexArray=y,h.renderState=e._rsPickPass,h.shaderProgram=e._spPick,h.uniformMap=m,h.pass=Nt.TERRAIN_CLASSIFICATION,n&&(h.offset=f.offset,h.count=f.count),d=et.shallowClone(h,h.derivedCommands.tileset),d.pass=Nt.CESIUM_3D_TILE_CLASSIFICATION,h.derivedCommands.tileset=d,T){let w=et.shallowClone(h,h.derivedCommands.pick2D);w.shaderProgram=e._spPick2D,h.derivedCommands.pick2D=w,w=et.shallowClone(d,d.derivedCommands.pick2D),w.shaderProgram=e._spPick2D,d.derivedCommands.pick2D=w}}}function jA(e,t,n,i,o,a,r){qA(e,a),HA(e,r)}function Tp(e,t){return Math.floor(e%t/2)}function Eh(e,t,n,i,o,a){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,e.debugShowBoundingVolume=a,t.commandList.push(e)}function yp(e,t,n,i,o){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,t.commandList.push(e)}function YA(e,t,n,i,o,a,r,f){const c=e._primitive;Pe._updateBoundingVolumes(c,t,o);let h;t.mode===ye.SCENE3D?h=c._boundingSphereWC:t.mode===ye.COLUMBUS_VIEW?h=c._boundingSphereCV:t.mode===ye.SCENE2D&&l(c._boundingSphere2D)?h=c._boundingSphere2D:l(c._boundingSphereMorph)&&(h=c._boundingSphereMorph);const d=e.classificationType,p=d!==wi.CESIUM_3D_TILE,m=d!==wi.TERRAIN,T=t.passes;let y,w,A;if(T.render){const E=n.length;for(y=0;y<E;++y)w=h[Tp(y,E)],p&&(A=n[y],Eh(A,t,o,a,w,r)),m&&(A=n[y].derivedCommands.tileset,Eh(A,t,o,a,w,r));if(t.invertClassification){const b=e._commandsIgnoreShow,D=b.length;for(y=0;y<D;++y)w=h[y],A=b[y],Eh(A,t,o,a,w,r)}}if(T.pick){const E=i.length,b=c._pickOffsets;for(y=0;y<E;++y){const D=b[Tp(y,E)];w=h[D.index],p&&(A=i[y],yp(A,t,o,a,w)),m&&(A=i[y].derivedCommands.tileset,yp(A,t,o,a,w))}}}Hi.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;let t=this.appearance;l(t)&&l(t.material)&&t.material.update(e.context);const n=this,i=this._primitiveOptions;if(!l(this._primitive)){const o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],a=o.length;let r,f,c,h=!1,d=!0,p,m=!1,T=!1;for(a>0&&(c=o[0].attributes,m=qt.hasAttributesForSphericalExtents(c),T=qt.hasAttributesForTextureCoordinatePlanes(c),p=c.color),r=0;r<a;r++){f=o[r];const w=f.attributes.color;if(l(w))h=!0;else if(h)throw new C("All GeometryInstances must have color attributes to use per-instance color.");d=d&&l(w)&&Lo.equals(p,w)}if(!d&&!m&&!T)throw new C("All GeometryInstances must have the same color attribute except via GroundPrimitives");if(h&&!l(t)&&(t=new Kt({flat:!0}),this.appearance=t),!h&&t instanceof Kt)throw new C("PerInstanceColorAppearance requires color GeometryInstanceAttributes on all GeometryInstances");if(l(t.material)&&!m&&!T)throw new C("Materials on ClassificationPrimitives are not supported except via GroundPrimitives");this._usePickOffsets=!m&&!T,this._hasSphericalExtentsAttribute=m,this._hasPlanarExtentsAttributes=T,this._hasPerColorAttribute=h;const y=new Array(a);for(r=0;r<a;++r)f=o[r],y[r]=new na({geometry:f.geometry,attributes:f.attributes,modelMatrix:f.modelMatrix,id:f.id,pickPrimitive:g(this._pickPrimitive,n)});i.appearance=t,i.geometryInstances=y,l(this._createBoundingVolumeFunction)&&(i._createBoundingVolumeFunction=function(w,A){n._createBoundingVolumeFunction(w,A)}),i._createRenderStatesFunction=function(w,A,E,b){kA(n)},i._createShaderProgramFunction=function(w,A,E){GA(n,A)},i._createCommandsFunction=function(w,A,E,b,D,O,B){jA(n,void 0,void 0,!0,!1,O,B)},l(this._updateAndQueueCommandsFunction)?i._updateAndQueueCommandsFunction=function(w,A,E,b,D,O,B,L){n._updateAndQueueCommandsFunction(w,A,E,b,D,O,B,L)}:i._updateAndQueueCommandsFunction=function(w,A,E,b,D,O,B,L){YA(n,A,E,b,D,O,B)},this._primitive=new Pe(i)}if(this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=je.fromCache(jo(!1,!1)),this._rsStencilDepthPass3DTiles=je.fromCache(jo(!1,!0)),this._rsColorPass=je.fromCache(Ah(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=je.fromCache(jo(!0,!1)),this._rsStencilDepthPass3DTiles=je.fromCache(jo(!0,!0)),this._rsColorPass=je.fromCache(Ah(!0))),this._primitive.appearance!==t){if(!this._hasSphericalExtentsAttribute&&!this._hasPlanarExtentsAttributes&&l(t.material))throw new C("Materials on ClassificationPrimitives are not supported except via GroundPrimitive");if(!this._hasPerColorAttribute&&t instanceof Kt)throw new C("PerInstanceColorAppearance requires color GeometryInstanceAttribute");this._primitive.appearance=t}this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})},Hi.prototype.getGeometryInstanceAttributes=function(e){if(!l(this._primitive))throw new C("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},Hi.prototype.isDestroyed=function(){return!1},Hi.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._spColor=this._spColor&&this._spColor.destroy(),this._spPick2D=void 0,this._spColor2D=void 0,st(this)};const XA={u_globeMinimumAltitude:function(){return 55e3}};function un(e){e=g(e,g.EMPTY_OBJECT);let t=e.appearance;const n=e.geometryInstances;if(!l(t)&&l(n)){const o=Array.isArray(n)?n:[n],a=o.length;for(let r=0;r<a;r++){const f=o[r].attributes;if(l(f)&&l(f.color)){t=new Kt({flat:!0});break}}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=g(e.show,!0),this.classificationType=g(e.classificationType,wi.BOTH),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=g(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=Ve._defaultMaxTerrainHeight,this._minTerrainHeight=Ve._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;const i=this;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:g(e.vertexCacheOptimize,!1),interleave:g(e.interleave,!1),releaseGeometryInstances:g(e.releaseGeometryInstances,!0),allowPicking:g(e.allowPicking,!0),asynchronous:g(e.asynchronous,!0),compressVertices:g(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:i,_extruded:!0,_uniformMap:XA}}Object.defineProperties(un.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}}}),un.isSupported=Hi.isSupported;function Cp(e){return function(t,n){const i=n.maximumRadius,o=i/Math.cos(t*.5)-i;return e._maxHeight+o}}function wp(e){return function(t,n){return e._minHeight}}const $A=new u,ZA=new u,KA=new u,QA=new oe,JA=new de;function Ta(e,t){const n=e.mapProjection.ellipsoid;if(!l(t.attributes)||!l(t.attributes.position3DHigh))return l(t.rectangle)?t.rectangle:void 0;const i=t.attributes.position3DHigh.values,o=t.attributes.position3DLow.values,a=i.length;let r=Number.POSITIVE_INFINITY,f=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY;for(let p=0;p<a;p+=3){const m=u.unpack(i,p,$A),T=u.unpack(o,p,ZA),y=u.add(m,T,KA),w=n.cartesianToCartographic(y,QA),A=w.latitude,E=w.longitude;r=Math.min(r,A),f=Math.min(f,E),c=Math.max(c,A),h=Math.max(h,E)}const d=JA;return d.north=c,d.south=r,d.east=h,d.west=f,d}function e2(e,t,n){const i=Ve.getMinimumMaximumHeights(t,n);e._minTerrainHeight=i.minimumTerrainHeight,e._maxTerrainHeight=i.maximumTerrainHeight}function t2(e,t,n){const i=t.mapProjection.ellipsoid,o=Ta(t,n),a=ze.fromRectangle(o,e._minHeight,e._maxHeight,i);if(e._boundingVolumes.push(a),!t.scene3DOnly){const r=t.mapProjection,f=te.fromRectangleWithHeights2D(o,r,e._maxHeight,e._minHeight);u.fromElements(f.center.z,f.center.x,f.center.y,f.center),e._boundingVolumes2D.push(f)}}function bh(e,t){return Math.floor(e%t/2)}function xh(e,t,n,i,o,a,r){const f=e._primitive;n.mode!==ye.SCENE3D&&t.shaderProgram===f._spColor&&f._needs2DShader&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=a,t.cull=o,t.debugShowBoundingVolume=r,n.commandList.push(t)}function Ap(e,t,n,i,o,a){const r=e._primitive;n.mode!==ye.SCENE3D&&t.shaderProgram===r._spPick&&r._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=a,t.cull=o,n.commandList.push(t)}function n2(e,t,n,i,o,a,r,f){let c;t.mode===ye.SCENE3D?c=e._boundingVolumes:c=e._boundingVolumes2D;const h=e.classificationType,d=h!==wi.CESIUM_3D_TILE,p=h!==wi.TERRAIN,m=t.passes,T=e._primitive;let y,w,A;if(m.render){const E=n.length;for(y=0;y<E;++y)w=c[bh(y,E)],d&&(A=n[y],xh(e,A,t,o,a,w,r)),p&&(A=n[y].derivedCommands.tileset,xh(e,A,t,o,a,w,r));if(t.invertClassification){const b=T._commandsIgnoreShow,D=b.length;for(y=0;y<D;++y)w=c[y],A=b[y],xh(e,A,t,o,a,w,r)}}if(m.pick){const E=i.length;let b;for(e._useFragmentCulling||(b=T._primitive._pickOffsets),y=0;y<E;++y){if(w=c[bh(y,E)],!e._useFragmentCulling){const D=b[bh(y,E)];w=c[D.index]}d&&(A=i[y],Ap(e,A,t,o,a,w)),p&&(A=i[y].derivedCommands.tileset,Ap(e,A,t,o,a,w))}}}un.initializeTerrainHeights=function(){return Ve.initialize()},un.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;if(!Ve.initialized){if(!this.asynchronous)throw new C("For synchronous GroundPrimitives, you must call GroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");un.initializeTerrainHeights();return}const t=this,n=this._classificationPrimitiveOptions;if(!l(this._primitive)){const i=e.mapProjection.ellipsoid;let o,a,r;const f=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=f.length,h=new Array(c);let d,p;for(d=0;d<c;++d){o=f[d],a=o.geometry;const w=Ta(e,a);l(p)?l(w)&&de.union(p,w,p):p=de.clone(w);const A=o.id;if(l(A)&&l(w)){const E=Ve.getBoundingSphere(w,i);this._boundingSpheresKeys.push(A),this._boundingSpheres.push(E)}if(r=a.constructor,!l(r)||!l(r.createShadowVolume))throw new C("Not all of the geometry instances have GroundPrimitive support.")}e2(this,p,i);const m=e.verticalExaggeration,T=e.verticalExaggerationRelativeHeight;this._minHeight=ws.getHeight(this._minTerrainHeight,m,T),this._maxHeight=ws.getHeight(this._maxTerrainHeight,m,T);const y=un._supportsMaterials(e.context);if(this._useFragmentCulling=y,y){let w,A=!0;for(d=0;d<c;++d)if(o=f[d],a=o.geometry,p=Ta(e,a),qt.shouldUseSphericalCoordinates(p)){A=!1;break}for(d=0;d<c;++d){o=f[d],a=o.geometry,r=a.constructor;const E=Ta(e,a),b=a.textureCoordinateRotationPoints;A?w=qt.getPlanarTextureCoordinateAttributes(E,b,i,e.mapProjection,this._maxHeight):w=qt.getSphericalExtentGeometryInstanceAttributes(E,b,i,e.mapProjection);const D=o.attributes;for(const O in D)D.hasOwnProperty(O)&&(w[O]=D[O]);h[d]=new na({geometry:r.createShadowVolume(a,wp(this),Cp(this)),attributes:w,id:o.id})}}else for(d=0;d<c;++d)o=f[d],a=o.geometry,r=a.constructor,h[d]=new na({geometry:r.createShadowVolume(a,wp(this),Cp(this)),attributes:o.attributes,id:o.id});n.geometryInstances=h,n.appearance=this.appearance,n._createBoundingVolumeFunction=function(w,A){t2(t,w,A)},n._updateAndQueueCommandsFunction=function(w,A,E,b,D,O,B,L){n2(t,A,E,b,D,O,B)},this._primitive=new Hi(n)}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})},un.prototype.getBoundingSphere=function(e){const t=this._boundingSpheresKeys.indexOf(e);if(t!==-1)return this._boundingSpheres[t]},un.prototype.getGeometryInstanceAttributes=function(e){if(!l(this._primitive))throw new C("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},un.prototype.isDestroyed=function(){return!1},un.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),st(this)},un._supportsMaterials=function(e){return e.depthTexture},un.supportsMaterials=function(e){return _.typeOf.object("scene",e),un._supportsMaterials(e.frameState.context)};const ai=Object.freeze({NONE:0,GEODESIC:1,RHUMB:2}),Ep=S.EPSILON10;function i2(e,t,n,i){if(_.defined("equalsEpsilon",t),!l(e))return;n=g(n,!1);const o=l(i),a=e.length;if(a<2)return e;let r,f=e[0],c,h,d=0,p=-1;for(r=1;r<a;++r)c=e[r],t(f,c,Ep)?(l(h)||(h=e.slice(0,r),d=r-1,p=0),o&&i.push(r)):(l(h)&&(h.push(c),d=r,o&&(p=i.length)),f=c);return n&&t(e[0],e[a-1],Ep)&&(o&&(l(h)?i.splice(p,0,d):i.push(a-1)),l(h)?h.length-=1:h=e.slice(0,-1)),l(h)?h:e}function o2(e){const t=e._uSquared,n=e._ellipsoid.maximumRadius,i=e._ellipsoid.minimumRadius,o=(n-i)/n,a=Math.cos(e._startHeading),r=Math.sin(e._startHeading),f=(1-o)*Math.tan(e._start.latitude),c=1/Math.sqrt(1+f*f),h=c*f,d=Math.atan2(f,a),p=c*r,m=p*p,T=1-m,y=Math.sqrt(T),w=t/4,A=w*w,E=A*w,b=A*A,D=1+w-3*A/4+5*E/4-175*b/64,O=1-w+15*A/8-35*E/8,B=1-3*w+35*A/4,L=1-5*w,F=D*d-O*Math.sin(2*d)*w/2-B*Math.sin(4*d)*A/16-L*Math.sin(6*d)*E/48-Math.sin(8*d)*5*b/512,N=e._constants;N.a=n,N.b=i,N.f=o,N.cosineHeading=a,N.sineHeading=r,N.tanU=f,N.cosineU=c,N.sineU=h,N.sigma=d,N.sineAlpha=p,N.sineSquaredAlpha=m,N.cosineSquaredAlpha=T,N.cosineAlpha=y,N.u2Over4=w,N.u4Over16=A,N.u6Over64=E,N.u8Over256=b,N.a0=D,N.a1=O,N.a2=B,N.a3=L,N.distanceRatio=F}function s2(e,t){return e*t*(4+e*(4-3*t))/16}function bp(e,t,n,i,o,a,r){const f=s2(e,n);return(1-f)*e*t*(i+f*o*(r+f*a*(2*r*r-1)))}function r2(e,t,n,i,o,a,r){const f=(t-n)/t,c=a-i,h=Math.atan((1-f)*Math.tan(o)),d=Math.atan((1-f)*Math.tan(r)),p=Math.cos(h),m=Math.sin(h),T=Math.cos(d),y=Math.sin(d),w=p*T,A=p*y,E=m*y,b=m*T;let D=c,O=S.TWO_PI,B=Math.cos(D),L=Math.sin(D),F,N,U,M,j;do{B=Math.cos(D),L=Math.sin(D);const K=A-b*B;U=Math.sqrt(T*T*L*L+K*K),N=E+w*B,F=Math.atan2(U,N);let ce;U===0?(ce=0,M=1):(ce=w*L/U,M=1-ce*ce),O=D,j=N-2*E/M,isFinite(j)||(j=0),D=c+bp(f,ce,M,F,U,N,j)}while(Math.abs(D-O)>S.EPSILON12);const Y=M*(t*t-n*n)/(n*n),s=1+Y*(4096+Y*(Y*(320-175*Y)-768))/16384,x=Y*(256+Y*(Y*(74-47*Y)-128))/1024,P=j*j,z=x*U*(j+x*(N*(2*P-1)-x*j*(4*U*U-3)*(4*P-3)/6)/4),H=n*s*(F-z),X=Math.atan2(T*L,A-b*B),ee=Math.atan2(p*L,A*B-b);e._distance=H,e._startHeading=X,e._endHeading=ee,e._uSquared=Y}const a2=new u,Sh=new u;function xp(e,t,n,i){const o=u.normalize(i.cartographicToCartesian(t,Sh),a2),a=u.normalize(i.cartographicToCartesian(n,Sh),Sh);_.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(u.angleBetween(o,a))-Math.PI),.0125),r2(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=oe.clone(t,e._start),e._end=oe.clone(n,e._end),e._start.height=0,e._end.height=0,o2(e)}function Os(e,t,n){const i=g(n,pe.default);this._ellipsoid=i,this._start=new oe,this._end=new oe,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&xp(this,e,t,i)}Object.defineProperties(Os.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return _.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return _.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return _.defined("distance",this._distance),this._endHeading}}}),Os.prototype.setEndPoints=function(e,t){_.defined("start",e),_.defined("end",t),xp(this,e,t,this._ellipsoid)},Os.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},Os.prototype.interpolateUsingSurfaceDistance=function(e,t){_.defined("distance",this._distance);const n=this._constants,i=n.distanceRatio+e/n.b,o=Math.cos(2*i),a=Math.cos(4*i),r=Math.cos(6*i),f=Math.sin(2*i),c=Math.sin(4*i),h=Math.sin(6*i),d=Math.sin(8*i),p=i*i,m=i*p,T=n.u8Over256,y=n.u2Over4,w=n.u6Over64,A=n.u4Over16;let E=2*m*T*o/3+i*(1-y+7*A/4-15*w/4+579*T/64-(A-15*w/4+187*T/16)*o-(5*w/4-115*T/16)*a-29*T*r/16)+(y/2-A+71*w/32-85*T/16)*f+(5*A/16-5*w/4+383*T/96)*c-p*((w-11*T/2)*f+5*T*c/2)+(29*w/96-29*T/16)*h+539*T*d/1536;const b=Math.asin(Math.sin(E)*n.cosineAlpha),D=Math.atan(n.a/n.b*Math.tan(b));E=E-n.sigma;const O=Math.cos(2*n.sigma+E),B=Math.sin(E),L=Math.cos(E),F=n.cosineU*L,N=n.sineU*B,M=Math.atan2(B*n.sineHeading,F-N*n.cosineHeading)-bp(n.f,n.sineAlpha,n.cosineSquaredAlpha,E,B,L,O);return l(t)?(t.longitude=this._start.longitude+M,t.latitude=D,t.height=0,t):new oe(this._start.longitude+M,D,0)};function Ih(e,t,n){if(e===0)return t*n;const i=e*e,o=i*i,a=o*i,r=a*i,f=r*i,c=f*i,h=n,d=Math.sin(2*h),p=Math.sin(4*h),m=Math.sin(6*h),T=Math.sin(8*h),y=Math.sin(10*h),w=Math.sin(12*h);return t*((1-i/4-3*o/64-5*a/256-175*r/16384-441*f/65536-4851*c/1048576)*h-(3*i/8+3*o/32+45*a/1024+105*r/4096+2205*f/131072+6237*c/524288)*d+(15*o/256+45*a/1024+525*r/16384+1575*f/65536+155925*c/8388608)*p-(35*a/3072+175*r/12288+3675*f/262144+13475*c/1048576)*m+(315*r/131072+2205*f/524288+43659*c/8388608)*T-(693*f/1310720+6237*c/5242880)*y+1001*c/8388608*w)}function c2(e,t,n){const i=e/n;if(t===0)return i;const o=i*i,a=o*i,r=a*i,f=t,c=f*f,h=c*c,d=h*c,p=d*c,m=p*c,T=m*c,y=Math.sin(2*i),w=Math.cos(2*i),A=Math.sin(4*i),E=Math.cos(4*i),b=Math.sin(6*i),D=Math.cos(6*i),O=Math.sin(8*i),B=Math.cos(8*i),L=Math.sin(10*i),F=Math.cos(10*i),N=Math.sin(12*i);return i+i*c/4+7*i*h/64+15*i*d/256+579*i*p/16384+1515*i*m/65536+16837*i*T/1048576+(3*i*h/16+45*i*d/256-i*(32*o-561)*p/4096-i*(232*o-1677)*m/16384+i*(399985-90560*o+512*r)*T/5242880)*w+(21*i*d/256+483*i*p/4096-i*(224*o-1969)*m/16384-i*(33152*o-112599)*T/1048576)*E+(151*i*p/4096+4681*i*m/65536+1479*i*T/16384-453*a*T/32768)*D+(1097*i*m/65536+42783*i*T/1048576)*B+8011*i*T/1048576*F+(3*c/8+3*h/16+213*d/2048-3*o*d/64+255*p/4096-33*o*p/512+20861*m/524288-33*o*m/512+r*m/1024+28273*T/1048576-471*o*T/8192+9*r*T/4096)*y+(21*h/256+21*d/256+533*p/8192-21*o*p/512+197*m/4096-315*o*m/4096+584039*T/16777216-12517*o*T/131072+7*r*T/2048)*A+(151*d/6144+151*p/4096+5019*m/131072-453*o*m/16384+26965*T/786432-8607*o*T/131072)*b+(1097*p/131072+1097*m/65536+225797*T/10485760-1097*o*T/65536)*O+(8011*m/2621440+8011*T/1048576)*L+293393*T/251658240*N}function Yo(e,t){if(e===0)return Math.log(Math.tan(.5*(S.PI_OVER_TWO+t)));const n=e*Math.sin(t);return Math.log(Math.tan(.5*(S.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}function h2(e,t,n,i,o){const a=Yo(e._ellipticity,n),r=Yo(e._ellipticity,o);return Math.atan2(S.negativePiToPi(i-t),r-a)}function f2(e,t,n,i,o,a,r){const f=e._heading,c=a-i;let h=0;if(S.equalsEpsilon(Math.abs(f),S.PI_OVER_TWO,S.EPSILON8))if(t===n)h=t*Math.cos(o)*S.negativePiToPi(c);else{const d=Math.sin(o);h=t*Math.cos(o)*S.negativePiToPi(c)/Math.sqrt(1-e._ellipticitySquared*d*d)}else{const d=Ih(e._ellipticity,t,o);h=(Ih(e._ellipticity,t,r)-d)/Math.cos(f)}return Math.abs(h)}const l2=new u,Dh=new u;function Sp(e,t,n,i){const o=u.normalize(i.cartographicToCartesian(t,Dh),l2),a=u.normalize(i.cartographicToCartesian(n,Dh),Dh);_.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(u.angleBetween(o,a))-Math.PI),.0125);const r=i.maximumRadius,f=i.minimumRadius,c=r*r,h=f*f;e._ellipticitySquared=(c-h)/c,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=oe.clone(t,e._start),e._start.height=0,e._end=oe.clone(n,e._end),e._end.height=0,e._heading=h2(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=f2(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function Ip(e,t,n,i,o,a){if(n===0)return oe.clone(e,a);const r=o*o;let f,c,h;if(Math.abs(S.PI_OVER_TWO-Math.abs(t))>S.EPSILON8){const d=Ih(o,i,e.latitude),p=n*Math.cos(t),m=d+p;if(c=c2(m,o,i),Math.abs(t)<S.EPSILON10)f=S.negativePiToPi(e.longitude);else{const T=Yo(o,e.latitude),y=Yo(o,c);h=Math.tan(t)*(y-T),f=S.negativePiToPi(e.longitude+h)}}else{c=e.latitude;let d;if(o===0)d=i*Math.cos(e.latitude);else{const p=Math.sin(e.latitude);d=i*Math.cos(e.latitude)/Math.sqrt(1-r*p*p)}h=n/d,t>0?f=S.negativePiToPi(e.longitude+h):f=S.negativePiToPi(e.longitude-h)}return l(a)?(a.longitude=f,a.latitude=c,a.height=0,a):new oe(f,c,0)}function ci(e,t,n){const i=g(n,pe.default);this._ellipsoid=i,this._start=new oe,this._end=new oe,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&Sp(this,e,t,i)}Object.defineProperties(ci.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return _.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return _.defined("distance",this._distance),this._heading}}}),ci.fromStartHeadingDistance=function(e,t,n,i,o){_.defined("start",e),_.defined("heading",t),_.defined("distance",n),_.typeOf.number.greaterThan("distance",n,0);const a=g(i,pe.default),r=a.maximumRadius,f=a.minimumRadius,c=r*r,h=f*f,d=Math.sqrt((c-h)/c);t=S.negativePiToPi(t);const p=Ip(e,t,n,a.maximumRadius,d);return!l(o)||l(i)&&!i.equals(o.ellipsoid)?new ci(e,p,a):(o.setEndPoints(e,p),o)},ci.prototype.setEndPoints=function(e,t){_.defined("start",e),_.defined("end",t),Sp(this,e,t,this._ellipsoid)},ci.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)},ci.prototype.interpolateUsingSurfaceDistance=function(e,t){if(_.typeOf.number("distance",e),!l(this._distance)||this._distance===0)throw new C("EllipsoidRhumbLine must have distinct start and end set.");return Ip(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)},ci.prototype.findIntersectionWithLongitude=function(e,t){if(_.typeOf.number("intersectionLongitude",e),!l(this._distance)||this._distance===0)throw new C("EllipsoidRhumbLine must have distinct start and end set.");const n=this._ellipticity,i=this._heading,o=Math.abs(i),a=this._start;if(e=S.negativePiToPi(e),S.equalsEpsilon(Math.abs(e),Math.PI,S.EPSILON14)&&(e=S.sign(a.longitude)*Math.PI),l(t)||(t=new oe),Math.abs(S.PI_OVER_TWO-o)<=S.EPSILON8)return t.longitude=e,t.latitude=a.latitude,t.height=0,t;if(S.equalsEpsilon(Math.abs(S.PI_OVER_TWO-o),S.PI_OVER_TWO,S.EPSILON8))return S.equalsEpsilon(e,a.longitude,S.EPSILON12)?void 0:(t.longitude=e,t.latitude=S.PI_OVER_TWO*S.sign(S.PI_OVER_TWO-i),t.height=0,t);const r=a.latitude,f=n*Math.sin(r),c=Math.tan(.5*(S.PI_OVER_TWO+r))*Math.exp((e-a.longitude)/Math.tan(i)),h=(1+f)/(1-f);let d=a.latitude,p;do{p=d;const m=n*Math.sin(p),T=(1+m)/(1-m);d=2*Math.atan(c*Math.pow(T/h,n/2))-S.PI_OVER_TWO}while(!S.equalsEpsilon(d,p,S.EPSILON12));return t.longitude=e,t.latitude=d,t.height=0,t},ci.prototype.findIntersectionWithLatitude=function(e,t){if(_.typeOf.number("intersectionLatitude",e),!l(this._distance)||this._distance===0)throw new C("EllipsoidRhumbLine must have distinct start and end set.");const n=this._ellipticity,i=this._heading,o=this._start;if(S.equalsEpsilon(Math.abs(i),S.PI_OVER_TWO,S.EPSILON8))return;const a=Yo(n,o.latitude),r=Yo(n,e),f=Math.tan(i)*(r-a),c=S.negativePiToPi(o.longitude+f);return l(t)?(t.longitude=c,t.latitude=e,t.height=0,t):new oe(c,e,0)};const Oh=[Wn,on],u2=Oh.length,Dp=Math.cos(S.toRadians(30)),Op=Math.cos(S.toRadians(150)),vp=0,Wp=1e3;function ji(e){e=g(e,g.EMPTY_OBJECT);const t=e.positions;if(!l(t)||t.length<2)throw new C("At least two positions are required.");if(l(e.arcType)&&e.arcType!==ai.GEODESIC&&e.arcType!==ai.RHUMB)throw new C("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=g(e.width,1),this._positions=t,this.granularity=g(e.granularity,9999),this.loop=g(e.loop,!1),this.arcType=g(e.arcType,ai.GEODESIC),this._ellipsoid=pe.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ji.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+pe.packedLength+1+1}}}),ji.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;i<u2;i++)if(t instanceof Oh[i]){n=i;break}e._projectionIndex=n,e._ellipsoid=t.ellipsoid};const d2=new u,Pp=new u,Bp=new u;function vh(e,t,n,i,o){const a=sn(i,e,0,d2),r=sn(i,e,n,Pp),f=sn(i,t,0,Bp),c=bi(r,a,Pp),h=bi(f,a,Bp);return u.cross(h,c,o),u.normalize(o,o)}const p2=new oe,m2=new u,_2=new u,g2=new u;function Wh(e,t,n,i,o,a,r,f,c,h,d){if(o===0)return;let p;a===ai.GEODESIC?p=new Os(e,t,r):a===ai.RHUMB&&(p=new ci(e,t,r));const m=p.surfaceDistance;if(m<o)return;const T=vh(e,t,i,r,g2),y=Math.ceil(m/o),w=m/y;let A=w;const E=y-1;let b=f.length;for(let D=0;D<E;D++){const O=p.interpolateUsingSurfaceDistance(A,p2),B=sn(r,O,n,m2),L=sn(r,O,i,_2);u.pack(T,f,b),u.pack(B,c,b),u.pack(L,h,b),d.push(O.latitude),d.push(O.longitude),b+=3,A+=w}}const Ph=new oe;function sn(e,t,n,i){return oe.clone(t,Ph),Ph.height=n,oe.toCartesian(Ph,e,i)}ji.pack=function(e,t,n){_.typeOf.object("value",e),_.defined("array",t);let i=g(n,0);const o=e._positions,a=o.length;t[i++]=a;for(let r=0;r<a;++r){const f=o[r];u.pack(f,t,i),i+=3}return t[i++]=e.granularity,t[i++]=e.loop?1:0,t[i++]=e.arcType,pe.pack(e._ellipsoid,t,i),i+=pe.packedLength,t[i++]=e._projectionIndex,t[i++]=e._scene3DOnly?1:0,t},ji.unpack=function(e,t,n){_.defined("array",e);let i=g(t,0);const o=e[i++],a=new Array(o);for(let m=0;m<o;m++)a[m]=u.unpack(e,i),i+=3;const r=e[i++],f=e[i++]===1,c=e[i++],h=pe.unpack(e,i);i+=pe.packedLength;const d=e[i++],p=e[i++]===1;return l(n)||(n=new ji({positions:a})),n._positions=a,n.granularity=r,n.loop=f,n.arcType=c,n._ellipsoid=h,n._projectionIndex=d,n._scene3DOnly=p,n};function bi(e,t,n){return u.subtract(e,t,n),u.normalize(n,n),n}function Rp(e,t,n,i){return i=bi(e,t,i),i=u.cross(i,n,i),i=u.normalize(i,i),i=u.cross(n,i,i),i}const T2=new u,y2=new u,C2=new u,zp=new u,w2=0,A2=-1;function Bh(e,t,n,i,o){const a=bi(n,t,zp),r=Rp(e,t,a,T2),f=Rp(i,t,a,y2);if(S.equalsEpsilon(u.dot(r,f),A2,S.EPSILON5))return o=u.cross(a,r,o),o=u.normalize(o,o),o;o=u.add(f,r,o),o=u.normalize(o,o);const c=u.cross(a,o,C2);return u.dot(f,c)<w2&&(o=u.negate(o,o)),o}const ya=Me.fromPointNormal(u.ZERO,u.UNIT_Y),E2=new u,b2=new u,x2=new u,S2=new u,I2=new u,Ca=new u,wa=new oe,Lp=new oe,Np=new oe;ji.createGeometry=function(e){const t=!e._scene3DOnly;let n=e.loop;const i=e._ellipsoid,o=e.granularity,a=e.arcType,r=new Oh[e._projectionIndex](i),f=vp,c=Wp;let h,d;const p=e._positions,m=p.length;m===2&&(n=!1);let T,y,w,A;const E=new ci(void 0,void 0,i);let b,D,O;const B=[p[0]];for(d=0;d<m-1;d++)T=p[d],y=p[d+1],b=Ue.lineSegmentPlane(T,y,ya,Ca),l(b)&&!u.equalsEpsilon(b,T,S.EPSILON7)&&!u.equalsEpsilon(b,y,S.EPSILON7)&&(e.arcType===ai.GEODESIC?B.push(u.clone(b)):e.arcType===ai.RHUMB&&(O=i.cartesianToCartographic(b,wa).longitude,w=i.cartesianToCartographic(T,wa),A=i.cartesianToCartographic(y,Lp),E.setEndPoints(w,A),D=E.findIntersectionWithLongitude(O,Np),b=i.cartographicToCartesian(D,Ca),l(b)&&!u.equalsEpsilon(b,T,S.EPSILON7)&&!u.equalsEpsilon(b,y,S.EPSILON7)&&B.push(u.clone(b)))),B.push(y);n&&(T=p[m-1],y=p[0],b=Ue.lineSegmentPlane(T,y,ya,Ca),l(b)&&!u.equalsEpsilon(b,T,S.EPSILON7)&&!u.equalsEpsilon(b,y,S.EPSILON7)&&(e.arcType===ai.GEODESIC?B.push(u.clone(b)):e.arcType===ai.RHUMB&&(O=i.cartesianToCartographic(b,wa).longitude,w=i.cartesianToCartographic(T,wa),A=i.cartesianToCartographic(y,Lp),E.setEndPoints(w,A),D=E.findIntersectionWithLongitude(O,Np),b=i.cartographicToCartesian(D,Ca),l(b)&&!u.equalsEpsilon(b,T,S.EPSILON7)&&!u.equalsEpsilon(b,y,S.EPSILON7)&&B.push(u.clone(b)))));let L=B.length,F=new Array(L);for(d=0;d<L;d++){const le=oe.fromCartesian(B[d],i);le.height=0,F[d]=le}if(F=i2(F,oe.equalsEpsilon),L=F.length,L<2)return;const N=[],U=[],M=[],j=[];let Y=E2,s=b2,x=x2,P=S2,z=I2;const H=F[0],X=F[1],ee=F[L-1];for(Y=sn(i,ee,f,Y),P=sn(i,X,f,P),s=sn(i,H,f,s),x=sn(i,H,c,x),n?z=Bh(Y,s,x,P,z):z=vh(H,X,c,i,z),u.pack(z,U,0),u.pack(s,M,0),u.pack(x,j,0),N.push(H.latitude),N.push(H.longitude),Wh(H,X,f,c,o,a,i,U,M,j,N),d=1;d<L-1;++d){Y=u.clone(s,Y),s=u.clone(P,s);const le=F[d];sn(i,le,c,x),sn(i,F[d+1],f,P),Bh(Y,s,x,P,z),h=U.length,u.pack(z,U,h),u.pack(s,M,h),u.pack(x,j,h),N.push(le.latitude),N.push(le.longitude),Wh(F[d],F[d+1],f,c,o,a,i,U,M,j,N)}const K=F[L-1],ce=F[L-2];if(s=sn(i,K,f,s),x=sn(i,K,c,x),n){const le=F[0];Y=sn(i,ce,f,Y),P=sn(i,le,f,P),z=Bh(Y,s,x,P,z)}else z=vh(ce,K,c,i,z);if(h=U.length,u.pack(z,U,h),u.pack(s,M,h),u.pack(x,j,h),N.push(K.latitude),N.push(K.longitude),n){for(Wh(K,H,f,c,o,a,i,U,M,j,N),h=U.length,d=0;d<3;++d)U[h+d]=U[d],M[h+d]=M[d],j[h+d]=j[d];N.push(H.latitude),N.push(H.longitude)}return J2(n,r,M,j,U,N,t)};const D2=new u,O2=new G,v2=new ie;function Fp(e,t,n,i){const o=bi(n,t,D2),a=u.dot(o,e);if(a>Dp||a<Op){const r=bi(i,n,zp),f=a<Op?S.PI_OVER_TWO:-S.PI_OVER_TWO,c=ie.fromAxisAngle(r,f,v2),h=G.fromQuaternion(c,O2);return G.multiplyByVector(h,e,e),!0}return!1}const Mp=new oe,W2=new u,Up=new u;function vs(e,t,n,i,o){const a=oe.toCartesian(t,e._ellipsoid,W2);let r=u.add(a,n,Up),f=!1;const c=e._ellipsoid;let h=c.cartesianToCartographic(r,Mp);Math.abs(t.longitude-h.longitude)>S.PI_OVER_TWO&&(f=!0,r=u.subtract(a,n,Up),h=c.cartesianToCartographic(r,Mp)),h.height=0;const d=e.project(h,o);return o=u.subtract(d,i,o),o.z=0,o=u.normalize(o,o),f&&u.negate(o,o),o}const P2=new u,kp=new u;function Vp(e,t,n,i,o,a){const r=u.subtract(t,e,P2);u.normalize(r,r);const f=n-vp;let c=u.multiplyByScalar(r,f,kp);u.add(e,c,o);const h=i-Wp;c=u.multiplyByScalar(r,h,kp),u.add(t,c,a)}const B2=new u;function Aa(e,t){const n=Me.getPointDistance(ya,e),i=Me.getPointDistance(ya,t);let o=B2;S.equalsEpsilon(n,0,S.EPSILON2)?(o=bi(t,e,o),u.multiplyByScalar(o,S.EPSILON2,o),u.add(e,o,e)):S.equalsEpsilon(i,0,S.EPSILON2)&&(o=bi(e,t,o),u.multiplyByScalar(o,S.EPSILON2,o),u.add(t,o,t))}function R2(e,t){const n=Math.abs(e.longitude),i=Math.abs(t.longitude);if(S.equalsEpsilon(n,S.PI,S.EPSILON11)){const o=S.sign(t.longitude);return e.longitude=o*(n-S.EPSILON11),1}else if(S.equalsEpsilon(i,S.PI,S.EPSILON11)){const o=S.sign(e.longitude);return t.longitude=o*(i-S.EPSILON11),2}return 0}const Gp=new oe,qp=new oe,Hp=new u,Rh=new u,jp=new u,Yp=new u,z2=new u,Xp=new u,L2=[Gp,qp],N2=new de,F2=new u,M2=new u,U2=new u,k2=new u,V2=new u,G2=new u,zh=new u,Lh=new u,q2=new u,H2=new u,j2=new u,$p=new u,Y2=new u,X2=new u,$2=new Qe,Z2=new Qe,Zp=new u,K2=new u,Kp=new u,Q2=[new te,new te],Qp=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Jp=Qp.length;function J2(e,t,n,i,o,a,r){let f,c;const h=t._ellipsoid,d=n.length/3-1,p=d*8,m=p*4,T=d*36,y=p>65535?new Uint32Array(T):new Uint16Array(T),w=new Float64Array(p*3),A=new Float32Array(m),E=new Float32Array(m),b=new Float32Array(m),D=new Float32Array(m),O=new Float32Array(m);let B,L,F,N;r&&(B=new Float32Array(m),L=new Float32Array(m),F=new Float32Array(m),N=new Float32Array(p*2));const U=a.length/2;let M=0;const j=Gp;j.height=0;const Y=qp;Y.height=0;let s=Hp,x=Rh;if(r)for(c=0,f=1;f<U;f++)j.latitude=a[c],j.longitude=a[c+1],Y.latitude=a[c+2],Y.longitude=a[c+3],s=t.project(j,s),x=t.project(Y,x),M+=u.distance(s,x),c+=2;const P=i.length/3;x=u.unpack(i,0,x);let z=0;for(c=3,f=1;f<P;f++)s=u.clone(x,s),x=u.unpack(i,c,x),z+=u.distance(s,x),c+=3;let H;c=3;let X=0,ee=0,K=0,ce=0,le=!1,we=u.unpack(n,0,Yp),Se=u.unpack(i,0,Rh),Ee=u.unpack(o,0,Xp);if(e){const Et=u.unpack(n,n.length-6,jp);Fp(Ee,Et,we,Se)&&(Ee=u.negate(Ee,Ee))}let Le=0,Ke=0,ct=0;for(f=0;f<d;f++){const Et=u.clone(we,jp),pn=u.clone(Se,Hp);let mn=u.clone(Ee,z2);le&&(mn=u.negate(mn,mn)),we=u.unpack(n,c,Yp),Se=u.unpack(i,c,Rh),Ee=u.unpack(o,c,Xp),le=Fp(Ee,Et,we,Se),j.latitude=a[X],j.longitude=a[X+1],Y.latitude=a[X+2],Y.longitude=a[X+3];let Yn,Ko,Zi,Ki;if(r){const Tt=R2(j,Y);Yn=t.project(j,V2),Ko=t.project(Y,G2);const Jo=bi(Ko,Yn,Zp);Jo.y=Math.abs(Jo.y),Zi=zh,Ki=Lh,Tt===0||u.dot(Jo,u.UNIT_Y)>Dp?(Zi=vs(t,j,mn,Yn,zh),Ki=vs(t,Y,Ee,Ko,Lh)):Tt===1?(Ki=vs(t,Y,Ee,Ko,Lh),Zi.x=0,Zi.y=S.sign(j.longitude-Math.abs(Y.longitude)),Zi.z=0):(Zi=vs(t,j,mn,Yn,zh),Ki.x=0,Ki.y=S.sign(j.longitude-Y.longitude),Ki.z=0)}const R0=u.distance(pn,Se),z0=Qe.fromCartesian(Et,$2),Ba=u.subtract(we,Et,q2),Vx=u.normalize(Ba,$p);let cr=u.subtract(pn,Et,H2);cr=u.normalize(cr,cr);let Qo=u.cross(Vx,cr,$p);Qo=u.normalize(Qo,Qo);let Ra=u.cross(cr,mn,Y2);Ra=u.normalize(Ra,Ra);let za=u.subtract(Se,we,j2);za=u.normalize(za,za);let La=u.cross(Ee,za,X2);La=u.normalize(La,La);const Gx=R0/z,qx=Le/z;let Tf=0,hr,Na,To,L0=0,N0=0;if(r){Tf=u.distance(Yn,Ko),hr=Qe.fromCartesian(Yn,Z2),Na=u.subtract(Ko,Yn,Zp),To=u.normalize(Na,K2);const Tt=To.x;To.x=To.y,To.y=-Tt,L0=Tf/M,N0=Ke/M}for(H=0;H<8;H++){const Tt=ce+H*4,Jo=ee+H*2,fr=Tt+3,M0=H<4?1:-1,Fa=H===2||H===3||H===6||H===7?1:-1;u.pack(z0.high,A,Tt),A[fr]=Ba.x,u.pack(z0.low,E,Tt),E[fr]=Ba.y,u.pack(Ra,b,Tt),b[fr]=Ba.z,u.pack(La,D,Tt),D[fr]=Gx*M0,u.pack(Qo,O,Tt);let yo=qx*Fa;yo===0&&Fa<0&&(yo=9),O[fr]=yo,r&&(B[Tt]=hr.high.x,B[Tt+1]=hr.high.y,B[Tt+2]=hr.low.x,B[Tt+3]=hr.low.y,F[Tt]=-Zi.y,F[Tt+1]=Zi.x,F[Tt+2]=Ki.y,F[Tt+3]=-Ki.x,L[Tt]=Na.x,L[Tt+1]=Na.y,L[Tt+2]=To.x,L[Tt+3]=To.y,N[Jo]=L0*M0,yo=N0*Fa,yo===0&&Fa<0&&(yo=9),N[Jo+1]=yo)}const Di=U2,Oi=k2,vi=F2,Wi=M2,Hx=de.fromCartographicArray(L2,N2),F0=Ve.getMinimumMaximumHeights(Hx,h),yf=F0.minimumTerrainHeight,Cf=F0.maximumTerrainHeight;ct+=Math.abs(yf),ct+=Math.abs(Cf),Vp(Et,pn,yf,Cf,Di,vi),Vp(we,Se,yf,Cf,Oi,Wi);let Pi=u.multiplyByScalar(Qo,S.EPSILON5,Kp);u.add(Di,Pi,Di),u.add(Oi,Pi,Oi),u.add(vi,Pi,vi),u.add(Wi,Pi,Wi),Aa(Di,Oi),Aa(vi,Wi),u.pack(Di,w,K),u.pack(Oi,w,K+3),u.pack(Wi,w,K+6),u.pack(vi,w,K+9),Pi=u.multiplyByScalar(Qo,-2*S.EPSILON5,Kp),u.add(Di,Pi,Di),u.add(Oi,Pi,Oi),u.add(vi,Pi,vi),u.add(Wi,Pi,Wi),Aa(Di,Oi),Aa(vi,Wi),u.pack(Di,w,K+12),u.pack(Oi,w,K+15),u.pack(Wi,w,K+18),u.pack(vi,w,K+21),X+=2,c+=3,ee+=16,K+=24,ce+=32,Le+=R0,Ke+=Tf}c=0;let gt=0;for(f=0;f<d;f++){for(H=0;H<Jp;H++)y[c+H]=Qp[H]+gt;gt+=8,c+=Jp}const Fe=Q2;te.fromVertices(n,u.ZERO,3,Fe[0]),te.fromVertices(i,u.ZERO,3,Fe[1]);const At=te.fromBoundingSpheres(Fe);At.radius+=ct/(d*2);const Wt={position:new Ft({componentDatatype:he.DOUBLE,componentsPerAttribute:3,normalize:!1,values:w}),startHiAndForwardOffsetX:Yi(A),startLoAndForwardOffsetY:Yi(E),startNormalAndForwardOffsetZ:Yi(b),endNormalAndTextureCoordinateNormalizationX:Yi(D),rightNormalAndTextureCoordinateNormalizationY:Yi(O)};return r&&(Wt.startHiLo2D=Yi(B),Wt.offsetAndRight2D=Yi(L),Wt.startEndNormals2D=Yi(F),Wt.texcoordNormalization2D=new Ft({componentDatatype:he.FLOAT,componentsPerAttribute:2,normalize:!1,values:N})),new mt({attributes:Wt,indices:y,boundingSphere:At})}function Yi(e){return new Ft({componentDatatype:he.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}ji._projectNormal=vs;const eE=`in vec4 v_startPlaneNormalEcAndHalfWidth;
|
|
4953
|
+
`)}}function GA(e,t){const n=t.context,i=e._primitive;let o=HC;o=e._primitive._batchTable.getVertexShaderCallback()(o),o=Pe._appendDistanceDisplayConditionToShader(i,o),o=Pe._modifyShaderPosition(e,o,t.scene3DOnly),o=Pe._updateColorAttribute(i,o);const a=e._hasPlanarExtentsAttributes,r=a||e._hasSphericalExtentsAttribute;e._extruded&&(o=VA(i,o));const f=e._extruded?"EXTRUDED_GEOMETRY":"";let c=new Ae({defines:[f],sources:[o]});const h=new Ae({sources:[jC]}),d=e._primitive._attributeLocations,p=new qt(r,a,e.appearance);if(e._spStencil=lt.replaceCache({context:n,shaderProgram:e._spStencil,vertexShaderSource:c,fragmentShaderSource:h,attributeLocations:d}),e._primitive.allowPicking){let y=Ae.createPickVertexShaderSource(o);y=Pe._appendShowToShader(i,y),y=Pe._updatePickColorAttribute(y);const w=p.createPickFragmentShader(!1),A=p.createPickVertexShader([f],y,!1,t.mapProjection);if(e._spPick=lt.replaceCache({context:n,shaderProgram:e._spPick,vertexShaderSource:A,fragmentShaderSource:w,attributeLocations:d}),r){let E=n.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!l(E)){const b=p.createPickFragmentShader(!0),D=p.createPickVertexShader([f],y,!0,t.mapProjection);E=n.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:D,fragmentShaderSource:b,attributeLocations:d})}e._spPick2D=E}}else e._spPick=lt.fromCache({context:n,vertexShaderSource:c,fragmentShaderSource:h,attributeLocations:d});o=Pe._appendShowToShader(i,o),c=new Ae({defines:[f],sources:[o]}),e._sp=lt.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:c,fragmentShaderSource:h,attributeLocations:d});const m=p.createFragmentShader(!1),T=p.createVertexShader([f],o,!1,t.mapProjection);if(e._spColor=lt.replaceCache({context:n,shaderProgram:e._spColor,vertexShaderSource:T,fragmentShaderSource:m,attributeLocations:d}),r){let y=n.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!l(y)){const w=p.createFragmentShader(!0),A=p.createVertexShader([f],o,!0,t.mapProjection);y=n.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:A,fragmentShaderSource:w,attributeLocations:d})}e._spColor2D=y}}function qA(e,t){const n=e._primitive;let i=n._va.length*2;t.length=i;let o,a,r,f=0,c=n._batchTable.getUniformMapCallback()(e._uniformMap);const h=e._needs2DShader;for(o=0;o<i;o+=2){const T=n._va[f++];a=t[o],l(a)||(a=t[o]=new et({owner:e,primitiveType:n._primitiveType})),a.vertexArray=T,a.renderState=e._rsStencilDepthPass,a.shaderProgram=e._sp,a.uniformMap=c,a.pass=Nt.TERRAIN_CLASSIFICATION,r=et.shallowClone(a,a.derivedCommands.tileset),r.renderState=e._rsStencilDepthPass3DTiles,r.pass=Nt.CESIUM_3D_TILE_CLASSIFICATION,a.derivedCommands.tileset=r,a=t[o+1],l(a)||(a=t[o+1]=new et({owner:e,primitiveType:n._primitiveType})),a.vertexArray=T,a.renderState=e._rsColorPass,a.shaderProgram=e._spColor,a.pass=Nt.TERRAIN_CLASSIFICATION;const w=e.appearance.material;if(l(w)&&(c=hn(c,w._uniforms)),a.uniformMap=c,r=et.shallowClone(a,a.derivedCommands.tileset),r.pass=Nt.CESIUM_3D_TILE_CLASSIFICATION,a.derivedCommands.tileset=r,h){let A=et.shallowClone(a,a.derivedCommands.appearance2D);A.shaderProgram=e._spColor2D,a.derivedCommands.appearance2D=A,A=et.shallowClone(r,r.derivedCommands.appearance2D),A.shaderProgram=e._spColor2D,r.derivedCommands.appearance2D=A}}const d=e._commandsIgnoreShow,p=e._spStencil;let m=0;i=d.length=i/2;for(let T=0;T<i;++T){const y=d[T]=et.shallowClone(t[m],d[T]);y.shaderProgram=p,y.pass=Nt.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,m+=2}}function HA(e,t){const n=e._usePickOffsets,i=e._primitive;let o=i._va.length*2,a,r=0,f;n&&(a=i._pickOffsets,o=a.length*2),t.length=o;let c,h,d,p=0;const m=i._batchTable.getUniformMapCallback()(e._uniformMap),T=e._needs2DShader;for(c=0;c<o;c+=2){let y=i._va[p++];if(n&&(f=a[r++],y=i._va[f.index]),h=t[c],l(h)||(h=t[c]=new et({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),h.vertexArray=y,h.renderState=e._rsStencilDepthPass,h.shaderProgram=e._sp,h.uniformMap=m,h.pass=Nt.TERRAIN_CLASSIFICATION,n&&(h.offset=f.offset,h.count=f.count),d=et.shallowClone(h,h.derivedCommands.tileset),d.renderState=e._rsStencilDepthPass3DTiles,d.pass=Nt.CESIUM_3D_TILE_CLASSIFICATION,h.derivedCommands.tileset=d,h=t[c+1],l(h)||(h=t[c+1]=new et({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),h.vertexArray=y,h.renderState=e._rsPickPass,h.shaderProgram=e._spPick,h.uniformMap=m,h.pass=Nt.TERRAIN_CLASSIFICATION,n&&(h.offset=f.offset,h.count=f.count),d=et.shallowClone(h,h.derivedCommands.tileset),d.pass=Nt.CESIUM_3D_TILE_CLASSIFICATION,h.derivedCommands.tileset=d,T){let w=et.shallowClone(h,h.derivedCommands.pick2D);w.shaderProgram=e._spPick2D,h.derivedCommands.pick2D=w,w=et.shallowClone(d,d.derivedCommands.pick2D),w.shaderProgram=e._spPick2D,d.derivedCommands.pick2D=w}}}function jA(e,t,n,i,o,a,r){qA(e,a),HA(e,r)}function Tp(e,t){return Math.floor(e%t/2)}function Eh(e,t,n,i,o,a){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,e.debugShowBoundingVolume=a,t.commandList.push(e)}function yp(e,t,n,i,o){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,t.commandList.push(e)}function YA(e,t,n,i,o,a,r,f){const c=e._primitive;Pe._updateBoundingVolumes(c,t,o);let h;t.mode===ye.SCENE3D?h=c._boundingSphereWC:t.mode===ye.COLUMBUS_VIEW?h=c._boundingSphereCV:t.mode===ye.SCENE2D&&l(c._boundingSphere2D)?h=c._boundingSphere2D:l(c._boundingSphereMorph)&&(h=c._boundingSphereMorph);const d=e.classificationType,p=d!==wi.CESIUM_3D_TILE,m=d!==wi.TERRAIN,T=t.passes;let y,w,A;if(T.render){const E=n.length;for(y=0;y<E;++y)w=h[Tp(y,E)],p&&(A=n[y],Eh(A,t,o,a,w,r)),m&&(A=n[y].derivedCommands.tileset,Eh(A,t,o,a,w,r));if(t.invertClassification){const b=e._commandsIgnoreShow,D=b.length;for(y=0;y<D;++y)w=h[y],A=b[y],Eh(A,t,o,a,w,r)}}if(T.pick){const E=i.length,b=c._pickOffsets;for(y=0;y<E;++y){const D=b[Tp(y,E)];w=h[D.index],p&&(A=i[y],yp(A,t,o,a,w)),m&&(A=i[y].derivedCommands.tileset,yp(A,t,o,a,w))}}}Hi.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;let t=this.appearance;l(t)&&l(t.material)&&t.material.update(e.context);const n=this,i=this._primitiveOptions;if(!l(this._primitive)){const o=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],a=o.length;let r,f,c,h=!1,d=!0,p,m=!1,T=!1;for(a>0&&(c=o[0].attributes,m=qt.hasAttributesForSphericalExtents(c),T=qt.hasAttributesForTextureCoordinatePlanes(c),p=c.color),r=0;r<a;r++){f=o[r];const w=f.attributes.color;if(l(w))h=!0;else if(h)throw new C("All GeometryInstances must have color attributes to use per-instance color.");d=d&&l(w)&&Lo.equals(p,w)}if(!d&&!m&&!T)throw new C("All GeometryInstances must have the same color attribute except via GroundPrimitives");if(h&&!l(t)&&(t=new Kt({flat:!0}),this.appearance=t),!h&&t instanceof Kt)throw new C("PerInstanceColorAppearance requires color GeometryInstanceAttributes on all GeometryInstances");if(l(t.material)&&!m&&!T)throw new C("Materials on ClassificationPrimitives are not supported except via GroundPrimitives");this._usePickOffsets=!m&&!T,this._hasSphericalExtentsAttribute=m,this._hasPlanarExtentsAttributes=T,this._hasPerColorAttribute=h;const y=new Array(a);for(r=0;r<a;++r)f=o[r],y[r]=new na({geometry:f.geometry,attributes:f.attributes,modelMatrix:f.modelMatrix,id:f.id,pickPrimitive:g(this._pickPrimitive,n)});i.appearance=t,i.geometryInstances=y,l(this._createBoundingVolumeFunction)&&(i._createBoundingVolumeFunction=function(w,A){n._createBoundingVolumeFunction(w,A)}),i._createRenderStatesFunction=function(w,A,E,b){kA(n)},i._createShaderProgramFunction=function(w,A,E){GA(n,A)},i._createCommandsFunction=function(w,A,E,b,D,O,B){jA(n,void 0,void 0,!0,!1,O,B)},l(this._updateAndQueueCommandsFunction)?i._updateAndQueueCommandsFunction=function(w,A,E,b,D,O,B,L){n._updateAndQueueCommandsFunction(w,A,E,b,D,O,B,L)}:i._updateAndQueueCommandsFunction=function(w,A,E,b,D,O,B,L){YA(n,A,E,b,D,O,B)},this._primitive=new Pe(i)}if(this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=je.fromCache(jo(!1,!1)),this._rsStencilDepthPass3DTiles=je.fromCache(jo(!1,!0)),this._rsColorPass=je.fromCache(Ah(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=je.fromCache(jo(!0,!1)),this._rsStencilDepthPass3DTiles=je.fromCache(jo(!0,!0)),this._rsColorPass=je.fromCache(Ah(!0))),this._primitive.appearance!==t){if(!this._hasSphericalExtentsAttribute&&!this._hasPlanarExtentsAttributes&&l(t.material))throw new C("Materials on ClassificationPrimitives are not supported except via GroundPrimitive");if(!this._hasPerColorAttribute&&t instanceof Kt)throw new C("PerInstanceColorAppearance requires color GeometryInstanceAttribute");this._primitive.appearance=t}this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})},Hi.prototype.getGeometryInstanceAttributes=function(e){if(!l(this._primitive))throw new C("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},Hi.prototype.isDestroyed=function(){return!1},Hi.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._spColor=this._spColor&&this._spColor.destroy(),this._spPick2D=void 0,this._spColor2D=void 0,st(this)};const XA={u_globeMinimumAltitude:function(){return 55e3}};function un(e){e=g(e,g.EMPTY_OBJECT);let t=e.appearance;const n=e.geometryInstances;if(!l(t)&&l(n)){const o=Array.isArray(n)?n:[n],a=o.length;for(let r=0;r<a;r++){const f=o[r].attributes;if(l(f)&&l(f.color)){t=new Kt({flat:!0});break}}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=g(e.show,!0),this.classificationType=g(e.classificationType,wi.BOTH),this.debugShowBoundingVolume=g(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=g(e.debugShowShadowVolume,!1),this._boundingVolumes=[],this._boundingVolumes2D=[],this._ready=!1,this._primitive=void 0,this._maxHeight=void 0,this._minHeight=void 0,this._maxTerrainHeight=Ve._defaultMaxTerrainHeight,this._minTerrainHeight=Ve._defaultMinTerrainHeight,this._boundingSpheresKeys=[],this._boundingSpheres=[],this._useFragmentCulling=!1,this._zIndex=void 0;const i=this;this._classificationPrimitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:g(e.vertexCacheOptimize,!1),interleave:g(e.interleave,!1),releaseGeometryInstances:g(e.releaseGeometryInstances,!0),allowPicking:g(e.allowPicking,!0),asynchronous:g(e.asynchronous,!0),compressVertices:g(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_updateAndQueueCommandsFunction:void 0,_pickPrimitive:i,_extruded:!0,_uniformMap:XA}}Object.defineProperties(un.prototype,{vertexCacheOptimize:{get:function(){return this._classificationPrimitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._classificationPrimitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._classificationPrimitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._classificationPrimitiveOptions.allowPicking}},asynchronous:{get:function(){return this._classificationPrimitiveOptions.asynchronous}},compressVertices:{get:function(){return this._classificationPrimitiveOptions.compressVertices}},ready:{get:function(){return this._ready}}}),un.isSupported=Hi.isSupported;function Cp(e){return function(t,n){const i=n.maximumRadius,o=i/Math.cos(t*.5)-i;return e._maxHeight+o}}function wp(e){return function(t,n){return e._minHeight}}const $A=new u,ZA=new u,KA=new u,QA=new oe,JA=new de;function Ta(e,t){const n=e.mapProjection.ellipsoid;if(!l(t.attributes)||!l(t.attributes.position3DHigh))return l(t.rectangle)?t.rectangle:void 0;const i=t.attributes.position3DHigh.values,o=t.attributes.position3DLow.values,a=i.length;let r=Number.POSITIVE_INFINITY,f=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY;for(let p=0;p<a;p+=3){const m=u.unpack(i,p,$A),T=u.unpack(o,p,ZA),y=u.add(m,T,KA),w=n.cartesianToCartographic(y,QA),A=w.latitude,E=w.longitude;r=Math.min(r,A),f=Math.min(f,E),c=Math.max(c,A),h=Math.max(h,E)}const d=JA;return d.north=c,d.south=r,d.east=h,d.west=f,d}function e2(e,t,n){const i=Ve.getMinimumMaximumHeights(t,n);e._minTerrainHeight=i.minimumTerrainHeight,e._maxTerrainHeight=i.maximumTerrainHeight}function t2(e,t,n){const i=t.mapProjection.ellipsoid,o=Ta(t,n),a=ze.fromRectangle(o,e._minHeight,e._maxHeight,i);if(e._boundingVolumes.push(a),!t.scene3DOnly){const r=t.mapProjection,f=te.fromRectangleWithHeights2D(o,r,e._maxHeight,e._minHeight);u.fromElements(f.center.z,f.center.x,f.center.y,f.center),e._boundingVolumes2D.push(f)}}function bh(e,t){return Math.floor(e%t/2)}function xh(e,t,n,i,o,a,r){const f=e._primitive;n.mode!==ye.SCENE3D&&t.shaderProgram===f._spColor&&f._needs2DShader&&(t=t.derivedCommands.appearance2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=a,t.cull=o,t.debugShowBoundingVolume=r,n.commandList.push(t)}function Ap(e,t,n,i,o,a){const r=e._primitive;n.mode!==ye.SCENE3D&&t.shaderProgram===r._spPick&&r._needs2DShader&&(t=t.derivedCommands.pick2D),t.owner=e,t.modelMatrix=i,t.boundingVolume=a,t.cull=o,n.commandList.push(t)}function n2(e,t,n,i,o,a,r,f){let c;t.mode===ye.SCENE3D?c=e._boundingVolumes:c=e._boundingVolumes2D;const h=e.classificationType,d=h!==wi.CESIUM_3D_TILE,p=h!==wi.TERRAIN,m=t.passes,T=e._primitive;let y,w,A;if(m.render){const E=n.length;for(y=0;y<E;++y)w=c[bh(y,E)],d&&(A=n[y],xh(e,A,t,o,a,w,r)),p&&(A=n[y].derivedCommands.tileset,xh(e,A,t,o,a,w,r));if(t.invertClassification){const b=T._commandsIgnoreShow,D=b.length;for(y=0;y<D;++y)w=c[y],A=b[y],xh(e,A,t,o,a,w,r)}}if(m.pick){const E=i.length;let b;for(e._useFragmentCulling||(b=T._primitive._pickOffsets),y=0;y<E;++y){if(w=c[bh(y,E)],!e._useFragmentCulling){const D=b[bh(y,E)];w=c[D.index]}d&&(A=i[y],Ap(e,A,t,o,a,w)),p&&(A=i[y].derivedCommands.tileset,Ap(e,A,t,o,a,w))}}}un.initializeTerrainHeights=function(){return Ve.initialize()},un.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;if(!Ve.initialized){if(!this.asynchronous)throw new C("For synchronous GroundPrimitives, you must call GroundPrimitive.initializeTerrainHeights() and wait for the returned promise to resolve.");un.initializeTerrainHeights();return}const t=this,n=this._classificationPrimitiveOptions;if(!l(this._primitive)){const i=e.mapProjection.ellipsoid;let o,a,r;const f=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],c=f.length,h=new Array(c);let d,p;for(d=0;d<c;++d){o=f[d],a=o.geometry;const w=Ta(e,a);l(p)?l(w)&&de.union(p,w,p):p=de.clone(w);const A=o.id;if(l(A)&&l(w)){const E=Ve.getBoundingSphere(w,i);this._boundingSpheresKeys.push(A),this._boundingSpheres.push(E)}if(r=a.constructor,!l(r)||!l(r.createShadowVolume))throw new C("Not all of the geometry instances have GroundPrimitive support.")}e2(this,p,i);const m=e.verticalExaggeration,T=e.verticalExaggerationRelativeHeight;this._minHeight=ws.getHeight(this._minTerrainHeight,m,T),this._maxHeight=ws.getHeight(this._maxTerrainHeight,m,T);const y=un._supportsMaterials(e.context);if(this._useFragmentCulling=y,y){let w,A=!0;for(d=0;d<c;++d)if(o=f[d],a=o.geometry,p=Ta(e,a),qt.shouldUseSphericalCoordinates(p)){A=!1;break}for(d=0;d<c;++d){o=f[d],a=o.geometry,r=a.constructor;const E=Ta(e,a),b=a.textureCoordinateRotationPoints;A?w=qt.getPlanarTextureCoordinateAttributes(E,b,i,e.mapProjection,this._maxHeight):w=qt.getSphericalExtentGeometryInstanceAttributes(E,b,i,e.mapProjection);const D=o.attributes;for(const O in D)D.hasOwnProperty(O)&&(w[O]=D[O]);h[d]=new na({geometry:r.createShadowVolume(a,wp(this),Cp(this)),attributes:w,id:o.id})}}else for(d=0;d<c;++d)o=f[d],a=o.geometry,r=a.constructor,h[d]=new na({geometry:r.createShadowVolume(a,wp(this),Cp(this)),attributes:o.attributes,id:o.id});n.geometryInstances=h,n.appearance=this.appearance,n._createBoundingVolumeFunction=function(w,A){t2(t,w,A)},n._updateAndQueueCommandsFunction=function(w,A,E,b,D,O,B,L){n2(t,A,E,b,D,O,B)},this._primitive=new Hi(n)}this._primitive.appearance=this.appearance,this._primitive.show=this.show,this._primitive.debugShowShadowVolume=this.debugShowShadowVolume,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e),e.afterRender.push(()=>{!this._ready&&l(this._primitive)&&this._primitive.ready&&(this._ready=!0,this.releaseGeometryInstances&&(this.geometryInstances=void 0))})},un.prototype.getBoundingSphere=function(e){const t=this._boundingSpheresKeys.indexOf(e);if(t!==-1)return this._boundingSpheres[t]},un.prototype.getGeometryInstanceAttributes=function(e){if(!l(this._primitive))throw new C("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},un.prototype.isDestroyed=function(){return!1},un.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),st(this)},un._supportsMaterials=function(e){return e.depthTexture},un.supportsMaterials=function(e){return _.typeOf.object("scene",e),un._supportsMaterials(e.frameState.context)};const ai=Object.freeze({NONE:0,GEODESIC:1,RHUMB:2}),Ep=S.EPSILON10;function i2(e,t,n,i){if(_.defined("equalsEpsilon",t),!l(e))return;n=g(n,!1);const o=l(i),a=e.length;if(a<2)return e;let r,f=e[0],c,h,d=0,p=-1;for(r=1;r<a;++r)c=e[r],t(f,c,Ep)?(l(h)||(h=e.slice(0,r),d=r-1,p=0),o&&i.push(r)):(l(h)&&(h.push(c),d=r,o&&(p=i.length)),f=c);return n&&t(e[0],e[a-1],Ep)&&(o&&(l(h)?i.splice(p,0,d):i.push(a-1)),l(h)?h.length-=1:h=e.slice(0,-1)),l(h)?h:e}function o2(e){const t=e._uSquared,n=e._ellipsoid.maximumRadius,i=e._ellipsoid.minimumRadius,o=(n-i)/n,a=Math.cos(e._startHeading),r=Math.sin(e._startHeading),f=(1-o)*Math.tan(e._start.latitude),c=1/Math.sqrt(1+f*f),h=c*f,d=Math.atan2(f,a),p=c*r,m=p*p,T=1-m,y=Math.sqrt(T),w=t/4,A=w*w,E=A*w,b=A*A,D=1+w-3*A/4+5*E/4-175*b/64,O=1-w+15*A/8-35*E/8,B=1-3*w+35*A/4,L=1-5*w,F=D*d-O*Math.sin(2*d)*w/2-B*Math.sin(4*d)*A/16-L*Math.sin(6*d)*E/48-Math.sin(8*d)*5*b/512,N=e._constants;N.a=n,N.b=i,N.f=o,N.cosineHeading=a,N.sineHeading=r,N.tanU=f,N.cosineU=c,N.sineU=h,N.sigma=d,N.sineAlpha=p,N.sineSquaredAlpha=m,N.cosineSquaredAlpha=T,N.cosineAlpha=y,N.u2Over4=w,N.u4Over16=A,N.u6Over64=E,N.u8Over256=b,N.a0=D,N.a1=O,N.a2=B,N.a3=L,N.distanceRatio=F}function s2(e,t){return e*t*(4+e*(4-3*t))/16}function bp(e,t,n,i,o,a,r){const f=s2(e,n);return(1-f)*e*t*(i+f*o*(r+f*a*(2*r*r-1)))}function r2(e,t,n,i,o,a,r){const f=(t-n)/t,c=a-i,h=Math.atan((1-f)*Math.tan(o)),d=Math.atan((1-f)*Math.tan(r)),p=Math.cos(h),m=Math.sin(h),T=Math.cos(d),y=Math.sin(d),w=p*T,A=p*y,E=m*y,b=m*T;let D=c,O=S.TWO_PI,B=Math.cos(D),L=Math.sin(D),F,N,U,M,j;do{B=Math.cos(D),L=Math.sin(D);const K=A-b*B;U=Math.sqrt(T*T*L*L+K*K),N=E+w*B,F=Math.atan2(U,N);let ce;U===0?(ce=0,M=1):(ce=w*L/U,M=1-ce*ce),O=D,j=N-2*E/M,isFinite(j)||(j=0),D=c+bp(f,ce,M,F,U,N,j)}while(Math.abs(D-O)>S.EPSILON12);const Y=M*(t*t-n*n)/(n*n),s=1+Y*(4096+Y*(Y*(320-175*Y)-768))/16384,x=Y*(256+Y*(Y*(74-47*Y)-128))/1024,P=j*j,z=x*U*(j+x*(N*(2*P-1)-x*j*(4*U*U-3)*(4*P-3)/6)/4),H=n*s*(F-z),X=Math.atan2(T*L,A-b*B),ee=Math.atan2(p*L,A*B-b);e._distance=H,e._startHeading=X,e._endHeading=ee,e._uSquared=Y}const a2=new u,Sh=new u;function xp(e,t,n,i){const o=u.normalize(i.cartographicToCartesian(t,Sh),a2),a=u.normalize(i.cartographicToCartesian(n,Sh),Sh);_.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(u.angleBetween(o,a))-Math.PI),.0125),r2(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=oe.clone(t,e._start),e._end=oe.clone(n,e._end),e._start.height=0,e._end.height=0,o2(e)}function Os(e,t,n){const i=g(n,pe.default);this._ellipsoid=i,this._start=new oe,this._end=new oe,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&xp(this,e,t,i)}Object.defineProperties(Os.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return _.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return _.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return _.defined("distance",this._distance),this._endHeading}}}),Os.prototype.setEndPoints=function(e,t){_.defined("start",e),_.defined("end",t),xp(this,e,t,this._ellipsoid)},Os.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},Os.prototype.interpolateUsingSurfaceDistance=function(e,t){_.defined("distance",this._distance);const n=this._constants,i=n.distanceRatio+e/n.b,o=Math.cos(2*i),a=Math.cos(4*i),r=Math.cos(6*i),f=Math.sin(2*i),c=Math.sin(4*i),h=Math.sin(6*i),d=Math.sin(8*i),p=i*i,m=i*p,T=n.u8Over256,y=n.u2Over4,w=n.u6Over64,A=n.u4Over16;let E=2*m*T*o/3+i*(1-y+7*A/4-15*w/4+579*T/64-(A-15*w/4+187*T/16)*o-(5*w/4-115*T/16)*a-29*T*r/16)+(y/2-A+71*w/32-85*T/16)*f+(5*A/16-5*w/4+383*T/96)*c-p*((w-11*T/2)*f+5*T*c/2)+(29*w/96-29*T/16)*h+539*T*d/1536;const b=Math.asin(Math.sin(E)*n.cosineAlpha),D=Math.atan(n.a/n.b*Math.tan(b));E=E-n.sigma;const O=Math.cos(2*n.sigma+E),B=Math.sin(E),L=Math.cos(E),F=n.cosineU*L,N=n.sineU*B,M=Math.atan2(B*n.sineHeading,F-N*n.cosineHeading)-bp(n.f,n.sineAlpha,n.cosineSquaredAlpha,E,B,L,O);return l(t)?(t.longitude=this._start.longitude+M,t.latitude=D,t.height=0,t):new oe(this._start.longitude+M,D,0)};function Ih(e,t,n){if(e===0)return t*n;const i=e*e,o=i*i,a=o*i,r=a*i,f=r*i,c=f*i,h=n,d=Math.sin(2*h),p=Math.sin(4*h),m=Math.sin(6*h),T=Math.sin(8*h),y=Math.sin(10*h),w=Math.sin(12*h);return t*((1-i/4-3*o/64-5*a/256-175*r/16384-441*f/65536-4851*c/1048576)*h-(3*i/8+3*o/32+45*a/1024+105*r/4096+2205*f/131072+6237*c/524288)*d+(15*o/256+45*a/1024+525*r/16384+1575*f/65536+155925*c/8388608)*p-(35*a/3072+175*r/12288+3675*f/262144+13475*c/1048576)*m+(315*r/131072+2205*f/524288+43659*c/8388608)*T-(693*f/1310720+6237*c/5242880)*y+1001*c/8388608*w)}function c2(e,t,n){const i=e/n;if(t===0)return i;const o=i*i,a=o*i,r=a*i,f=t,c=f*f,h=c*c,d=h*c,p=d*c,m=p*c,T=m*c,y=Math.sin(2*i),w=Math.cos(2*i),A=Math.sin(4*i),E=Math.cos(4*i),b=Math.sin(6*i),D=Math.cos(6*i),O=Math.sin(8*i),B=Math.cos(8*i),L=Math.sin(10*i),F=Math.cos(10*i),N=Math.sin(12*i);return i+i*c/4+7*i*h/64+15*i*d/256+579*i*p/16384+1515*i*m/65536+16837*i*T/1048576+(3*i*h/16+45*i*d/256-i*(32*o-561)*p/4096-i*(232*o-1677)*m/16384+i*(399985-90560*o+512*r)*T/5242880)*w+(21*i*d/256+483*i*p/4096-i*(224*o-1969)*m/16384-i*(33152*o-112599)*T/1048576)*E+(151*i*p/4096+4681*i*m/65536+1479*i*T/16384-453*a*T/32768)*D+(1097*i*m/65536+42783*i*T/1048576)*B+8011*i*T/1048576*F+(3*c/8+3*h/16+213*d/2048-3*o*d/64+255*p/4096-33*o*p/512+20861*m/524288-33*o*m/512+r*m/1024+28273*T/1048576-471*o*T/8192+9*r*T/4096)*y+(21*h/256+21*d/256+533*p/8192-21*o*p/512+197*m/4096-315*o*m/4096+584039*T/16777216-12517*o*T/131072+7*r*T/2048)*A+(151*d/6144+151*p/4096+5019*m/131072-453*o*m/16384+26965*T/786432-8607*o*T/131072)*b+(1097*p/131072+1097*m/65536+225797*T/10485760-1097*o*T/65536)*O+(8011*m/2621440+8011*T/1048576)*L+293393*T/251658240*N}function Yo(e,t){if(e===0)return Math.log(Math.tan(.5*(S.PI_OVER_TWO+t)));const n=e*Math.sin(t);return Math.log(Math.tan(.5*(S.PI_OVER_TWO+t)))-e/2*Math.log((1+n)/(1-n))}function h2(e,t,n,i,o){const a=Yo(e._ellipticity,n),r=Yo(e._ellipticity,o);return Math.atan2(S.negativePiToPi(i-t),r-a)}function f2(e,t,n,i,o,a,r){const f=e._heading,c=a-i;let h=0;if(S.equalsEpsilon(Math.abs(f),S.PI_OVER_TWO,S.EPSILON8))if(t===n)h=t*Math.cos(o)*S.negativePiToPi(c);else{const d=Math.sin(o);h=t*Math.cos(o)*S.negativePiToPi(c)/Math.sqrt(1-e._ellipticitySquared*d*d)}else{const d=Ih(e._ellipticity,t,o);h=(Ih(e._ellipticity,t,r)-d)/Math.cos(f)}return Math.abs(h)}const l2=new u,Dh=new u;function Sp(e,t,n,i){const o=u.normalize(i.cartographicToCartesian(t,Dh),l2),a=u.normalize(i.cartographicToCartesian(n,Dh),Dh);_.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(u.angleBetween(o,a))-Math.PI),.0125);const r=i.maximumRadius,f=i.minimumRadius,c=r*r,h=f*f;e._ellipticitySquared=(c-h)/c,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=oe.clone(t,e._start),e._start.height=0,e._end=oe.clone(n,e._end),e._end.height=0,e._heading=h2(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=f2(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function Ip(e,t,n,i,o,a){if(n===0)return oe.clone(e,a);const r=o*o;let f,c,h;if(Math.abs(S.PI_OVER_TWO-Math.abs(t))>S.EPSILON8){const d=Ih(o,i,e.latitude),p=n*Math.cos(t),m=d+p;if(c=c2(m,o,i),Math.abs(t)<S.EPSILON10)f=S.negativePiToPi(e.longitude);else{const T=Yo(o,e.latitude),y=Yo(o,c);h=Math.tan(t)*(y-T),f=S.negativePiToPi(e.longitude+h)}}else{c=e.latitude;let d;if(o===0)d=i*Math.cos(e.latitude);else{const p=Math.sin(e.latitude);d=i*Math.cos(e.latitude)/Math.sqrt(1-r*p*p)}h=n/d,t>0?f=S.negativePiToPi(e.longitude+h):f=S.negativePiToPi(e.longitude-h)}return l(a)?(a.longitude=f,a.latitude=c,a.height=0,a):new oe(f,c,0)}function ci(e,t,n){const i=g(n,pe.default);this._ellipsoid=i,this._start=new oe,this._end=new oe,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&Sp(this,e,t,i)}Object.defineProperties(ci.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return _.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return _.defined("distance",this._distance),this._heading}}}),ci.fromStartHeadingDistance=function(e,t,n,i,o){_.defined("start",e),_.defined("heading",t),_.defined("distance",n),_.typeOf.number.greaterThan("distance",n,0);const a=g(i,pe.default),r=a.maximumRadius,f=a.minimumRadius,c=r*r,h=f*f,d=Math.sqrt((c-h)/c);t=S.negativePiToPi(t);const p=Ip(e,t,n,a.maximumRadius,d);return!l(o)||l(i)&&!i.equals(o.ellipsoid)?new ci(e,p,a):(o.setEndPoints(e,p),o)},ci.prototype.setEndPoints=function(e,t){_.defined("start",e),_.defined("end",t),Sp(this,e,t,this._ellipsoid)},ci.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)},ci.prototype.interpolateUsingSurfaceDistance=function(e,t){if(_.typeOf.number("distance",e),!l(this._distance)||this._distance===0)throw new C("EllipsoidRhumbLine must have distinct start and end set.");return Ip(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)},ci.prototype.findIntersectionWithLongitude=function(e,t){if(_.typeOf.number("intersectionLongitude",e),!l(this._distance)||this._distance===0)throw new C("EllipsoidRhumbLine must have distinct start and end set.");const n=this._ellipticity,i=this._heading,o=Math.abs(i),a=this._start;if(e=S.negativePiToPi(e),S.equalsEpsilon(Math.abs(e),Math.PI,S.EPSILON14)&&(e=S.sign(a.longitude)*Math.PI),l(t)||(t=new oe),Math.abs(S.PI_OVER_TWO-o)<=S.EPSILON8)return t.longitude=e,t.latitude=a.latitude,t.height=0,t;if(S.equalsEpsilon(Math.abs(S.PI_OVER_TWO-o),S.PI_OVER_TWO,S.EPSILON8))return S.equalsEpsilon(e,a.longitude,S.EPSILON12)?void 0:(t.longitude=e,t.latitude=S.PI_OVER_TWO*S.sign(S.PI_OVER_TWO-i),t.height=0,t);const r=a.latitude,f=n*Math.sin(r),c=Math.tan(.5*(S.PI_OVER_TWO+r))*Math.exp((e-a.longitude)/Math.tan(i)),h=(1+f)/(1-f);let d=a.latitude,p;do{p=d;const m=n*Math.sin(p),T=(1+m)/(1-m);d=2*Math.atan(c*Math.pow(T/h,n/2))-S.PI_OVER_TWO}while(!S.equalsEpsilon(d,p,S.EPSILON12));return t.longitude=e,t.latitude=d,t.height=0,t},ci.prototype.findIntersectionWithLatitude=function(e,t){if(_.typeOf.number("intersectionLatitude",e),!l(this._distance)||this._distance===0)throw new C("EllipsoidRhumbLine must have distinct start and end set.");const n=this._ellipticity,i=this._heading,o=this._start;if(S.equalsEpsilon(Math.abs(i),S.PI_OVER_TWO,S.EPSILON8))return;const a=Yo(n,o.latitude),r=Yo(n,e),f=Math.tan(i)*(r-a),c=S.negativePiToPi(o.longitude+f);return l(t)?(t.longitude=c,t.latitude=e,t.height=0,t):new oe(c,e,0)};const Oh=[Wn,on],u2=Oh.length,Dp=Math.cos(S.toRadians(30)),Op=Math.cos(S.toRadians(150)),vp=0,Wp=1e3;function ji(e){e=g(e,g.EMPTY_OBJECT);const t=e.positions;if(!l(t)||t.length<2)throw new C("At least two positions are required.");if(l(e.arcType)&&e.arcType!==ai.GEODESIC&&e.arcType!==ai.RHUMB)throw new C("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=g(e.width,1),this._positions=t,this.granularity=g(e.granularity,9999),this.loop=g(e.loop,!1),this.arcType=g(e.arcType,ai.GEODESIC),this._ellipsoid=pe.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ji.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+pe.packedLength+1+1}}}),ji.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;i<u2;i++)if(t instanceof Oh[i]){n=i;break}e._projectionIndex=n,e._ellipsoid=t.ellipsoid};const d2=new u,Pp=new u,Bp=new u;function vh(e,t,n,i,o){const a=sn(i,e,0,d2),r=sn(i,e,n,Pp),f=sn(i,t,0,Bp),c=bi(r,a,Pp),h=bi(f,a,Bp);return u.cross(h,c,o),u.normalize(o,o)}const p2=new oe,m2=new u,_2=new u,g2=new u;function Wh(e,t,n,i,o,a,r,f,c,h,d){if(o===0)return;let p;a===ai.GEODESIC?p=new Os(e,t,r):a===ai.RHUMB&&(p=new ci(e,t,r));const m=p.surfaceDistance;if(m<o)return;const T=vh(e,t,i,r,g2),y=Math.ceil(m/o),w=m/y;let A=w;const E=y-1;let b=f.length;for(let D=0;D<E;D++){const O=p.interpolateUsingSurfaceDistance(A,p2),B=sn(r,O,n,m2),L=sn(r,O,i,_2);u.pack(T,f,b),u.pack(B,c,b),u.pack(L,h,b),d.push(O.latitude),d.push(O.longitude),b+=3,A+=w}}const Ph=new oe;function sn(e,t,n,i){return oe.clone(t,Ph),Ph.height=n,oe.toCartesian(Ph,e,i)}ji.pack=function(e,t,n){_.typeOf.object("value",e),_.defined("array",t);let i=g(n,0);const o=e._positions,a=o.length;t[i++]=a;for(let r=0;r<a;++r){const f=o[r];u.pack(f,t,i),i+=3}return t[i++]=e.granularity,t[i++]=e.loop?1:0,t[i++]=e.arcType,pe.pack(e._ellipsoid,t,i),i+=pe.packedLength,t[i++]=e._projectionIndex,t[i++]=e._scene3DOnly?1:0,t},ji.unpack=function(e,t,n){_.defined("array",e);let i=g(t,0);const o=e[i++],a=new Array(o);for(let m=0;m<o;m++)a[m]=u.unpack(e,i),i+=3;const r=e[i++],f=e[i++]===1,c=e[i++],h=pe.unpack(e,i);i+=pe.packedLength;const d=e[i++],p=e[i++]===1;return l(n)||(n=new ji({positions:a})),n._positions=a,n.granularity=r,n.loop=f,n.arcType=c,n._ellipsoid=h,n._projectionIndex=d,n._scene3DOnly=p,n};function bi(e,t,n){return u.subtract(e,t,n),u.normalize(n,n),n}function Rp(e,t,n,i){return i=bi(e,t,i),i=u.cross(i,n,i),i=u.normalize(i,i),i=u.cross(n,i,i),i}const T2=new u,y2=new u,C2=new u,zp=new u,w2=0,A2=-1;function Bh(e,t,n,i,o){const a=bi(n,t,zp),r=Rp(e,t,a,T2),f=Rp(i,t,a,y2);if(S.equalsEpsilon(u.dot(r,f),A2,S.EPSILON5))return o=u.cross(a,r,o),o=u.normalize(o,o),o;o=u.add(f,r,o),o=u.normalize(o,o);const c=u.cross(a,o,C2);return u.dot(f,c)<w2&&(o=u.negate(o,o)),o}const ya=Me.fromPointNormal(u.ZERO,u.UNIT_Y),E2=new u,b2=new u,x2=new u,S2=new u,I2=new u,Ca=new u,wa=new oe,Lp=new oe,Np=new oe;ji.createGeometry=function(e){const t=!e._scene3DOnly;let n=e.loop;const i=e._ellipsoid,o=e.granularity,a=e.arcType,r=new Oh[e._projectionIndex](i),f=vp,c=Wp;let h,d;const p=e._positions,m=p.length;m===2&&(n=!1);let T,y,w,A;const E=new ci(void 0,void 0,i);let b,D,O;const B=[p[0]];for(d=0;d<m-1;d++)T=p[d],y=p[d+1],b=Ue.lineSegmentPlane(T,y,ya,Ca),l(b)&&!u.equalsEpsilon(b,T,S.EPSILON7)&&!u.equalsEpsilon(b,y,S.EPSILON7)&&(e.arcType===ai.GEODESIC?B.push(u.clone(b)):e.arcType===ai.RHUMB&&(O=i.cartesianToCartographic(b,wa).longitude,w=i.cartesianToCartographic(T,wa),A=i.cartesianToCartographic(y,Lp),E.setEndPoints(w,A),D=E.findIntersectionWithLongitude(O,Np),b=i.cartographicToCartesian(D,Ca),l(b)&&!u.equalsEpsilon(b,T,S.EPSILON7)&&!u.equalsEpsilon(b,y,S.EPSILON7)&&B.push(u.clone(b)))),B.push(y);n&&(T=p[m-1],y=p[0],b=Ue.lineSegmentPlane(T,y,ya,Ca),l(b)&&!u.equalsEpsilon(b,T,S.EPSILON7)&&!u.equalsEpsilon(b,y,S.EPSILON7)&&(e.arcType===ai.GEODESIC?B.push(u.clone(b)):e.arcType===ai.RHUMB&&(O=i.cartesianToCartographic(b,wa).longitude,w=i.cartesianToCartographic(T,wa),A=i.cartesianToCartographic(y,Lp),E.setEndPoints(w,A),D=E.findIntersectionWithLongitude(O,Np),b=i.cartographicToCartesian(D,Ca),l(b)&&!u.equalsEpsilon(b,T,S.EPSILON7)&&!u.equalsEpsilon(b,y,S.EPSILON7)&&B.push(u.clone(b)))));let L=B.length,F=new Array(L);for(d=0;d<L;d++){const le=oe.fromCartesian(B[d],i);le.height=0,F[d]=le}if(F=i2(F,oe.equalsEpsilon),L=F.length,L<2)return;const N=[],U=[],M=[],j=[];let Y=E2,s=b2,x=x2,P=S2,z=I2;const H=F[0],X=F[1],ee=F[L-1];for(Y=sn(i,ee,f,Y),P=sn(i,X,f,P),s=sn(i,H,f,s),x=sn(i,H,c,x),n?z=Bh(Y,s,x,P,z):z=vh(H,X,c,i,z),u.pack(z,U,0),u.pack(s,M,0),u.pack(x,j,0),N.push(H.latitude),N.push(H.longitude),Wh(H,X,f,c,o,a,i,U,M,j,N),d=1;d<L-1;++d){Y=u.clone(s,Y),s=u.clone(P,s);const le=F[d];sn(i,le,c,x),sn(i,F[d+1],f,P),Bh(Y,s,x,P,z),h=U.length,u.pack(z,U,h),u.pack(s,M,h),u.pack(x,j,h),N.push(le.latitude),N.push(le.longitude),Wh(F[d],F[d+1],f,c,o,a,i,U,M,j,N)}const K=F[L-1],ce=F[L-2];if(s=sn(i,K,f,s),x=sn(i,K,c,x),n){const le=F[0];Y=sn(i,ce,f,Y),P=sn(i,le,f,P),z=Bh(Y,s,x,P,z)}else z=vh(ce,K,c,i,z);if(h=U.length,u.pack(z,U,h),u.pack(s,M,h),u.pack(x,j,h),N.push(K.latitude),N.push(K.longitude),n){for(Wh(K,H,f,c,o,a,i,U,M,j,N),h=U.length,d=0;d<3;++d)U[h+d]=U[d],M[h+d]=M[d],j[h+d]=j[d];N.push(H.latitude),N.push(H.longitude)}return J2(n,r,M,j,U,N,t)};const D2=new u,O2=new G,v2=new ie;function Fp(e,t,n,i){const o=bi(n,t,D2),a=u.dot(o,e);if(a>Dp||a<Op){const r=bi(i,n,zp),f=a<Op?S.PI_OVER_TWO:-S.PI_OVER_TWO,c=ie.fromAxisAngle(r,f,v2),h=G.fromQuaternion(c,O2);return G.multiplyByVector(h,e,e),!0}return!1}const Mp=new oe,W2=new u,Up=new u;function vs(e,t,n,i,o){const a=oe.toCartesian(t,e._ellipsoid,W2);let r=u.add(a,n,Up),f=!1;const c=e._ellipsoid;let h=c.cartesianToCartographic(r,Mp);Math.abs(t.longitude-h.longitude)>S.PI_OVER_TWO&&(f=!0,r=u.subtract(a,n,Up),h=c.cartesianToCartographic(r,Mp)),h.height=0;const d=e.project(h,o);return o=u.subtract(d,i,o),o.z=0,o=u.normalize(o,o),f&&u.negate(o,o),o}const P2=new u,kp=new u;function Vp(e,t,n,i,o,a){const r=u.subtract(t,e,P2);u.normalize(r,r);const f=n-vp;let c=u.multiplyByScalar(r,f,kp);u.add(e,c,o);const h=i-Wp;c=u.multiplyByScalar(r,h,kp),u.add(t,c,a)}const B2=new u;function Aa(e,t){const n=Me.getPointDistance(ya,e),i=Me.getPointDistance(ya,t);let o=B2;S.equalsEpsilon(n,0,S.EPSILON2)?(o=bi(t,e,o),u.multiplyByScalar(o,S.EPSILON2,o),u.add(e,o,e)):S.equalsEpsilon(i,0,S.EPSILON2)&&(o=bi(e,t,o),u.multiplyByScalar(o,S.EPSILON2,o),u.add(t,o,t))}function R2(e,t){const n=Math.abs(e.longitude),i=Math.abs(t.longitude);if(S.equalsEpsilon(n,S.PI,S.EPSILON11)){const o=S.sign(t.longitude);return e.longitude=o*(n-S.EPSILON11),1}else if(S.equalsEpsilon(i,S.PI,S.EPSILON11)){const o=S.sign(e.longitude);return t.longitude=o*(i-S.EPSILON11),2}return 0}const Gp=new oe,qp=new oe,Hp=new u,Rh=new u,jp=new u,Yp=new u,z2=new u,Xp=new u,L2=[Gp,qp],N2=new de,F2=new u,M2=new u,U2=new u,k2=new u,V2=new u,G2=new u,zh=new u,Lh=new u,q2=new u,H2=new u,j2=new u,$p=new u,Y2=new u,X2=new u,$2=new Qe,Z2=new Qe,Zp=new u,K2=new u,Kp=new u,Q2=[new te,new te],Qp=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Jp=Qp.length;function J2(e,t,n,i,o,a,r){let f,c;const h=t._ellipsoid,d=n.length/3-1,p=d*8,m=p*4,T=d*36,y=p>65535?new Uint32Array(T):new Uint16Array(T),w=new Float64Array(p*3),A=new Float32Array(m),E=new Float32Array(m),b=new Float32Array(m),D=new Float32Array(m),O=new Float32Array(m);let B,L,F,N;r&&(B=new Float32Array(m),L=new Float32Array(m),F=new Float32Array(m),N=new Float32Array(p*2));const U=a.length/2;let M=0;const j=Gp;j.height=0;const Y=qp;Y.height=0;let s=Hp,x=Rh;if(r)for(c=0,f=1;f<U;f++)j.latitude=a[c],j.longitude=a[c+1],Y.latitude=a[c+2],Y.longitude=a[c+3],s=t.project(j,s),x=t.project(Y,x),M+=u.distance(s,x),c+=2;const P=i.length/3;x=u.unpack(i,0,x);let z=0;for(c=3,f=1;f<P;f++)s=u.clone(x,s),x=u.unpack(i,c,x),z+=u.distance(s,x),c+=3;let H;c=3;let X=0,ee=0,K=0,ce=0,le=!1,we=u.unpack(n,0,Yp),Se=u.unpack(i,0,Rh),Ee=u.unpack(o,0,Xp);if(e){const Et=u.unpack(n,n.length-6,jp);Fp(Ee,Et,we,Se)&&(Ee=u.negate(Ee,Ee))}let Le=0,Ke=0,ct=0;for(f=0;f<d;f++){const Et=u.clone(we,jp),pn=u.clone(Se,Hp);let mn=u.clone(Ee,z2);le&&(mn=u.negate(mn,mn)),we=u.unpack(n,c,Yp),Se=u.unpack(i,c,Rh),Ee=u.unpack(o,c,Xp),le=Fp(Ee,Et,we,Se),j.latitude=a[X],j.longitude=a[X+1],Y.latitude=a[X+2],Y.longitude=a[X+3];let Yn,Ko,Zi,Ki;if(r){const Tt=R2(j,Y);Yn=t.project(j,V2),Ko=t.project(Y,G2);const Jo=bi(Ko,Yn,Zp);Jo.y=Math.abs(Jo.y),Zi=zh,Ki=Lh,Tt===0||u.dot(Jo,u.UNIT_Y)>Dp?(Zi=vs(t,j,mn,Yn,zh),Ki=vs(t,Y,Ee,Ko,Lh)):Tt===1?(Ki=vs(t,Y,Ee,Ko,Lh),Zi.x=0,Zi.y=S.sign(j.longitude-Math.abs(Y.longitude)),Zi.z=0):(Zi=vs(t,j,mn,Yn,zh),Ki.x=0,Ki.y=S.sign(j.longitude-Y.longitude),Ki.z=0)}const R0=u.distance(pn,Se),z0=Qe.fromCartesian(Et,$2),Ba=u.subtract(we,Et,q2),kx=u.normalize(Ba,$p);let cr=u.subtract(pn,Et,H2);cr=u.normalize(cr,cr);let Qo=u.cross(kx,cr,$p);Qo=u.normalize(Qo,Qo);let Ra=u.cross(cr,mn,Y2);Ra=u.normalize(Ra,Ra);let za=u.subtract(Se,we,j2);za=u.normalize(za,za);let La=u.cross(Ee,za,X2);La=u.normalize(La,La);const Vx=R0/z,Gx=Le/z;let Tf=0,hr,Na,To,L0=0,N0=0;if(r){Tf=u.distance(Yn,Ko),hr=Qe.fromCartesian(Yn,Z2),Na=u.subtract(Ko,Yn,Zp),To=u.normalize(Na,K2);const Tt=To.x;To.x=To.y,To.y=-Tt,L0=Tf/M,N0=Ke/M}for(H=0;H<8;H++){const Tt=ce+H*4,Jo=ee+H*2,fr=Tt+3,M0=H<4?1:-1,Fa=H===2||H===3||H===6||H===7?1:-1;u.pack(z0.high,A,Tt),A[fr]=Ba.x,u.pack(z0.low,E,Tt),E[fr]=Ba.y,u.pack(Ra,b,Tt),b[fr]=Ba.z,u.pack(La,D,Tt),D[fr]=Vx*M0,u.pack(Qo,O,Tt);let yo=Gx*Fa;yo===0&&Fa<0&&(yo=9),O[fr]=yo,r&&(B[Tt]=hr.high.x,B[Tt+1]=hr.high.y,B[Tt+2]=hr.low.x,B[Tt+3]=hr.low.y,F[Tt]=-Zi.y,F[Tt+1]=Zi.x,F[Tt+2]=Ki.y,F[Tt+3]=-Ki.x,L[Tt]=Na.x,L[Tt+1]=Na.y,L[Tt+2]=To.x,L[Tt+3]=To.y,N[Jo]=L0*M0,yo=N0*Fa,yo===0&&Fa<0&&(yo=9),N[Jo+1]=yo)}const Di=U2,Oi=k2,vi=F2,Wi=M2,qx=de.fromCartographicArray(L2,N2),F0=Ve.getMinimumMaximumHeights(qx,h),yf=F0.minimumTerrainHeight,Cf=F0.maximumTerrainHeight;ct+=Math.abs(yf),ct+=Math.abs(Cf),Vp(Et,pn,yf,Cf,Di,vi),Vp(we,Se,yf,Cf,Oi,Wi);let Pi=u.multiplyByScalar(Qo,S.EPSILON5,Kp);u.add(Di,Pi,Di),u.add(Oi,Pi,Oi),u.add(vi,Pi,vi),u.add(Wi,Pi,Wi),Aa(Di,Oi),Aa(vi,Wi),u.pack(Di,w,K),u.pack(Oi,w,K+3),u.pack(Wi,w,K+6),u.pack(vi,w,K+9),Pi=u.multiplyByScalar(Qo,-2*S.EPSILON5,Kp),u.add(Di,Pi,Di),u.add(Oi,Pi,Oi),u.add(vi,Pi,vi),u.add(Wi,Pi,Wi),Aa(Di,Oi),Aa(vi,Wi),u.pack(Di,w,K+12),u.pack(Oi,w,K+15),u.pack(Wi,w,K+18),u.pack(vi,w,K+21),X+=2,c+=3,ee+=16,K+=24,ce+=32,Le+=R0,Ke+=Tf}c=0;let gt=0;for(f=0;f<d;f++){for(H=0;H<Jp;H++)y[c+H]=Qp[H]+gt;gt+=8,c+=Jp}const Fe=Q2;te.fromVertices(n,u.ZERO,3,Fe[0]),te.fromVertices(i,u.ZERO,3,Fe[1]);const At=te.fromBoundingSpheres(Fe);At.radius+=ct/(d*2);const Wt={position:new Ft({componentDatatype:he.DOUBLE,componentsPerAttribute:3,normalize:!1,values:w}),startHiAndForwardOffsetX:Yi(A),startLoAndForwardOffsetY:Yi(E),startNormalAndForwardOffsetZ:Yi(b),endNormalAndTextureCoordinateNormalizationX:Yi(D),rightNormalAndTextureCoordinateNormalizationY:Yi(O)};return r&&(Wt.startHiLo2D=Yi(B),Wt.offsetAndRight2D=Yi(L),Wt.startEndNormals2D=Yi(F),Wt.texcoordNormalization2D=new Ft({componentDatatype:he.FLOAT,componentsPerAttribute:2,normalize:!1,values:N})),new mt({attributes:Wt,indices:y,boundingSphere:At})}function Yi(e){return new Ft({componentDatatype:he.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}ji._projectNormal=vs;const eE=`in vec4 v_startPlaneNormalEcAndHalfWidth;
|
|
4954
4954
|
in vec4 v_endPlaneNormalEcAndBatchId;
|
|
4955
4955
|
in vec4 v_rightPlaneEC; // Technically can compute distance for this here
|
|
4956
4956
|
in vec4 v_endEcAndStartEcX;
|
|
@@ -6594,5 +6594,4 @@ void main()
|
|
|
6594
6594
|
return material;
|
|
6595
6595
|
}
|
|
6596
6596
|
`},translucent:function(){return!0}})}setLineVisible(t){this.Keym=="OW_JPS_EEngin_001"&&(this.entityCollection2.show=t)}RemoveLineModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.viewer.dataSources.remove(this.dataSource2),this.entityCollection2.show=!1)}}class Fx{constructor(){se(this,"id","");se(this,"name","");se(this,"towerFZinfo","");se(this,"towerDisFile","");se(this,"stressFileContent","");se(this,"TowerMemberColor","#FFFFFF");se(this,"TowerMembersWidth",2);se(this,"Longitude",0);se(this,"Latitude",0);se(this,"Altitude",0);se(this,"RollX",0);se(this,"RollY",90);se(this,"RollZ",0)}}function Mx(e){debugger;const t=e.split(`
|
|
6597
|
-
`),n=[],i=[],o=/^\s*(\d+)\s+([\d.-]+)\s+([\d.-]+)\s+([\d.-]+)\s+(-?\d+)/,a=/^\s*(\d+)\s+(\d+)\s+(\d+)\s*(?:#|$)/;for(const r of t){const f=r.trim();if(!f)continue;const c=f.match(o);if(c){n.push({id:parseInt(c[1]),x:parseFloat(c[2]),y:parseFloat(c[3]),z:parseFloat(c[4]),flag:parseInt(c[5])});continue}const h=f.match(a);h&&i.push({from:parseInt(h[1]),to:parseInt(h[2]),type:parseInt(h[3])})}return{TowerNodes:n,connections:i}}function
|
|
6598
|
-
`),n=[];for(const i of t){if(!i.trim())continue;const o=i.trim().split(/\s+/).filter(f=>f!==""),a=parseInt(o[0]);if(isNaN(a))continue;const r=[];for(let f=1;f<o.length;f+=3){const c=parseFloat(o[f]),h=parseFloat(o[f+1]),d=parseFloat(o[f+2]);if(!isNaN(c)&&!isNaN(h)&&!isNaN(d)){const p=Math.floor((f-1)/3)+1;r.push({timeStep:p,x:c,y:h,z:d})}}n.push({nodeId:a,displacements:r})}return n}function B0(e){const t={};return e.forEach(n=>{n.displacements.forEach(i=>{t[i.timeStep]||(t[i.timeStep]=[]),t[i.timeStep].push({nodeId:n.nodeId,...i})})}),t}class kx{constructor(t,n,i){se(this,"viewer");se(this,"TowerFZS");se(this,"Keym","");se(this,"dataSource2");se(this,"entityCollection2");se(this,"TowerNodes",[]);se(this,"connections",[]);se(this,"displacementData",[]);se(this,"_animationInterval",null);this.Keym=i,this.viewer=t,this.TowerFZS=n,this.dataSource2=new rr(this.TowerFZS.id),this.entityCollection2=this.dataSource2.entities}loadfile(){if(this.Keym!="OW_JPS_EEngin_001")return;const{TowerNodes:t,connections:n}=Mx(this.TowerFZS.towerFZinfo);this.TowerNodes=t,this.connections=n,this.displacementData=Ux(this.TowerFZS.towerDisFile);debugger}loadFZTower(){if(this.Keym!="OW_JPS_EEngin_001")return;let t=new He(S.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ);const n=u.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(i=>{const o=this.TowerNodes.find(h=>h.id===i.from),a=this.TowerNodes.find(h=>h.id===i.to),r=[],f=new u(o==null?void 0:o.x,o==null?void 0:o.y,o==null?void 0:o.z);r.push(Q(n,f,t)),this.entityCollection2.add(Pa(r[0],(o==null?void 0:o.id)+""));const c=new u(a==null?void 0:a.x,a==null?void 0:a.y,a==null?void 0:a.z);r.push(Q(n,c,t)),this.entityCollection2.add(Pa(r[1],(a==null?void 0:a.id)+"")),this.entityCollection2.add(v(r,i.from+""+i.to,this.TowerFZS.TowerMembersWidth,this.TowerFZS.TowerMemberColor))})}loadFZDISTower(t){if(this.Keym!=="OW_JPS_EEngin_001")return;const i=B0(this.displacementData)[t];debugger;if(!i){console.warn(`未找到时间步 ${t} 的位移数据`);return}const o=new He(S.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ),a=u.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(r=>{const f=this.TowerNodes.find(E=>E.id===r.from),c=this.TowerNodes.find(E=>E.id===r.to);if(!f||!c){console.warn(`找不到连接 ${r.from}->${r.to} 的节点`);return}debugger;const h=i.find(E=>E.nodeId===r.from),d=i.find(E=>E.nodeId===r.to);if(!h||!d){console.warn(`找不到连接 ${r.from}->${r.to} 的位移数据`);return}const p=new u(f.x-h.x,f.y-h.y,f.z-h.z),m=new u(c.x-d.x,c.y-d.y,c.z-d.z),T=Q(a,p,o);this.entityCollection2.add(Pa(T,r.from+""));const y=Q(a,m,o);this.entityCollection2.add(Pa(y,r.to+""));const w=[T,y],A=`${r.from}_${r.to}`;this.entityCollection2.add(v(w,A+t,this.TowerFZS.TowerMembersWidth,"#ffffff"))})}loadFZDISTower1(t){if(this.Keym!="OW_JPS_EEngin_001")return;const n=B0(this.displacementData);let i=new He(S.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ);const o=u.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(a=>{const r=this.TowerNodes.find(T=>T.id===a.from),f=n[t].find(T=>T.nodeId===a.from),c=this.TowerNodes.find(T=>T.id===a.to),h=n[t].find(T=>T.nodeId===a.to),d=[],p=new u(r.x-f.x,r.y-f.y,r.z-f.z);d.push(Q(o,p,i));const m=new u(c.x-h.x,c.y-h.y,c.z-h.z);d.push(Q(o,m,i));debugger;this.entityCollection2.add(v(d,a.from+""+a.to,this.TowerFZS.TowerMembersWidth,this.TowerFZS.TowerMemberColor))})}loadAllFZDisTower(){if(this.Keym!=="OW_JPS_EEngin_001")return;if(!this.displacementData||this.displacementData.length===0){console.warn("没有可用的位移数据");return}let t=1;const n=this.displacementData.length;this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null);const i=()=>{if(this.viewer.dataSources.contains(this.dataSource2)&&this.viewer.dataSources.remove(this.dataSource2,!0),t>n){t=1;return}this.dataSource2=new rr("fztower"),this.entityCollection2=this.dataSource2.entities;try{this.loadFZDISTower(t),this.loadFZModel(),console.log(`正在显示位移帧: ${t}/${n}`),t++}catch(o){console.error("加载位移帧时出错:",o),this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null)}};i(),this._animationInterval=setInterval(i,300)}stopDisplacementAnimation(){this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null)}toggleAnimation(t){t?this.stopDisplacementAnimation():this.loadAllFZDisTower()}loadFZModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.viewer.dataSources.add(this.dataSource2),this.viewer.entities.show)}setFZModelVisible(t){this.Keym=="OW_JPS_EEngin_001"&&(this.entityCollection2.show=t)}RemoveFZModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.viewer.dataSources.remove(this.dataSource2),this.entityCollection2.show=!1)}}ot.GUAPoint=Lx,ot.InsulatorInfo=zx,ot.InsulatorType=Ht,ot.LineNum=ar,ot.LineType=P0,ot.OWEEgineFZManager=kx,ot.OWEEgineManager=Nx,ot.PhaseSType=nn,ot.TowerFZInfo=Fx,ot.TowerInfo=Rx,ot.TowerLineInfo=Bx,ot.TowerType=$i,ot.WairnumType=$,ot.drawModel=go,Object.defineProperty(ot,Symbol.toStringTag,{value:"Module"})});
|
|
6597
|
+
`),n=[],i=[],o=/^\s*(\d+)\s+([\d.-]+)\s+([\d.-]+)\s+([\d.-]+)\s+(-?\d+)/,a=/^\s*(\d+)\s+(\d+)\s+(\d+)\s*(?:#|$)/;for(const r of t){const f=r.trim();if(!f)continue;const c=f.match(o);if(c){n.push({id:parseInt(c[1]),x:parseFloat(c[2]),y:parseFloat(c[3]),z:parseFloat(c[4]),flag:parseInt(c[5])});continue}const h=f.match(a);h&&i.push({from:parseInt(h[1]),to:parseInt(h[2]),type:parseInt(h[3])})}return{TowerNodes:n,connections:i}}function B0(e){const t={};return e.forEach(n=>{n.displacements.forEach(i=>{t[i.timeStep]||(t[i.timeStep]=[]),t[i.timeStep].push({nodeId:n.nodeId,...i})})}),t}class Ux{constructor(t,n,i){se(this,"viewer");se(this,"TowerFZS");se(this,"Keym","");se(this,"dataSource2");se(this,"entityCollection2");se(this,"TowerNodes",[]);se(this,"connections",[]);se(this,"displacementData",[]);se(this,"_animationInterval",null);this.Keym=i,this.viewer=t,this.TowerFZS=n,this.dataSource2=new rr(this.TowerFZS.id),this.entityCollection2=this.dataSource2.entities}loadfile(){if(this.Keym!="OW_JPS_EEngin_001")return;const{TowerNodes:t,connections:n}=Mx(this.TowerFZS.towerFZinfo);this.TowerNodes=t,this.connections=n;debugger}loadFZTower(){if(this.Keym!="OW_JPS_EEngin_001")return;let t=new He(S.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ);const n=u.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(i=>{const o=this.TowerNodes.find(h=>h.id===i.from),a=this.TowerNodes.find(h=>h.id===i.to),r=[],f=new u(o==null?void 0:o.x,o==null?void 0:o.y,o==null?void 0:o.z);r.push(Q(n,f,t)),this.entityCollection2.add(Pa(r[0],(o==null?void 0:o.id)+""));const c=new u(a==null?void 0:a.x,a==null?void 0:a.y,a==null?void 0:a.z);r.push(Q(n,c,t)),this.entityCollection2.add(Pa(r[1],(a==null?void 0:a.id)+"")),this.entityCollection2.add(v(r,i.from+""+i.to,this.TowerFZS.TowerMembersWidth,this.TowerFZS.TowerMemberColor))})}loadFZDISTower(t){if(this.Keym!=="OW_JPS_EEngin_001")return;const i=B0(this.displacementData)[t];debugger;if(!i){console.warn(`未找到时间步 ${t} 的位移数据`);return}const o=new He(S.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ),a=u.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(r=>{const f=this.TowerNodes.find(E=>E.id===r.from),c=this.TowerNodes.find(E=>E.id===r.to);if(!f||!c){console.warn(`找不到连接 ${r.from}->${r.to} 的节点`);return}debugger;const h=i.find(E=>E.nodeId===r.from),d=i.find(E=>E.nodeId===r.to);if(!h||!d){console.warn(`找不到连接 ${r.from}->${r.to} 的位移数据`);return}const p=new u(f.x-h.x,f.y-h.y,f.z-h.z),m=new u(c.x-d.x,c.y-d.y,c.z-d.z),T=Q(a,p,o);this.entityCollection2.add(Pa(T,r.from+""));const y=Q(a,m,o);this.entityCollection2.add(Pa(y,r.to+""));const w=[T,y],A=`${r.from}_${r.to}`;this.entityCollection2.add(v(w,A+t,this.TowerFZS.TowerMembersWidth,"#ffffff"))})}loadFZDISTower1(t){if(this.Keym!="OW_JPS_EEngin_001")return;const n=B0(this.displacementData);let i=new He(S.toRadians(this.TowerFZS.RollX),this.TowerFZS.RollY,this.TowerFZS.RollZ);const o=u.fromDegrees(this.TowerFZS.Longitude,this.TowerFZS.Latitude,this.TowerFZS.Altitude);this.connections.forEach(a=>{const r=this.TowerNodes.find(T=>T.id===a.from),f=n[t].find(T=>T.nodeId===a.from),c=this.TowerNodes.find(T=>T.id===a.to),h=n[t].find(T=>T.nodeId===a.to),d=[],p=new u(r.x-f.x,r.y-f.y,r.z-f.z);d.push(Q(o,p,i));const m=new u(c.x-h.x,c.y-h.y,c.z-h.z);d.push(Q(o,m,i));debugger;this.entityCollection2.add(v(d,a.from+""+a.to,this.TowerFZS.TowerMembersWidth,this.TowerFZS.TowerMemberColor))})}loadAllFZDisTower(){if(this.Keym!=="OW_JPS_EEngin_001")return;if(!this.displacementData||this.displacementData.length===0){console.warn("没有可用的位移数据");return}let t=1;const n=this.displacementData.length;this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null);const i=()=>{if(this.viewer.dataSources.contains(this.dataSource2)&&this.viewer.dataSources.remove(this.dataSource2,!0),t>n){t=1;return}this.dataSource2=new rr("fztower"),this.entityCollection2=this.dataSource2.entities;try{this.loadFZDISTower(t),this.loadFZModel(),console.log(`正在显示位移帧: ${t}/${n}`),t++}catch(o){console.error("加载位移帧时出错:",o),this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null)}};i(),this._animationInterval=setInterval(i,300)}stopDisplacementAnimation(){this._animationInterval&&(clearInterval(this._animationInterval),this._animationInterval=null)}toggleAnimation(t){t?this.stopDisplacementAnimation():this.loadAllFZDisTower()}loadFZModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.viewer.dataSources.add(this.dataSource2),this.viewer.entities.show)}setFZModelVisible(t){this.Keym=="OW_JPS_EEngin_001"&&(this.entityCollection2.show=t)}RemoveFZModel(){this.Keym=="OW_JPS_EEngin_001"&&(this.viewer.dataSources.remove(this.dataSource2),this.entityCollection2.show=!1)}}ot.GUAPoint=Lx,ot.InsulatorInfo=zx,ot.InsulatorType=Ht,ot.LineNum=ar,ot.LineType=P0,ot.OWEEgineFZManager=Ux,ot.OWEEgineManager=Nx,ot.PhaseSType=nn,ot.TowerFZInfo=Fx,ot.TowerInfo=Rx,ot.TowerLineInfo=Bx,ot.TowerType=$i,ot.WairnumType=$,ot.drawModel=go,Object.defineProperty(ot,Symbol.toStringTag,{value:"Module"})});
|